This section contains the various approaches to get started with Redhat Ansible. This includes the various flavors of Ansible including Redhat Ansible Tower.

What You'll Learn

In this exercise, we will deploy the OneAgent to a Linux instance with Ansible.

Based off our Dynatrace Ansible Github, you can rollout Dynatrace Oneagent easily across on Linux and Windows Operating Systems with different available configurations and ensures the OneAgent service maintains a running state. It also provides the tasks to interact with the various OneAgent configuration files.

Following the steps from our documentation, we will use an Ansible collection to orchestrate OneAgent deployment.

You can also use other Ansible playbooks examples can be seen here

Installing Ansible

The following are steps to install Ansible in your Linux host.

Use the command below

wget -O- https://raw.githubusercontent.com/Dynatrace-APAC/Workshop-Advanced-Observability/master/setup_ansible.sh | bash

You should see that it's successfully installed along with it's dependencies

ansible 2.9.13
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/advanced-observability-workshop/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Jul 20 2020, 15:37:01) [GCC 7.5.0]

Install OneAgent with Ansible

Following the steps in Dynatrace:

ansible-galaxy collection install dynatrace.oneagent

This will install dynatrace.oneagent collection that consist of a single role that deploys OneAgent using dedicated configuration and ensuring the OneAgent service maintains a running state. For more information, see Using collections in Ansible documentation. You can also find the latest version at Ansible Galaxy

Creating the PaaS Token

Following the steps in Dynatrace:

Deploy

Running the playbook

Using the example playbook below, replace the dynatrace_environment_url and dynatrace_paas_token variables to install OneAgent. You can tweak the command with a text editor eg. Notepad++

EXAMPLE

---
- hosts: all
  become: true
  roles:
    - role: Dynatrace.OneAgent
  vars:
    dynatrace_environment_url: {your-environment-id}.live.dynatrace.com
    dynatrace_paas_token: {your-paas-token}

ansible-playbook dt-oneagent-install-linux.yml

Deploy

Validate the installation

Go to Deployment status on the left navigation. You should see OneAgent installed on the current host.

Deploy

Deploying applications efficiently requires using an automated delivery pipeline. Dynatrace tracks all key metrics through the various CI/CD stages into production. Through understanding the feedback loop, you can stop faulty builds before they reach production or even self-remediate issues based on problems which Dynatrace detects. This allows deploying software faster with higher quality.

There are various kinds of use cases for Ansible playbooks:

Example of these playbooks could be found here

Dynatrace's DAVIS AI-engine will be able to detect problems and trigger the specific and appropriate responses based on playbooks.

Problem-ansible

In the video below, we also demonstrate and explore how Ansible and Dynatrace can be used together to automate deployments and to build auto-remediation workflows which enable self-healing applications.

To experience in Self-Healing as a Service, you could refer to our Autonomous Cloud lab

Dynatrace is an all-in-one platform that's purpose-built for a wide range of use cases.

Deploy

Infrastructure Monitoring

Applications and Microservices

Digital Experience Monitoring (DEM)

Digital Business Analytics

Cloud Automation

The above use cases are setup as labs which you can run through:

These are also conducted virtually as Hands-On Workshops.

Addtional Resources