Automating processes using Python
What is Automation?
It is the use of technology to accomplish a task with as little human interaction as possible.In computing, automation is usually accomplished by a program, a script, or or other processing tasks.
Why use python for automation?
As it’s a powerful open-source language which is capable of running a wide range of applications when need to, It can perform any task which we assume a script can be used for such as voice assistant , general-purpose scripts, web frameworks , back end and so on~
When should you automate?
Any task that’s performed more than once can be automated, even if it’s a simple task that costs a couple of seconds. Automation can save us a lot of time by completing time is reduced to one second.
Task Objective:
🔹building a Python Menu Program which can automate technologies like AWS, Docker, Hadoop,Web Servers and LVM Partitioning.
CLI Python Menu Program:
→HADOOP:
Apache Hadoop is an open source framework that is used to efficiently store and process large datasets ranging in size from gigabytes to petabytes of data. Instead of using one large computer to store and process the data, Hadoop allows clustering multiple computers to analyze massive datasets in parallel more quickly.
On choosing 1 you’re greeted with the sub-menu for Hadoop
It consists of :
Installation of Hadoop software and Java supported version for Hadoop
NameNode , DataNode Configuration
Report : outputs a brief report on the overall HDFS filesystem
JPS(Java Virtual Machine Process Status Tool) for NameNode and DataNode Status
Stopping the nodes
exiting back to main menu
My IPs:
On going through the process of setting up Hadoop we can test for the connection also by using the IP of the name node along with the port 50070 for the WebUI
Demonstration below for the features 👇
Creating single logical volumes of multiple physical volumes or entire hard disks (works in a similar fashion to RAID 0)allowing for dynamic volume resizing.
The menu consists of the following features :
The features include:
Check Disk Info
Creating a Physical Volume
Creating an Volume Group
Creating,Formatting, Mounting LVM
Exteding LVM
Demonstration below for the features 👇
This menu consists of :
Installing AWSCLIV2
Setting-up AWS CLI
Signing into CLI
Creating a Key-Pair
List current VPC-ids & Subnet-ids
Create an SG
Adding Inbound Rules to your SG
Launch an EC2 Instance
Listing active Instances
Connecting to your Instance
Pause active Instance
Terminate active Instances
Launching an EBS Volume
Listing all EBS Volumes
Attaching a Volume to Intance
Creating an S3-Bucket
Uploading File to your S3-Bucket
Creating a CloudFront Distribution
For more on AWSCLI you can read my previous article on AWSCLI
Demonstration below for the features 👇
→Docker Configuration:
On picking option 4 we get into the Docker sub-menu , in this we get to perform container orchestrations and operations along that line..
Demonstration below for the features 👇
→Web Server Configuration:
A web server is server side software dedicated to running 24/7 so that,it can satisfy client requests all over the World Wide Web. A web server can, in general, contain one or more websites.
A popular testing webserver for Linux systems is HTTPD , by APACHE
HTTPD is the Apache HyperText Transfer Protocol (HTTP) server program, It’s designed to be run as a free and open-source cross-platform standalone daemon .
This menu consists of :
This covers from installation to setting up your private webserver for testing the dynamic web pages/sites we design.
Note: it is recommended to restart after uploading a new file..
Demonstration below for the features 👇
Source Code:
Contributors:
Thank you for the time~!