- Create an account in the DigitalOcean(DO) and get do_token
- Register in Terraform Cloud(TC)
- Create a DataDog(DD) account
- Generate and store
datadog_api_url, datadog_api_key, datadog_app_key - Add
do_token, datadog_api_url, datadog_api_key, datadog_app_keyinto Terraform Cloud->Variables - Create Terraform Cloud variables for
PROJECT_NAMEandDOMAINwith expected values
- Clone this repo
- Run
make prepare. In the input you have to pass the token from Terraform Cloud
make setupwill provision all required infrastructure and software on servers- Previous command will create
inventory.ini(IP addresses for webservers host) andvault_generated(A vault with DB credentials)
make deploy
Step 2, 3, 4 can be replaced with make all
Application will be deployed at increadeble.tech. I've deployed it to increadeble.tech.
Terraform
- Setup infrastructure:
make setup - Destroy destroy:
make destroy
Ansible
- Encrypt webservers vault:
make encrypt - Decrypt webservers vault:
make decrypt - Clean up inventory and vault files:
make clean-up-workdir - Install roles and collection:
make prepare - Setup webservers:
make setup - Deploy Redmine app:
make deploy
Common
- setup infrastructure and deploy app:
make all