Lab Exercise
We want to automate the deployment of MediaWiki using.
- CFT with Any Configuration Management Tool (Only for AWS). If any -- Choose only one of your comfort.
- The above automation should support CI/CD practices of chosen deployment style like Rolling Update or BlueGreen Deployment. (Optional)
This Technologies used in this deployment is
- Yaml Scripting
- Python
- Shell Scripting
- Cloud Formation Template
- Ansible Playbooks
- Blue-Green Deployment
- Rolling Update Template
- blueGreen.yaml - Cloud Formation template for blue green deployment.
- rollingUpdate.yaml - Cloud Formation template for rolling deployment.
- parameters.json - The parameters file for blue green deployment.
- mediawikiInstallationSteps.txt - Manual steps for mediawiki installation.
- dynamicInventory.py - To create dynamic Inventory based on the ec2 tags.
- playbook.yaml - Ansible playbook for mediaWiki installation.
- seup.sh - Setup file for deployment.
- To complete the deployment in a single step
sh setup.sh
- To Deploy the Cloud Formation Stack using cli
echo "Creating the stack"
aws cloudformation create-stack --stack-name demo-stack --template-body blueGreen.yaml --parameters parameters.json
- To Create the inventory file dynamically
echo "Dynamically create the invertory file for ansible"
python3 dynamicInventory.py demo-stack us-east-1
- To install mediaWiki using ansible.
echo "Run Ansible Playbook to deploy mediaWiki"
ansible-playbook playbook.yaml -i invertory.txt
- We can use userdata to install the mediaWiki but the creation of userdata becomes more complex and there will be more chances to fail in b/w the run as it contains many steps.
- Due to time contraint the deployment is script is written as possible as i can. With more time we can enhance the script and modularize it.