DataDog/dpn

Terraform as the only deployment configuration?

Closed this issue · 2 comments

While working through the existing sandbox apps, I started drawing out all the deployments we support in some apps and that we may want to support going forward:

  • Vagrant (?)
  • docker-compose
  • Kubernetes
  • AWS
  • GCP
  • Azure

And when we pair up all these different deployments with the planned ability to easily halt/clear sandbox apps as well as pause/restart them where we need state, things become complicated with shell scripts, etc.

I was therefore wondering if we should use Terraform to define all our deployment configuration, essentially making it the only common prerequisite regardless where the sandbox should be deployed.

If we decide to go this route, we need to decide on whether we still want the setup.env file (I kinda like it as it makes it easy to reuse API/APP keys for multiple apps) or the setup.sh.

@chrisluekermann go ahead and setup a meeting with myself and anyone else who may be interested in this

8/4/21 Discussion:

  • idea is to ensure that there is clear documentation and a step process in which to get the app working, for example, if the app requires credentials for a specific cloud provider + Datadog API key + some other secret, list all of this information in the documentation and make it simple for the end-user to provide it up front so there are no gotchas
  • be up front about the pricing impact, and how to understand how much it will cost (from a Datadog and Cloud perspective)
  • all default configs should skew towards free tier for the cloud provider
  • need to find the right balance with how to setup things with Terraform
  • how should we split up the Terraform?
    • write an abstraction? - YES module
    • write 4 separate bits of Terraform code, one for each environment? - YES pick one to start with, and then build from there
  • idea will be to a) clone this repo, then b) run terraform * commands to init, plan and apply the config
  • at the end of the apply, all information needed to connect to the application will be output to the screen for ease of testing

Discussion Results:

  • Write a Terraform Module for each Sandbox app, pick one to start with
  • each sandbox app will need code written for each provider, we will pick one to start with
  • we will start with the voting app