1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00
Files
openshift-docs/modules/serverless-pingsource-odc.adoc
2020-10-08 18:38:09 +00:00

57 lines
2.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * serverless/event_workflows/serverless-pingsource.adoc
[id="serverless-pingsource-odc_{context}"]
= Creating a PingSource using the Developer Perspective
You can create and verify a basic PingSource from the {product-title} web console.
.Prerequisites
To create a PingSource using the *Developer* perspective, ensure that:
* The {ServerlessOperatorName}, Knative Serving, and Knative Eventing are installed on your {product-title} cluster.
* You have logged in to the web console.
* You are in the *Developer* perspective.
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
.Procedure
. To verify that the PingSource is working, create a simple Knative
service that dumps incoming messages to the logs of the service.
.. In the *Developer* perspective, navigate to *+Add* -> *YAML*.
.. Copy the example YAML:
+
[source,yaml]
----
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: event-display
spec:
template:
spec:
containers:
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:latest
----
.. Click *Create*.
. Create a PingSource in the same namespace as the service created in the previous step, or any other sink that you want to send events to.
.. In the *Developer* perspective, navigate to *+Add* -> *Event Source*.
.. Select *Ping Source*.
.. Enter a value for *Schedule*. In this example, the value is `*/2 * * * *`, which creates a PingSource that sends a message every two minutes.
.. Optional: You can enter a value for *Data*, which is the message payload.
.. Select a *Sink*. This can be either a *Resource* or a *URI*. In this example, the `event-display` service created in the previous step is used as the *Resource* sink.
.. Click *Create*.
.Verfication steps
You can verify that the PingSource was created and is connected to the sink by viewing the *Topology* page.
. In the *Developer* perspective, navigate to *Topology*.
. View the PingSource and sink.
+
image::verify-pingsource-ODC.png[View the PingSource and service in the Topology view]