Tools Used: AWS EC2, Terraform, Ansible and Shell script
Step by step execution:
- Run terraform apply to generate AWS Ec2 instance with t2.micro
- Userdata initiates the install.sh which installs Ansible,downloads playbooks from s3 and executes the apache_install_playbook.yml
- Apache is installed, Started
- ssl_module is installed
- Creates an openssl self signed key and certificate
- Ansible task to copy index.html to http document root which displays SRE_CHALLENGE.
- httpd.conf is updated to listen at port 443 and redirect http to https.
- Automated test to verify that the port is listening at 443 is included in Ansible playbook.
- Step by step execution is captured in install.log for reference purposes.