Automated Menu Driven Program using Python

Pranav Gupta
4 min readNov 9, 2020

As history is our evidence humans have strived to automate tasks to increase efficiency and performance dating back to the first automated mill back in 1771. Now coming back to the 21st century we have technologies like Docker, Hadoop, Cloud Computing which bring in a suite of useful features. It takes a specialisation in such technologies to operate them but automating them all using a simple Python script? Sounds like magic, it has a certain ”wow” factor to it, doesn’t it?

Sure, we can write commands and setup the Hadoop clusters, or manually create partitions, or even set up an AWS instance. But instead of redundantly doing the same job, we can simply with a touch of a key do all of that! It sounds very convenient but it does require a lot of practice and right education to assimilate all this into one single platform. Along with my teammates, we have created a menu-driven program which gives the user the power to set up and manage Linux operations, Docker, Hadoop, AWS and the list goes on as we find more interesting things to automate…

The application is contained in the python_menu.py python file, as we run the python script the menu appears containing automation options for Linux, Hadoop, AWS and Docker.

Linux(RHEL 8 Automation)

As we proceed to the Linux Automation option the application unfolds multiple RHEL(world’s leading enterprise Linux platform) operations to choose from such as creating a directory, adding a new user, clearing cache and many more.

Hadoop Automation

Apache Hadoop is a framework that allows for the distributed processing of large data sets across clusters of computers solving the problem of Big Data. This application provides operations such as starting the Name Node & the Data Node service, Uploading & removing files from the Hadoop filesystem and many more such operations.

AWS Automation

Amazon Web Services (AWS) offers Cloud Computing Services that are used by the majority of companies around the globe. The automation app supports launching an EC2 instance, creating a security group, creating & attaching an Elastic Block Storage(EBS) and other options including S3 storage services.

Docker Automation

Docker is a powerful tool that utilizes the Container technology to set up and boots an OS in seconds and is used in almost all IT and cloud companies. We can start, stop, list and delete the containers using the automation app by simply typing the option. For ease, we have created a WebUI for the docker interface. We can see the implementation on RHEL 8 as shown in the video demonstration:

Learning is a never-ending process and as we learn new technologies we will keep increasing and improvising the automation app. The aim of this program is to bring the best of the technologies under a single menu and automate the redundant parts of the process so we save time, improve efficiency and focus more on creative development.

Team Members contributing and making this app possible:

Saurabh Rohankar — https://www.linkedin.com/in/saurabh-rohankar-129877155/

Kshitiz Saini — https://www.linkedin.com/in/kshitizsaini113/

Pranav Gupta — https://www.linkedin.com/in/pranav-gupta98/

Shalini Negi — https://www.linkedin.com/in/shalini-negi-7b808a1a5

Github Link:

https://github.com/kshitizsaini113/Team-17.24

Thank You for your invaluable time! Feel free to follow this space for more such exciting projects and ideas! Share and clap if you enjoyed reading, and you can also connect with me on LinkedIn for any doubts you may have.

--

--

Pranav Gupta

An aspiring Data Scientist, integrating technologies as I continue to explore!