• Home
  • Platform modules
  • Cloud Automation
  • Lifecycle orchestration

Lifecycle orchestration

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

  1. Consult the requirements.
  2. Authenticate against the Cloud Automation cluster.

Create a project with a service lifecycle

  1. Create a project.

Note: 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.

  1. 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:

json
apiVersion: "spec.keptn.sh/0.2.2" kind: "Shipyard" metadata: name: "shipyard-sockshop" spec: stages: - name: "dev" sequences: - name: "delivery" tasks: - name: "deployment" - name: "test" - name: "evaluation" - name: "release"
  1. Create a service.

Note: 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 the webhook.conf file to false.
  • 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:

  1. You subscribe to a task via the webhook service.
  2. The webhook service forwards the task to the external tool.
  3. The external tool sends back the finished event.
  4. Cloud Automation continues lifecycle orchestration.

Silent mode activation

In silent mode:

  • You activate the webhook subscription for any task event with started or finished status.
  • Cloud Automation is listening to events and then calling webhooks to forward them to external tools.

Workflow:

  1. Cloud Automation triggers, for example, a quality gate evaluation.
  2. The quality gate sends a finished event containing the result.
  3. You subscribe to this finished event via the webhook service.
  4. 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.

  1. In the Cloud Automation bridge, open the user menu in the upper-right corner.
  2. Select Keptn API to open the Cloud Automation Swagger UI.
  3. In Select a definition, select api-service.
  4. Authenticate with your API token. See Authentication for details.
  5. Scroll down to Event and select POST.
  6. In Parameters, select Try out.
  7. For Body, enter the details as below:
json
{ "data": { "project": "<your_project>", "service": "<your_service>", "stage": "<your_stage>" }, "source": "api", "specversion": "1.0", "type": "sh.keptn.event.<your_stage>.<sequence_name>.triggered" }

Note: Be sure to replace <your_project> , <your_service>, <your_stage>, and <sequence_name> with your own values.

  1. Select Execute.
Related topics
  • Cloud Automation

    The capabilities of Dynatrace Cloud Automation