Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions downstream/assemblies/eda/assembiy-eda-user-examples.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:_mod-docs-content-type: ASSEMBLY
[id="eda-user-examples"]

= {EDAName} user scenarios

[role="_abstract"]

The following content provides practical, end-to-end scenarios for integrating event streams (such as GitHub, GitLab, ServiceNow, and Dynatrace) with rulebook activations. Through these examples, you can experience how to configure and apply diverse integrations to automate responses to specific environmental events, streamline your workflows, and enhance system responsiveness.

include::eda/con-eda-user-examples-github-event-streams.adoc[leveloffset=+1]

include::eda/proc-eda-example-github-eventstream-cred.adoc[leveloffset=+2]

include::eda/proc-eda-example-eda-github-event-stream.adoc[leveloffset=+2]

include::eda/proc-eda-example-configure-remote-sys.adoc[leveloffset=+2]

include::eda/proc-eda-example-verify-event-streams-work.adoc[leveloffset=+2]

include::eda/proc-eda-example-replace-sources-attach-event-streams.adoc[leveloffset=+2]

include::eda/proc-eda-example-check-rule-audit-event-stream.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* link:https://interact.redhat.com/share/E1HhKjGqhls8JF5NsBNz[Event-Driven Ansible with Event Streams]
* link:https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/using_automation_decisions/simplified-event-routing[Simplified event routing]
13 changes: 12 additions & 1 deletion downstream/assemblies/eda/assembly-simplified-event-routing.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

:_mod-docs-content-type: ASSEMBLY
[id="simplified-event-routing"]

= Simplified event routing
Expand All @@ -8,14 +8,25 @@ Simplified event routing enables {EDAcontroller} to capture and analyze data fro
Event streams are an easy way to connect your sources to your rulebooks. This capability lets you create a single endpoint to receive alerts from an event source and then use the events in multiple rulebooks.

include::eda/con-event-streams.adoc[leveloffset=+1]

include::eda/proc-eda-create-event-stream-credential.adoc[leveloffset=+1]

include::eda/proc-eda-create-event-stream.adoc[leveloffset=+1]

include::eda/proc-eda-config-remote-sys-to-events.adoc[leveloffset=+1]

include::eda/proc-eda-verify-event-streams-work.adoc[leveloffset=+1]

include::eda/proc-eda-replace-sources-with-event-streams.adoc[leveloffset=+1]

include::eda/proc-eda-resend-webhook-data-event-streams.adoc[leveloffset=+1]

include::eda/proc-eda-check-rule-audit-event-stream.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources
* link:https://interact.redhat.com/share/E1HhKjGqhls8JF5NsBNz[Event-Driven Ansible with Event Streams]
* link:https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/using_automation_decisions/eda-user-examples[{EDAName} user scenarios]



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:_mod-docs-content-type: CONCEPT
[id="eda-user-examples-github-event-streams"]

= Simplified Event Routing using GitHub event streams

[role="_abstract"]
You can learn how to achieve end-to-end simplified event routing using GitHub event streams in the the following sections. The goal is to demonstrate how to efficiently capture, process, and route GitHub events for seamless integration with your automation workflows, ensuring your rulebooks react precisely to repository activities.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-check-rule-audit-event-stream"]

= Check the Rule Audit for events on your new event stream

You can check the Rule Audit for events associated with your new event stream, *Repo Event Stream*. This process guides you to locate and view the details of specific events and their actions, allowing you to verify event processing.

.Procedure
. From the {PlatformNameShort} navigation panel, select {MenuADRuleAudit} to see the event and actions.
. Select the name of the event in the list that is associated with the rulebook activation you created. The Details tab is displayed.
. Click the *Events* tab to view the event details.

//[JMSelf]Remove screen shot for now
//image:eda-rule-audit-event-streams.png[Rule audit - Event stream]
18 changes: 18 additions & 0 deletions downstream/modules/eda/proc-eda-example-configure-remote-sys.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-configure-remote-sys"]

= Configuring your remote system to send events

Complete the following procedure to configure your remote system to send events by setting up a webhook in your GitHub repository.

.Procedure

. Go to your GitHub account to configure your event source.
. Click *Your profile name → Your repositories* and select the repository you want to configure.
. Navigate to Settings (top tool bar).
. In the *General* navigation pane (left), select *Webhooks*, then click btn:[Add webhook] to create a webhook in your GitHub repository that will send events to your event stream.*
. In the *Payload URL* field, paste the event stream URL that is displayed in the details of your event stream.
. In the *Content type* field, change the content type to *application/json* for your payload.
. In the *Secrets* field, add your secret from your event stream credential you created earlier.
. Click *Add webhook* to save your configuration.
. Now that the webhook has been created, return to {PlatformNameShort}.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-eda-github-event-stream"]

= Creating a GitHub event stream

You can create an event stream and link it to a pre-configured credential, producing a generated URL for webhook configuration.

.Procedure

. From the {PlatformNameShort} navigation, click {MenuADEventStreams}.
. Click *Create event stream*.
. Enter the name for your event stream: `Repo Event Stream`
. Select your organization: *Default*
. Select *GitHub Event Stream* from the Event stream type list.
. Select the credential you created in the previous procedure: `Repo-EventStream`
. Click *Create event stream*.
. Now view the details of your new event stream and note the URL for it. Copy and paste this URL to use when you configure your webhook.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-github-eventstream-cred"]

