Automation of tasks in RedHat8 using Python

 What is Automation

Automation is the process of making things happen by themselves with just giving a trigger by human being. Automation is not only limited to computers it has huge demand in all the fields. This helps to reduce the time consumption by each time manually doing a task and mainly avoids errors. There are many tools in industry for automation like Ansible, Puppet, Selenium, Jenkins.

Ansible is the automation tool which is built using python and it is available as a library in python. As python is the foundation for ansible if  for any task the ansible is not supporting then we can build code for that task using python. This will reduce the time to complete task as time is most important factor in industry.



AWS Tasks

1. Configure AWS CLI
2. Login into AWS account
3. EC2
4. EBS
5. S3
6. Cloud Front
7. IAM

In AWS there are sub menus, which are regarding particular service. Configuring AWS CLI will download and install it. To access any service in AWS first we need to login in the CLI.


EC2

1. Describe running instances
2. Create a key pair
3. Launch an instance
4. Start an instance
5. Stop an instance
6. Delete an instance

All the existing instances in EC2 are displayed



To launch a instance we need key pair


After a instance is launched it will be in started state




We can start  or stop a instance



Deleting a instance will permanently remove it



EBS

1. Display available Volumes
2. Create a new Volume
3. Attach Volume to EC2 instance
4. Delete a Volume
5. Display available Snapshots
6. Create Snapshots
7. Delete Snapshot

All EBS volumes which are created along with the instances or created separately will be displayed.
We can create a new volume


In order to use the created  volume it should be attached to a EC2 instance



Creating Snapshots will help us retrieve data from past in case of any failure



S3

1. Display Buckets
2. Create a Bucket
3. Add Object to a bucket
4. Delete an object
5. Delete a Bucket

S3 Bucket is a type of Object storage provided by AWS, bucket is similar to a directory




The files which are stored in the bucket are called objects they can be added to a bucket and can be deleted. A bucket can be deleted only if it is empty



Cloud Front

1. Display Distributions
2. Create Distribution
3. Delete Distribution

Cloud Front is a Content Delivery Network service provided by AWS.




IAM

1. Display Users
2. Create User
3. Delete User

Through IAM service we can create sub users under a root user


Hadoop Tasks 

1. Configure Hadoop 
2. Start Hadoop 
3. Hadoop Cluster Report 
4. Files in Hadoop Cluster 
5. Upload file into Hadoop cluster 
6. Stop Hadoop

Hadoop service is used in Big Data to create a cluster and store, process and many other activities on data. 




Cluster report displays all the data nodes attached to the master and their usage metrics


We can what files are there in the cluster, we can also upload and remove the files from the cluster










Docker

1. Configure Docker
2. Start Docker
3. List OS images
4. Pull OS image
5. Display running containers
6. Launch a container
7. Start a container
8. Stop a container
9. Delete a container
10. Configure httpd inside container

Docker is a container technology which is leading in the industry



We can see what images are available and we can download desired images from docker hub


We can perform operations on the containers same as on instances




LVM (Logical Volume Management) Tasks

1. Display available disks
2. Create Physical Volume
3. Create Volume Group
4. Create Logical Volume
5. Mount Logical Volume
6. Extend Volume Group
7. Extend Logical Volume
8. Display Physical Volume
9. Display Volume Group
10. Display Logical Volume
11. Display Mounted Directories

LVM is the concept based on partitions using LVM we can combine different physical volumes and use them as logical volumes as required. 




We can also extend the Volume Group and Logical Volume dynamically




We can see which disks are available and the mounted directories

                                            Uploading: 618763 of 618763 bytes uploaded.



Successfully completed the Team Task 1 with support of my team mates Ninad Deogaonkar, Gaurav Dey, Nirali Arora, Himanshu Simhadri and myself Sankeerth Bussa.


Comments