Automation meets Cinema

Automation meets Cinema

Christopher Nolan's new movie Oppenheimer is on the verge of its release. We are all familiar with his famous works such as Inception, Interstellar, and Dark Knight. I am going to talk about one of his finest works to date, i.e. The Prestige but while integrating his idea with one of my projects. The main plot of the project revolves around 2 magicians who have their own take on magic, but, every magic trick consists of?three parts, or acts. The first part is called :


THE PLEDGE: The magician shows you something ordinary: a deck of cards, a bird, or a man. He shows you this object. Perhaps he asks you to inspect it to see if it is indeed real, unaltered, and normal. But of course... it probably isn't.

Created 3-4 EC2 t2.micro instances using the Amazon Machine Image as Ubuntu, designated one of them as the host/master server and the others are termed as nodes. The host server will eventually roll out the updates and changes to the nodes using Ansible which is an Infrastructure as a Code tool. After the instances are up and running, following commands are used to install Ansible :

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible        


The following command is used to export the key-pair login file to the host server:

"scp -i <key-pair.pem> key-pair.pem [email protected]:/home/ubuntu/.ssh"

We need to include the host servers' IP Addresses and the key that was imported earlier in the hosts file using the following command :

sudo nano /etc/ansible/hosts        

And give the hosts file read access using :

chmod 600 <key-pair.pem>        


The second act is called THE TURN: The magician takes the ordinary something and makes it do something extraordinary. Now you're looking for the secret... but you won't find it, because of course you're not really looking. You don't really want to know. You want to be fooled.

So, the stage is set for the act but we should perform a final check, just to be sure. Using the following command :

?ansible servers -m ping        

All the servers should return a "pong" to your request.

Now, before creating the playbooks, we can perform some actions using the module (-m) and the (-a) tag such as :

ansible servers -a "sudo apt update"        

Accordingly, this command rolls all the available updates in all the node servers. You can try using other modules from the given link :

Inventories are created namely?development?and?production?to group the remote servers accordingly and also to deploy certain actions according to the need.


But you wouldn't clap yet. Because making something disappear isn't enough; you have to bring it back. That's why every magic trick has a third act, the hardest part, the part we call THE PRESTIGE.

Now, the final part i.e. rolling out the actions to the required servers.

ansible-playbook <playbook_name>.yaml        

You can now check the required server instances to check if the playbooks are working properly.

Checkout my GitHub Repo:

Thought of sharing this idea, hope you like it, don't forget to comment on your favorite Chris Nolan movie, and also are you going to watch Oppenheimer?

Shubham Londhe

TrainWithShubham

TWS community builders who are leading "Seekho aur Sikhao"?:

Ali Sohail?Aman Pathak?Mahesh Mahajan?Lovely Kumari?Rushikesh Mashidkar????Prasad Suman Mohan?Ritul Gupta ?????Safia Khatoon?Purushotam Sharma???@anup ghatikar?Chetan R ??@Vrishni shree V B?Sai Kiran?Anish Dubey?Vishal Saxena?Varsha Verma ???Sanket Bhalke?Akansha Waghole?Mirza Sadique?Vipul Chaudhary?Rajdeep Pal?Samyak Jain ???Rahul Kumar Tiwari

#trainwithshubham?

#SeekhoAurSikhao?

#TWSCommunityBuilders?

Mahesh Mahajan

Dev+Ops ?? Engineer & Learner | TWS Community Builder | 5? Python ?? HackerRank

1 年

Nice, creativity is the thing which differs you from others ?? Btw Inception, Interstellar, and Dark Knight movies are in my favourite list ??

Aman Pathak

DevOps & Cloud Engineer | AWS Community Builder | 2x AWS Certified | CKA Certified | Azure | Terraform | Kubernetes | Docker | Ansible | CI/CD Jenkins | GitLab

1 年

This is quite interesting to elaborate things by this kind of creativity Keep going Rajdeep ?

Ali Sohail

??? People first "Cloud Whistler" Visionary Cloud Advocate | Elevating IT with Resilient, Cost-effective Solutions | Driving Efficiency & Scalability | DevOps Automation

1 年

Thank you for the shout out, lets learn together and achieve top results ??

Purushotam Sharma??

DevOps Engineer @ Credence Technologies |AWS| TWS Community Builder | Docker| Freelancer|

1 年

Keep it up Rajdeep Pal

Gauri Yadav

Docker Captain @Docker.Inc ? Google Program Mentor ? Cloud Intern @Gavedu ? DevSecOps Culture ? Kubernetes ? 3x Azure Certified ? Technical Speaker ??

1 年

Awesome Rajdeep Pal

要查看或添加评论,请登录

社区洞察

其他会员也浏览了