Files
talks/2023-03-15-wgtn-ansible-meetup/0-deploy-demo-infra/README.org

1.4 KiB

Deploying demo infrastructure

This guide will outline the steps to follow to deploy the infrastructure required to run the demo for this talk. Infrastructure provisioning is performed via ansible using the terraform collection.

To run the demo we need one rhel virtual machine, these machines will run our microshoft kubernetes cluster which will have our ansible automation platform and jira pods deployed.

To get started we need to define some credentials into an .env file. Note that these credentials are ignored in the repo .gitignore file for security reasons.

cat << EOF > .env
export TF_VAR_subscription_pw=placeholder

export TF_VAR_aws_region=ap-southeast-2
export TF_VAR_aws_access_key=placeholder
export TF_VAR_aws_secret_key=placeholder
EOF

Once secrets have been defined run the code block below to install our dependencies and run the ansible playbook that will deploy our infrastructure.

# Source secrets
source ../.env

# Install certified terraform collection
ansible-galaxy collection install cloud.terraform
ansible-galaxy collection install awx.awx

# Run the deploy playbook
ansible-playbook -i localhost demo-infra-deploy.yaml