Voice_Assistant_2.0
This task is all about Automation Of Various Technologies namely :
- To run basic linux commands.
- To automate AWS-Cloud using AWS-CLI.
- To create an LVM architecture & share limited storage to master node via data node.
- To automate docker container.
🌀This is a menu program purely based on these above technologies using a programming language called PYTHON we are doing this task with our voice assistant his name is 🔹JOY🔹 he will listen to our requirements and run all things automatically.
Let’s understand few concepts related to our task📝
What does the term Automation means?
📌Automation is the application of technology, programs, robotics or processes to achieve outcomes with minimal human input.
Some of the basic linux commands we can run inside this program such as :
>>pwd command
>>ls command
>>cd command
>>cat command
>>cp command
>>mv command
>>rm command
>>mkdir command
>>date command
>>cal command
>>ifconfig command
>>ping command
& many more…..
Why we use AWS?
📌Amazon Web Services(AWS) is a cloud service from Amazon, which provides services in the form of building blocks, these building blocks can be used to create and deploy any type of application in the cloud.
📌These services or building blocks are designed to work with each other, and result in applications that are sophisticated and highly scalable.
What is LVM? Why we use it?
💁🏻♀️Logical Volume Management enables the combining of multiple individual hard drives or disk partitions into a single volume group (VG). That volume group can then be subdivided into logical volumes (LV) or used as a single large volume. Regular file systems, such as EXT3 or EXT4, can then be created on a logical volume.
Why containerisation technology came in existence in technical world?
📌Docker is a container management service. The whole idea of Docker is for developers to easily develop applications, ship them into containers which can then be deployed anywhere within few seconds.
📌This technology was created by Solomon Hykes, March 2013.
📌You can deploy Docker containers anywhere, on any physical and virtual machines and even on the cloud.
📌Since Docker containers are pretty lightweight, they are very easily scalable.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
In this menu program for the voice assistant, we are also using Speech Recognition,pyttsx3, PyAudio, and some other modules in the program we have used such as getpass,webbrowser & os module.
If we talk about those modules they are :
👉🏻To connect to our mike we are using a library called as PyAudio using #conda install pyaudio installed it.
👉🏻To convert audio from our mike to english language using Google API Engine we are using module speech recognition i.e import speech_recognition using #pip install speech recognition we can install this module.
👉🏻pyttsx3 is a text-to-speech conversion library in Python.
👉🏻The OS module in python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality. The os and os. path modules include many functions to interact with the file system
👉🏻The web browser module provides a high-level interface to allow displaying Web-based documents to users. Under most circumstances, simply calling the open() function from this module will do the right thing. … If text-mode browsers are used, the calling process will block until the user exits the browser.
👉🏻The getpass module provides a platform-independent way to enter a password in a command-line program, get pass(prompt) prints the prompt string, switches off keyboard echo, and reads a password.
Now let’s understand which options our menu program provides to users here we have main 4 options i.e about basic linux commands, automation of AWS cloud using AWS-CLI, LVM architecture using concepts of partition & hadoop. At last, we will automate the docker container.
Inside all these technologies we are also providing sub-options
Let’s begin with options of AWS-Cloud using AWS-CLI so it provides facilities such as :
💁♀️Creating a new key pair.
💁♀️Creating a security group.
💁♀️Launching a new Ec2-instance.
💁♀️Launching an EBS volume.
💁♀️Attaching of EBS volume to our launched instance.
💁♀️Creation of S3 bucket.
💁♀️Copying file from local pc to AWS S3 bucket.
💁♀️Creation of Cloud Front Distribution.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Now let’s list options of LVM Architecture :
💁♀️Creation of physical volumes.
💁♀️Creation of Volume Group.
💁♀️Partition of your Logical Volume.
💁♀️Loading of the driver for our storage.
💁♀️Formatting of LVM partition.
💁♀️Mounting LVM partition to Data Node Storage.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
Lastly, the options that docker provides are :
💁♀️Displaying our docker images.
💁♀️Pulling docker images from docker.hub.com.
💁♀️Launching & Running a new os inside the container.
💁♀️Launching a webserver inside a docker container.
💁♀️Removing all stopped containers.
Now let’s sneak peek🧐 to some commands and snapshots of this menu program
So for the sake of security user need to enter the correct password to get inside our program and do automation if he enters the wrong password he will come out of the program to the main system as we can see in this snapshot

