1. Configure
Prepare Terraform, cloud provider, and authentication.
Pre-requisites
- Terraform CLI (0.14.9+) installed
- Dynatrace tenant
Clone Repository
-
Clone the ACE-Box repository:
git clone https://github.com/Dynatrace/ace-box.git
Configure Cloud Provider
- Choose your preferred cloud provider. The ACE-Box will be deployed on a standard compute resource (VM).
- AWS
- Azure
- GCP
- Own VM
AWS Requirements
- AWS Account
- AWS CLI (AWS SDK) installed
- AWS Account credentials (usually set up and sourced by AWS SDK)
AWS Deployment
-
Navigate to the AWS folder:
cd terraform/aws/
-
Configure the AWS CLI from your terminal. Follow the prompts to input your AWS Access Key ID and Secret Access Key:
aws configure
Note: The configuration process stores your credentials in a file at
~/.aws/credentials
on macOS and Linux, or%UserProfile%\.aws\credentials
on Windows.
Azure Requirements
- Azure Account
- Azure CLI
Azure Deployment
-
Navigate to the Azure folder:
cd terraform/azure
-
Sign in to the correct subscription using the Azure CLI:
az login
Note: If you have multiple subscriptions, set the default one using
az account set --subscription YOURSUBSCRIPTION
.
GCP Requirements
- GCP Account
GCP Deployment
-
Navigate to the GCP folder:
cd terraform/gcloud
-
Ensure you're authenticated to use GCP. The easiest way is through the
gcloud
CLI:gcloud auth application-default login
Note: More information and alternative options can be found in the Terraform provider docs.
Note: We recommend deploying the ACE-Box on one of the cloud providers (AWS, Azure, or GCP). Bringing your own Ubuntu VM has not been tested but should be possible.
Own VM Requirements
- An
Ubuntu 20.04
virtual machine (Ubuntu 20.04 LTS
"minimal" tested) - Repository cloned to VM
- At least
16GB RAM
and8-cores CPU
- A public IP address
- Ports 80 and/or 443 exposed
- A non-root user to run the script actions (e.g.,
ace
)
Own VM Deployment
-
Run the initialization script. This will install all necessary dependencies, including the ACE-CLI:
cd user-skel
./init.sh -
Prepare the ACE-Box by running the ACE-CLI and providing the required values when prompted:
ace prepare
When bringing your Own VM
, you don't need to deploy anything with Terraform. You can skip the Initialize Terraform
and 2. Deploy
steps and jump straight to Enable Use Case.
Initialize Terraform
-
Initialize Terraform using the following command:
terraform init
Configure terraform.tfvars
-
In the
terraform/<your_cloud_provider>
folder, create aterraform.tfvars
file with the following structure (the next step will guide you on how to fill the placeholders):dt_tenant = "https://<tenant_id>.live.dynatrace.com"
dt_api_token = "<dt_api_token>"
extra_vars = {
dt_environment_url_gen3 = "https://<tenant_id>.apps.dynatrace.com"
dt_oauth_sso_endpoint = "https://sso.dynatrace.com/sso/oauth2/token"
dt_oauth_client_id = "<client_id>"
dt_oauth_client_secret = "<client_secret>"
dt_oauth_account_urn = "urn:dtaccount:<id>"
} -
Create the respective Dynatrace tokens with the following scopes for each: dt_api_token & dt_oauth_client_secret. Then add them into the placeholders within your
terraform.tfvars
.Note: It is recommended to set sensitive variables as environment variables. More information can be found in the Terraform documentation here.
-
Configure cloud provider-specific variables if needed, adding them to the
terraform.tfvars
.
- AWS
- Azure
- GCP
No extra variables needed for AWS. 🙂
azure_location = "" # Azure location where you want to provision the resources
azure_subscription_id = "" # Azure subscription ID in which you want to provision the resources
gcloud_project = "<your-gcloud-project>" # GCP Project you want to use
gcloud_zone = "<your-gcloud-zone>" # Zone where you want to provision the resources. Check out https://cloud.google.com/compute/docs/regions-zones#available for available zones
Configuration Ready!
Well done! The next step is to apply the configuration and deploy the ACE-Box.