Implementation of an E-Commerce System on AWS in an automated way using Terraform and Ansible
Project description:
In another project based in a real-world scenario, I worked as Cloud Engineer using DevOps, where I created and implemented an e-Commerce MVP (Minimum Viable Product) on AWS in less than 2 hours and in an automated way using Terraform and Ansible (Infrastructure as Code — IaC).
I provisioned the infrastructure in an automated way using Terraform and Ansible to automate the configuration management process, software installation and package management of the EC2 instance. I also used Magento, PHP, MySQL, and Redis to complete this project.
Deployed EC2 instance in AWS using Terraform. Firewall/security rules are in place so that Client can access e-commerce website after it is up and running. Used Ansible to install the software stack in fully automated way inside a EC2 instance that is created using Magento account to download the software we need.
Ansible uses a playbook to run as root user running locally on EC2 instance the tasks to install the apache webserver, php, magento, mysql, redis running yaml updated with IP address and public and private keys. Roles in Ansible which are grouping of tasks that use a module (for example: Installing of mySQL →Creating mySQL configuration file →Starting of mySQL service →Create DB user for Magento →Create DB Schema for Magento) inside of each folder which are a set of tasks need to be run to install each software and configure it in a fully automated way during provisioning process. Main playbook which is at root level will exceute all the roles which has all the tasks. The Roles are ordered and everything is taken care of by Ansible in the order of role to run.
Below are few screenshots of e-commerce website that was up and running in just 10 minutes after Ansible completed running all the roles which is amazing!!!
EC2 Instance on AWS:
Click on customer view as Admin to see how the customer sees it.