Company would like to manage the blog easier and everything automated. Infrastructure as a code is one part that must be done first on adopting DevOps works. And it requires knowledges to implement all things to automated and centralised. The company is looking for a DevOps Engineer. And prepare a test for a new DevOps Engineer candidate.
So, Here I go. I'm asked to create a deployment script to manage the blog deployment.
-
Python
python >= 2.6
-
Ansible
Required ansible, can be installed from pip
$ sudo pip install ansible -
Python Modules
- dopy
sudo pip install dopy
ansible-playbook -i inventory.ini launch_droplet.yml --extra-vars="droplet_name=blog droplet_size=1gb digitalocean_token=$YOUR_TOKEN_API" --tag launch_droplet
ansible-playbook -i inventory.ini blog.yml
ansible-playbook -i inventory.ini blog.yml --tag deploy-compose --extra-vars="docker_compose=blog"
- I'm Ready...