= Creating a GitHub event stream credential

Complete the following procedure to create a GitHub event stream credential to enable authentication with your chosen event stream source.


.Procedure

. Log in to the {PlatformNameShort} Dashboard.
. Select {MenuADCredentials}.
. Click btn:[Create credential].
. Enter the following name for your event stream credential: `Repo-EventStream`
. Select the credential type: *GitHub Event Stream*.
. Under *Type Details*, add an HMAC secret of your choosing.
. Click *Create credential* to save your credential.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-replace-sources-attach-event-streams"]

= Replacing sources and attaching event streams to activations

You can create a new rulebook activation, select a project and rulebook for it, and crucially, update its event source to subscribe to a desired event stream (in this case, *Repo Event Stream* that you created earlier).


.Procedure

. From the {PlatformNameShort} navigation panel, select {MenuADRulebookActivations}.
. Click btn:[Create rulebook activation] to create a rulebook for events on an application repository for Linux servers.
. In the *Name* field, enter `Repo Events - RHEL`.
. For your *Organization*, select *Default* from the list.
. From the *Project* list, select *GitOps EventStream*.
. Select *gitops-rhel.yml* for your *Rulebook*.
. In the *Event streams* field, click the gear icon to select which event stream the rulebook needs to subscribe to. The Event streams window is displayed.
. Replace an ansible.eda.webhook or compatible custom source with the desired event stream. This modifies the activation only, while leaving your filters intact.
. Select *Repo Event Stream* from the list of event streams that you created.
. Click *Save* to save your event stream.
. Next to the *Credential* field, click the *Search* icon to access {ControllerName} and connect with job templates and workflows. The *Select credential* message is displayed.
. Select the *AAP* credential and click *Confirm*.
. Select the *Decision Environment* from the list.
. Click *Create rulebook activation*. The activation status is displayed (if successful, the *Running* status displays).
. Repeat the following steps to create an additional rulebook activation using the same process as your first activation:
.. In the *Event streams* field, click the gear icon to select which event stream the rulebook needs to subscribe to.
.. Select the *Repo Event Stream* from the list of event streams that you created.
.. Click *Save* to save your event stream.
.. Click *Create rulebook activation* to save the configuration and start the rulebook.

.Results
Now, there are two rulebook activations running and you can commit some code to one of your repositories. An event has been received and routed to your rulebooks.


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-resend-webhook-data-event-streams"]

= Resending webhook data from your event stream type

After configuring an event stream (in this case, *Repo Event Stream*), and linking it to rulebook activations, you can verify that events are correctly received and processed. This allows you to confirm your setup and ensure that your rulebook activations are correctly subscribed and responsive.

.Procedure
. Go back to the *GitHub Webhook / Manage webhook* page.
. Click the *Recent Deliveries* tab.
. Click the btn:[ellipsis].
. Click btn:[Redeliver]. A *Redeliver payload?* window is displayed with a delivery message.
. Click *Yes, redeliver this payload*.
. Return to the {PlatformNameShort} to check your rule audit.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:_mod-docs-content-type: PROCEDURE
[id="eda-example-verify-event-streams-work"]

= Verifying your event streams work

Verify that you can use your event stream to connect to a remote system and receive data.

. From the navigation panel in {PlatformNameShort}, select {MenuADEventStreams}.
. Select the event stream you created: `Repo Event Stream`
. Toggle the *Forward events to rulebook activation* option in the top right to disable event forwarding. The *Disable forwarding of events* message is displayed.
. In the *Disable forwarding of events* message window, click the *Yes, I confirm I want to disable the forwarding of events* checkbox.
. Click btn:[Disable forwarding of events].
. Then click *Close*. A banner is displayed notifying you that events will not be forwarded. You can commit on a Git repo.
. In the *Repo Event Stream* that you just created, re-enable the event forwarding capability by toggling the Forward events to rulebook activation option on.
15 changes: 15 additions & 0 deletions downstream/titles/eda/eda-user-guide/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@ include::attributes/attributes.adoc[]
Developed by Red Hat, this feature is designed for simplicity and flexibility.

include::{Boilerplate}[]

include::eda/assembly-eda-user-guide-overview.adoc[leveloffset=+1]

include::eda/assembly-eda-credentials.adoc[leveloffset=+1]

include::eda/assembly-eda-credential-types.adoc[leveloffset=+1]

include::eda/assembly-eda-projects.adoc[leveloffset=+1]

include::eda/assembly-eda-decision-environments.adoc[leveloffset=+1]

include::eda/assembly-eda-set-up-rhaap-credential.adoc[leveloffset=+1]

//include::eda/assembly-eda-set-up-token.adoc[leveloffset=+1]
include::eda/assembly-eda-rulebook-activations.adoc[leveloffset=+1]

include::eda/assembly-eda-rulebook-troubleshooting.adoc[leveloffset=+1]

include::eda/assembly-eda-rule-audit.adoc[leveloffset=+1]

include::eda/assembly-simplified-event-routing.adoc[leveloffset=+1]

include::eda/assembly-eda-performance-tuning.adoc[leveloffset=+1]

include::eda/assembly-eda-event-filter-plugins.adoc[leveloffset=+1]

include::eda/assembly-eda-logging-strategy.adoc[leveloffset=+1]

include::eda/assembiy-eda-user-examples.adoc[leveloffset=+1]