##Make sure following plugins are installed 0. Create a user ansibleadmin in the jenkins and generate public and private. Replace key contents with your own key in my case Laptopkey
- AWS Steps
- Blue Ocean
- You need GitHub Token
- sudo apt update && sudo apt install software-properties-common -y && sudo add-apt-repository --yes --update ppa:ansible/ansible && sudo apt install ansible -y && ansible --version
- Terraform
- Packer
- Docker
##If you are updating the Worker or Master Count, following chanages needed. 0. Make sure you have changed PACKER_ACTION to NO before pushing the code to remote repo.
- Add the additional worker or master in the ec2.tf.
- Update details.tpl file and update docker_servers group and as well as docker_managers or docker_workers.
- Update localfile.tf depending on master or worker.
- Update the PRODEFAULTAMI & DEVDEFAULTAMI as AMI is already created.
#For Destroying The Environment
- Create a new branch dev-destroy or prod-destroy.
- Change PACKER, TERRAFORM_APPLY & ANSIBLE_ACTION to NO and Change TERRAFORM_DESTROY to YES.
- Update when expression for branch to dev-destroy or prod-destroy commit.
- Push to remote repo and pipeline will run and perform destroy...
Jenkinsfile: Install Multibranch Scan Webhook Trigger for running pipeline based on webhook.