This repository is the near-simplest example of deploying an provisioning a web server on Amazon Web Services (AWS), using Terraform, Ansible and Terraform Inventory.
- P.S.: It is incomplete. Just it's working OpenVPN. You will need execute manually:
git clone
https://pb-dc.alm-latam.accenture.com/source/terrAS.git
cd terrAS/terraform/
vim vars.tf (Insert your credentials)
cd terrAS
./deploy.sh
This repository sets up:
- A VPC
- A subnet
- An internet gateway
- Two security groups
- An SSH key pair
- A publicly-accessible EC2 instance
- Within the instance:
- OpenVPN
- Docker {Portainer (SonnarQube and Selenium)}
- Install the following locally:
- Terraform
- Terraform Inventory
- Python (see requirements)
- pip
- Set up AWS credentials in
~/.aws/credentials
.- The easiest way to do this setting up the AWS CLI.
- Ensure you have an SSH public key at
~/.ssh/id_rsa.pub
.
./deploy.sh
More information about the AWS environment variables. If it is successful, you should see an address
printed out at the end. Visit this in your browser, and the page should say "Welcome to nginx!"
./deploy.sh
is idempotent.- Information about overriding the Terraform variables.
cd terraform
terraform destroy