This template is an opiniated starting point for deploying Ansible Automation Platform with Terraform.
The features include:
- Dev env managed w/ mise
- Secrets ecnrypted w/ sops. No plain text secrets in your git repository
- Infrastrcture provisioned w/ Terraform on AWS
- Ansible Automation Platform installation using Ansible
- Comes with pre-configured settings for Visual Studio Code
There are 4 stages outlined below for completing this project, make sure you follow the stages in order.
- Configure your AWS profile and credentials in ~/.aws/credentials.
-
Create a new public repository by clicking the big green "Use this template" button at the top of this page.
-
Use
git cloneto download the repo you just created to your local workstation andcdinto it. -
Install and activate mise following the instructions for your workstation here.
-
Use
miseto install the required CLI tools:📍 If
miseis having trouble compiling Python, try runningmise settings python.compile=0and try these commands againmise trust mise install mise run deps
Important
The config.sample.yaml file contains config that are vital to the template process.
-
Generate the
config.yamlfrom the config.sample.yaml configuration file:📍 If the below command fails
miseis either not install or configured incorrectly.task init
-
Fill out the
config.yamlconfiguration file using the comments in that file as a guide. -
Template out all the configuration files:
📍
task --listgives you a full list of tasks if you want to run some steps manually.task configure
-
Push your changes to git:
📍 Verify all the
.sops.*files are encrypted with SOPSgit add -A git commit -m "chore: initial commit :rocket:" git push
📍 You can run task deploy instead of executing every step manually.
-
Proviosion infrastructure on AWS:
task deploy:terraform-apply
-
Configure the VMs and install Ansible Application Platform
📍 Installation of Ansible Application Platform takes a lot of time. It's normal to wait for 30-40 minutes on the "Run Ansible Automation Installer" step with no progress.
task deploy:ansible-apply
-
Get host information to add to /etc/hosts
task deploy:output-results
There might be a situation where you want to destroy your cluster. The following command will unregister your VMs and remove all provisioned cloud infrastructure.
task nukeThis template has been heavily inspired by onedr0p's cluster-template and mikhailknyazev.