Start automating demo infra provisioning.

This commit is contained in:
2023-03-10 10:24:23 +13:00
parent ee142acc6e
commit 429ce73a1b
16 changed files with 485 additions and 1 deletions

View File

@ -0,0 +1,36 @@
#+TITLE: Deploying demo infrastructure
#+AUTHOR: James Blair <jablair@redhat.com>
#+DATE: <2023-03-10 Fri 10:15>
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 [[https://www.ansible.com/][ansible]] using the [[https://www.terraform.io/][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.
#+NAME: Create secret env file
#+begin_src tmate
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
#+end_src
Once secrets have been defined run the code block below to install our dependencies and run the ansible playbook that will deploy our infrastructure.
#+NAME: Install dependencies and run
#+begin_src tmate
# 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
#+end_src