mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Updating eventing workflows for GA
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
06743fa4f7
commit
f281ab5bb1
BIN
images/create-sub-ODC.png
Normal file
BIN
images/create-sub-ODC.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
images/serverless-verify-source-channel.png
Normal file
BIN
images/serverless-verify-source-channel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
BIN
images/sink-pingsource-channel.png
Normal file
BIN
images/sink-pingsource-channel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
images/verify-channel-odc.png
Normal file
BIN
images/verify-channel-odc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
images/verify-pingsource-ODC.png
Normal file
BIN
images/verify-pingsource-ODC.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
images/verify-subscription-odc.png
Normal file
BIN
images/verify-subscription-odc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -17,7 +17,7 @@ $ kn trigger list
|
||||
----
|
||||
|
||||
+
|
||||
.Example output:
|
||||
.Example output
|
||||
[source,terminal]
|
||||
----
|
||||
NAME BROKER SINK AGE CONDITIONS READY REASON
|
||||
|
||||
32
modules/serverless-connect-channel-source-odc.adoc
Normal file
32
modules/serverless-connect-channel-source-odc.adoc
Normal file
@@ -0,0 +1,32 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-connect-channel-source-odc_{context}"]
|
||||
= Connect an event source to a channel using {product-title} web console
|
||||
|
||||
You can create multiple event source types in {product-title} that can be connected to channels.
|
||||
|
||||
.Prerequisites
|
||||
To connect an event source to a channel 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}.
|
||||
* You have created a channel by following the documentation on _Creating a channel using {product-title} web console_.
|
||||
|
||||
.Procedure
|
||||
. Create an event source of any type, by following the documentation on _Getting started with event sources_.
|
||||
. In the *Sink* section of the *Event Sources* form view, select *Resource*. Then use the drop-down to select your channel.
|
||||
+
|
||||
image::sink-pingsource-channel.png[Use your channel as the Resource]
|
||||
. Click *Create*.
|
||||
|
||||
.Verification steps
|
||||
You can verify that the event source was created and is connected to the sink by viewing the *Topology* page.
|
||||
|
||||
. In the *Developer* perspective, navigate to *Topology*.
|
||||
. View the event source and click on the connected channel to see the channel details in the side panel.
|
||||
+
|
||||
image::serverless-verify-source-channel.png[View the source and connected channel]
|
||||
33
modules/serverless-create-channel-odc.adoc
Normal file
33
modules/serverless-create-channel-odc.adoc
Normal file
@@ -0,0 +1,33 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-create-channel-odc_{context}"]
|
||||
= Creating a channel using the Developer perspective
|
||||
|
||||
You can create a channel with the cluster default configuration by using the {product-title} web console.
|
||||
|
||||
.Prerequisites
|
||||
To create channels 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
|
||||
|
||||
. In the *Developer* perspective, navigate to *+Add* -> *Channel*.
|
||||
. Select the type of `Channel` object that you want to create from the *Type* drop-down.
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
Currently only InMemoryChannel type `Channel` objects are supported.
|
||||
====
|
||||
. Click *Create*.
|
||||
|
||||
.Verification steps
|
||||
|
||||
* Confirm that the channel now exists by navigating to the *Topology* page.
|
||||
+
|
||||
image::verify-channel-odc.png[View the channel in the Topology view]
|
||||
37
modules/serverless-create-inmemorychannel-yaml.adoc
Normal file
37
modules/serverless-create-inmemorychannel-yaml.adoc
Normal file
@@ -0,0 +1,37 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-create-inmemorychannel-yaml_{context}"]
|
||||
= Creating a development channel using YAML
|
||||
|
||||
You can create a channel by using YAML with the cluster default configuration.
|
||||
|
||||
.Prerequisites
|
||||
To create channels ensure that:
|
||||
|
||||
* The {ServerlessOperatorName}, Knative Serving, and Knative Eventing are installed on your {product-title} cluster.
|
||||
* 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
|
||||
|
||||
. Create a `Channel` object.
|
||||
.. Create a YAML file and copy the following sample code into it:
|
||||
+
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: Channel
|
||||
metadata:
|
||||
name: example-channel
|
||||
namespace: default
|
||||
----
|
||||
|
||||
.. Apply the YAML file:
|
||||
+
|
||||
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc apply -f <filename>
|
||||
----
|
||||
@@ -1,31 +0,0 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-create-inmemorychannel_{context}"]
|
||||
= Creating a development channel
|
||||
|
||||
.Procedure
|
||||
|
||||
You can create a channel using the cluster default configuration by completing the following procedure.
|
||||
|
||||
. Create a `Channel` object.
|
||||
.. Create a YAML file and copy the following sample code into it:
|
||||
+
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: Channel
|
||||
metadata:
|
||||
name: example-channel
|
||||
namespace: default
|
||||
----
|
||||
|
||||
.. Apply the YAML file by entering:
|
||||
+
|
||||
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc apply -f <filename>
|
||||
----
|
||||
34
modules/serverless-creating-subscriptions-odc.adoc
Normal file
34
modules/serverless-creating-subscriptions-odc.adoc
Normal file
@@ -0,0 +1,34 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-creating-subscriptions-odc_{context}"]
|
||||
= Connecting a channel to a sink using subscriptions in the Developer perspective
|
||||
|
||||
.Prerequisites
|
||||
To create subscriptions 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}.
|
||||
* You have created an event sink, such as a Knative service, and a channel.
|
||||
|
||||
.Procedure
|
||||
. Navigate to the *Topology* page.
|
||||
. Create a subscription using one of the following methods:
|
||||
.. Hover over the channel that you want to create a subscription for, and drag the arrow. The *Add Subscription* option is displayed.
|
||||
+
|
||||
image::create-sub-ODC.png[Create a subscription for the channel]
|
||||
+
|
||||
... Select your sink as a subscriber from the drop-down list.
|
||||
... Click *Add*.
|
||||
.. If the service is available in the *Topology* view under the same namespace or project as the channel, click on the channel that you want to create a subscription for, and drag the arrow directly to a service to immediately create a subscription from the channel to that service.
|
||||
|
||||
|
||||
.Verification steps
|
||||
* After the subscription has been created, you can see it represented as a line that connects the channel to the service in the *Topology* view:
|
||||
+
|
||||
image::verify-subscription-odc.png[Subscription in the Topology view]
|
||||
+
|
||||
You can view the event source, channel, and subscriptions for the sink by clicking on the service.
|
||||
@@ -3,8 +3,8 @@
|
||||
// <List assemblies here, each on a new line>
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-creating-subscriptions_{context}"]
|
||||
= Creating a subscription
|
||||
[id="serverless-creating-subscriptions-yaml_{context}"]
|
||||
= Connecting a channel to a sink using subscriptions with YAML
|
||||
|
||||
You can create a `Subscription` object to connect a channel to a sink. In the following procedure, the example sink is a Knative service named `error-handler`.
|
||||
|
||||
56
modules/serverless-pingsource-odc.adoc
Normal file
56
modules/serverless-pingsource-odc.adoc
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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]
|
||||
14
modules/serverless-supported-channel-types.adoc
Normal file
14
modules/serverless-supported-channel-types.adoc
Normal file
@@ -0,0 +1,14 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/event_workflows/serverless-channels.adoc
|
||||
|
||||
[id="serverless-supported-channel-types_{context}"]
|
||||
= Supported channel types
|
||||
|
||||
Currently, {ServerlessProductName} only supports `InMemoryChannel` type channels for development use, as part of the Knative Eventing Technology Preview.
|
||||
|
||||
The following are limitations of InMemoryChannel type channels:
|
||||
|
||||
* No event persistence is available. If a pod goes down, events on that pod are lost.
|
||||
* InMemoryChannel type channels do not implement event ordering, so two events that are received in the channel at the same time can be delivered to a subscriber in any order.
|
||||
* If a subscriber rejects an event, there are no re-delivery attempts. Instead, the rejected event is sent to a `deadLetterSink` if this sink exists, or is dropped.
|
||||
@@ -32,5 +32,6 @@ spec:
|
||||
<2> The event message body expressed as a JSON encoded data string.
|
||||
<3> These are the details of the event consumer. In this example, we are using a Knative service named `event-display`.
|
||||
|
||||
include::modules/serverless-pingsource-odc.adoc[leveloffset=+1]
|
||||
include::modules/serverless-pingsource-kn.adoc[leveloffset=+1]
|
||||
include::modules/serverless-pingsource-yaml.adoc[leveloffset=+1]
|
||||
|
||||
@@ -15,20 +15,14 @@ Channels are custom resources that define a single event-forwarding and persiste
|
||||
|
||||
After events have been sent to a channel, these events can be sent to multiple Knative services, or other sinks, by using a subscription.
|
||||
|
||||
The default configuration for channel instances is defined in the `default-ch-webhook` ConfigMap.
|
||||
Developers can create their own channels directly by instantiating a supported `Channel` object.
|
||||
|
||||
[id="serverless-channels-supported-types"]
|
||||
== Supported channel types
|
||||
include::modules/serverless-supported-channel-types.adoc[leveloffset=+1]
|
||||
// include::modules/serverless-inmemorychannel.adoc[leveloffset=+2]
|
||||
// comment out for now - this information isn't necessary while only default channel type is available, and should be moved to an admin guide anyway.
|
||||
include::modules/serverless-create-channel-odc.adoc[leveloffset=+1]
|
||||
include::modules/serverless-connect-channel-source-odc.adoc[leveloffset=+2]
|
||||
include::modules/serverless-creating-subscriptions-odc.adoc[leveloffset=+2]
|
||||
|
||||
Currently, {ServerlessProductName} only supports `InMemoryChannel` kind channels for development use, as part of the Knative Eventing Technology Preview.
|
||||
|
||||
The following are limitations of InMemoryChannel type channels:
|
||||
|
||||
* No event persistence is available. If a Pod goes down, events on that Pod are lost.
|
||||
* InMemoryChannel type channels do not implement event ordering, so two events that are received in the channel at the same time can be delivered to a subscriber in any order.
|
||||
* If a subscriber rejects an event, there are no re-delivery attempts. Instead, the rejected event is sent to a `deadLetterSink` if this sink exists, or is otherwise dropped.
|
||||
|
||||
include::modules/serverless-inmemorychannel.adoc[leveloffset=+2]
|
||||
include::modules/serverless-create-inmemorychannel.adoc[leveloffset=+1]
|
||||
include::modules/serverless-creating-subscriptions.adoc[leveloffset=+1]
|
||||
include::modules/serverless-create-inmemorychannel-yaml.adoc[leveloffset=+1]
|
||||
include::modules/serverless-creating-subscriptions-yaml.adoc[leveloffset=+2]
|
||||
|
||||
Reference in New Issue
Block a user