Project : aws-terraform-nginx-ansible-docker-jenkins
list of requirements :
Automate provisioning and configuration of NGINX server in Docker container with SSL certificate in AWS cloud using Jenkins, Ansible, Terraform.
Assumptions:
1. The available free version of Linux
2. The latest available version of NGINX for Linux
3. EC2 instance size is t2.micro (free tier)
4. Must create and use free tier of private AWS account
5. The SSL certificate is self-signed
6. The AWS Security Group is default
Acceptance Criteria:
1. Post-provisioning report demonstrates evidence of
a. No provisioning errors
b. Sequence of provisioning steps
c. Up and running instance of NGINX
d. Listening on ports 80 and 443
e. Response on ports 80 and 443
f. content of active instance configuration file
2. Run automated pipeline 3 times in a row and receive the same result (fully remove provisioned EC2 with components after every deployment, automation is optional for removal)
This one was actually fun to work on. So let's try to meet each of these criteria.
Assumptions to complete this tutorial:
- You have an AWS account set up and have IAM profiles on your local.
- You have Jenkins installed and know how to basically use it
- You have Github (and CLI) with ssh keys set up.
- You have terraform installed
- You have Docker Installed
- Basic knowledge of EC2 and security groups
- A key pair already set up to utilize. In this example, mine is devops.pem
Our project directory will look like this by the end:
Prior to beginning, as always, setup your github repo and get ready to showcase your effort.
Then inside that git repo run the following to get the proper ignore file to ignore the terraform junk:
Now here, you can go with below parts to complete the journey of the project:
Part 1: NGINX, OpenSSL, and the static site all bundled into Docker
Comments
Post a Comment