Skip to content

lgdd/storedog-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storedog Terraform

Terraform scripts to provision Datadog's Storedog demo on AWS.

Methods

Docker Compose on EC2

Tools

The scripts have been tested with:

Environment Variables

Setting the following environment variables make running terraform plan/apply/destroy commands smoother (otherwise the command ask you to manually enter the value of each parameter):

  • TF_VAR_my_public_ip_cidr
    • The value should come from the result of curl -s checkip.amazonaws.com | xargs -I {} echo "{}/32".
  • TF_VAR_ec2_key_name
  • TF_VAR_dd_api_key
  • TF_VAR_dd_app_key
  • TF_VAR_dd_storedog_rum_app_id
  • TF_VAR_dd_storedog_rum_client_token

Optional: the dd_site variable is default to datadoghq.com, but you can change it if using a different site by setting the TF_VAR_dd_site environment variable.

Debug

After running terraform apply, the outputs should give you the public IP/DNS of the EC2 instance. You should be able to connect to your instance with ssh -i ~/.ssh/YOUR_KEY_PAIR ubuntu@YOUR_EC2_IP_OR_DNS.

It can take a few minutes to start, so if you want to check the progress and see if there's any error with the cloud init script (i.e. user_data.sh), you can run the command tail -f /var/log/cloud-init-output.log.

If the cloud init script ran successfully, you can go to ~/storedog and run sudo docker compose logs -f to check the logs of the Storedog services (or a specific service like the Datadog agent with sudo docker compose logs -f dd-agent).

Datadog Tags

  • env: value is always storedog.
  • host: value is given by the Terraform output instance_name and prefixed with storedog-.

About

Terraform scripts to provision Datadog's Storedog demo on AWS. See https://github.com/DataDog/storedog.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •