Provisioning of cloud infrastructure, especially within large environments, requires a standardized approach to scalability, compliance, and troubleshooting. AWS CloudFormation provides a common language for modeling and provisioning resources in the AWS Cloud. Dynamic cloud operations call for an application performance management tool that can monitor individual customer workloads. However, deploying Dynatrace OneAgent to hundreds or thousands of hosts in AWS environments can be tricky. To accomplish this, customers either install OneAgent manually or rely on external tools that have access to production hosts.
Easily automate EC2 instrumentation with the AWS Dynatrace OneAgent Installer
The new AWS CloudFormation Registry allows Dynatrace to offer an initial set of third-party resources that can assist you in automated OneAgent installation. But now you can use the AWS Dynatrace OneAgent Installer to automatically deploy OneAgent on newly created EC2 hosts.
How to use the AWS Dynatrace OneAgent Installer
The first step is to register a new CloudFormation resource (the AWS Dynatrace OneAgent Installer). Using command line interface (CLI), run the following command:
aws cloudformation register-type \
--region us-east-1 \
--type-name "Dynatrace::Installer::Agent" \
--schema-handler-package "s3://aws-dynatrace-oneagent-installer/dynatrace-installer-agent-handler-1.0-SNAPSHOT.zip" \
As it’s an asynchronous call, you can track the progress of the registration until a “success” message is returned with:
aws cloudformation describe-type-registration \
--region us-east-1 \
Then you can add the AWS Dynatrace OneAgent Installer to your CloudFormation stack by specifying the following parameters in your template:
- Hostname of your Dynatrace Cluster (could be SaaS or Managed)
- TenantId (the ID of your Dynatrace environment)
- ApiToken for accessing the Dynatrace API. Tokens can be obtained from the Dynatrace UI at Settings > Integrations > Dynatrace API.
Example #1: Deploy OneAgent in a Dynatrace SaaS environment
Below is a sample YAML template for deploying OneAgent on a t2.micro EC2 host in a Dynatrace SaaS environment. Note that values in bold need to be adjusted to your environment.
Example #2: Deploy OneAgent in a Dynatrace Managed environment
AWS Dynatrace OneAgent Installer capabilities
The Dynatrace Installer currently supports OneAgent installation for Linux systems, but it’s fully extensible. Expanding it to handle Windows or even Environment ActiveGate installation won’t pose much of a challenge for developers. You can also build the resource from the source code using a Java environment (cfn tool, Maven, JDK, git CLI, etc) with the following steps:
- Clone git repository:
git clone https://github.com/mnalezin/DynatraceInstallerAgent
- Create a package with Maven:
- Submit the resource:
Feel free to experiment with the new resource provider and contact us with questions and comments.
- Resource schema in S3: s3:
- GitHub repository: https://github.com/mnalezin/AWSDynatraceOneAgentInstaller