Now as soon as user enter correct password he will reach inside our menu and he just need to say his requirements to assistant and things will run automatically with minimal human work that’s the power of automation so firstly he will ask about basic linux commands then by using SSH protocal he will remotely login to our linux system running behind the scene then we will ask him password of root account and command he wishes to run.

Likewise, we can run many more…basic linux commands
Now it’s time to automate AWS Cloud using AWS-CLI here we are creating a key pair & a security group using our assistant here we are asking the user to enter a key name, enter security group name & his security group description.


Now we will ask the assistant to launch an ec2-instance for that user who need to provide us his image-id, key name & security group id…here we go ready to launch a new instance.

Then we will ask our assistant to create a ebs volume & attach it to our launched instance here as per user’s requirement he need to tell us ebs size & then after he asks assistant will attach it launched instance automatically.
We can verify from WEB-UI also


Now we will launch the S3 bucket here user needs to tell us a unique bucket name also we are providing the user public access to his bucket so that from anywhere in the world he can access his pictures, documents, etc…
Let’s verify through WEB-UI

To upload his picture he needs to provide us local path & bucket name here usually our local path is like C:\Users\gulsh\Desktop\logo.jpg but as we are running here using voice assistant so we faced a small error called UNICODE ERROR!!! So to upload our picture to the S3 bucket we created duplicate back slashes i.e C:\\Users\\gulsh\\Desktop\\logo.jpg. Hence error solved image was successfully uploaded in the S3 bucket have a look at the below snapshot.

Now let’s create a Cloud Front Distribution
Verification from WEB_UI

This all thing with commands you can refer my previous blogs :
https://gulshachawla.medium.com/amazon-web-services-using-cli-6f8db6f76d2c
https://gulshachawla.medium.com/creation-of-high-availability-architecture-with-aws-cli-bd97272d0e9f
Let’s now ask assistant to create a LVM architecture & share limited storage to master node via data node using concept of elasticity.

As we are doing automatically everything in LVM Architecture to see commands check my previous blog
https://gulshachawla.medium.com/integration-of-lvm-with-hadoop-cluster-using-aws-cloud-66edc98992cd
Now comes the last but not the least of this menu program i.e Automation of docker container.

Now to pull firstly we disabled firewall settings inside base o.s because as we are remotely doing these all things using SSH protocol.

Now here comes some challenges inside a docker container that while launching o.s using SSH protocol it gave us an error i.e IT’S NOT A TTY!! Why??🧐 Because while remote login is not providing us an interactive terminal or bash shell here TTY you can say it’s the name of your bash shell every shell has a unique name eg: tty2,tty3..etc so we manually went via SSH & did login inside o.s then we launched & ran our O.S inside the container.

Now to launch our webserver here also via SSH protocol we don’t know as such way🙃 to go inside a docker container using docker container’s IP so for the demo we manually this all but using knowledge of future classes of sir we will make this program automate web server via SSH inside the container.
Here to get ip-address using ifconfig command & so see port number using netstat -tnlp we need the net-tools package by using yum we can install it.

Now to launch web server inside docker container we need software of apache webserver so to install it we will use #yum install httpd

But here our container by default doesn’t support systemctl command but without systemctl how can we do this🤔??
We are here with another way let’s have a look at the below snapshot.

At last, to clean our environment we removed all stopped or exited containers.
Finally, the task of automation using the menu program of python was accomplished.
Conclusion :
In this team task, we came to know tones of new technologies, how to solve our mistakes, errors and here we also learned from each other’s views, the knowledge that’s called team bonding that’s why we all came up with this great task.
On behalf of all my team mates Tharak Ram, Anvay Palherkar , Shraddha Bhalerao & me Gulsha Chawla .I would really like to thank our mentor none other than Mr.Vimal Daga Sir😇
Thank you, everyone, for reading my article🤗
Keep Learning🤩Keep Sharing🤝
Have a nice day✨