Cloud Automation Lifecycle orchestration
Our Site Reliability Guardian incorporates the Cloud Automation use cases. To ensure an optimal experience, we recommend upgrading your environment or contacting your account team for assistance.
For more information, see Upgrade from Cloud Automation to Site Reliability Guardian.
Dynatrace Cloud Automation can orchestrate different delivery or operational processes that are part of an application's lifecycle. Cloud Automation also provides an easy, event-based integration point for external tools (such as testing services, notification services, and incident management services) via webhooks. With external tool integration, you can set external tools to send events to Dynatrace, or set Dynatrace Cloud Automation to send events to external tools, which can then execute certain tasks in response.
To integrate Dynatrace Cloud Automation with external tools, follow the steps below.
Dynatrace Cloud Automation is licensed based on the consumption of Cloud Automation units (CAUs). For details, see Cloud Automation monitoring (CAUs).
Prerequisites
Create a project with a service lifecycle
-
Each Cloud Automation project requires a Git repository to manage configurations such as SLI and SLO files.
We recommend that you provide your Git repository, which is set as an upstream repository when creating a project. If a Git repository cannot be provided, Cloud Automation can auto-provision a repository for a maximum of 20 projects.
-
In the
shipyard.yaml
configuration file, define the task sequences (in other words, the lifecycle) that need to be executed for a service.Example configuration:
1apiVersion: "spec.keptn.sh/0.2.2"2kind: "Shipyard"3metadata:4 name: "shipyard-sockshop"5spec:6 stages:7 - name: "dev"8 sequences:9 - name: "delivery"10 tasks:11 - name: "deployment"12 - name: "test"13 - name: "evaluation"14 - name: "release"
After creating a project, all services that belong to this project share the same lifecycle.
Integrate external tools with webhooks
To integrate with external tools, you need to subscribe your external tools to webhooks for specific events.
For instructions on how to integrate your tools using webhooks, see Create a Webhook integration.
You can activate a webhook subscription interactively or in silent mode.
Interactive mode activation
In interactive mode:
- You activate the webhook subscription for any task event with
triggered
status. - You need to set the
sendFinished
flag in thewebhook.conf
file tofalse
. Once the triggered event is sent out, the webhook is called. This activates the integrated tool to execute the task.
- When the execution is finished, the external tool needs to send Cloud Automation an event of type
finished
.
Workflow:
You subscribe to a task via the webhook service.
The webhook service forwards the task to the external tool.
- The external tool sends back the
finished
event. Cloud Automation continues lifecycle orchestration.
Silent mode activation
In silent mode:
- You activate the webhook subscription for any task event with
started
orfinished
status. Cloud Automation is listening to events and then calling webhooks to forward them to external tools.
Workflow:
Cloud Automation triggers, for example, a quality gate evaluation.
- The quality gate sends a
finished
event containing the result. - You subscribe to this
finished
event via the webhook service. The webhook service forwards it to the external tool.
For integration setup and configuration examples, see Slack integration.
Trigger the lifecycle
You can trigger the task sequences (the lifecycle) of a service using the REST API.
-
In the Cloud Automation bridge, open the user menu in the upper-right corner.
-
Select Keptn API to open the Cloud Automation Swagger UI.
-
In Select a definition, select api-service.
-
Authenticate with your API token. See Authentication for details.
-
Scroll down to Event and select POST.
-
In Parameters, select Try out.
-
For Body, enter the details as below:
1{2 "data": {3 "project": "<your_project>",4 "service": "<your_service>",5 "stage": "<your_stage>"6 },7 "source": "api",8 "specversion": "1.0",9 "type": "sh.keptn.event.<your_stage>.<sequence_name>.triggered"10}
Be sure to replace <your_project>
, <your_service>
, <your_stage>
, and <sequence_name>
with your own values.
- Select Execute.