Task Description📄

🔅 Create an AWS EC2 instance

🔅 Configure the instance with Apache Webserver.

🔅 Download php application name “WordPress”.

🔅 As wordpress stores data at the backend in MySQL Database server. Therefore, you need to setup a MySQL server using AWS RDS service using Free Tier.

🔅 Provide the endpoint/connection string to the WordPress application to make it work.

It’s a fun task and it has a real-life use case and 1/4th of the world’s websites use Wordpress. I will continue with the demonstration on how to build one…

> First of all, Go to Amazon Services >…


ARTH — Task 17 👨🏻‍💻

Task Description📄

🔅-17.1 Create your own Chat Servers, and establish a network to transfer data using Socket Programing by creating both Server and Client machine as Sender and Receiver both. Do this program using UDP data transfer protocol.

🔅-17.2 Use multi-threading concept to get and receive data parallelly from both the Server Sides. Observe the challenges that you face to achieve this using UDP.

Task 1 :- Creating Chat Servers via UDP Protocol

So I created a Server and Client using Socket Programming and got the output as follows :-

Server Side :-


Create an Ansible Roles for Webserver and Haproxy…

🔅Create an ansible role myapache to configure Httpd WebServer.

🔅Create another ansible role myloadbalancer to configure HAProxy LB.

🔅We need to combine both of these roles controlling webserver versions and solving challenge for host ip’s addition dynamically over each Managed Node in HAProxy.cfg file.

♦Inventory File :

[webserver]
192.168.1.108 ansible_user=root ansible_ssh_pass=password ansible_connection=ssh
192.168.1.106 ansible_user=root ansible_ssh_pass=password ansible_connection=ssh
[loadbalancer]
192.168.1.107 ansible_user=root ansible_ssh_pass=password ansible_connection=ssh

♦️ Ansible Configuration File :

🔅 Create an ansible role “httpd” to configure httpd WebServer.

ansible-galaxy role init httpd

Create another ansible role “haproxy” to configure HAProxy LB.

ansible-galaxy role init haproxy

♦️ Here, we can see two roles created using command :

ansible-galaxy role list --roles-path /root/roles

Now start writing roles :

♦️ In httpd role,

  1. In tasks…

TASK REQUIREMENTS:

🔹 Launch AWS instances with the help of ansible playbooks.

🔹 Retrieve the public IP which is allocated to the launched instance using register.

🔹 With the help of the retrieved Public IP configure the inventory file dynamically and then configure load balancer setup using haproxy.cfg file dynamically.

🔹 After this launch the webserver for running the application on AWS instances.

🔹 Finally, launch the webservers and HAProxy on AWS instances using Playbooks.

Solution:

For this we create one playbook for launching AWS instances and then dynamically updating the inventory file and then installing HAProxy and webservers. Following the inventory file…


So, we will be Using HaProxy to do the following task :-

12.1 Use Ansible playbook to Configure Reverse Proxy i.e. Haproxy and update it’s configuration file automatically on each time new Managed node (Configured With Apache Webserver) join the inventory.

Steps to be followed to achieve this task :

First of all, we need to update our inventory. Here, we can create group of host according to their functions. Example: We can group webserver ip and give its group name as web.


So we have been given two tasks by Vimal Sir, to automate and manage Hadoop using Ansible and efficiently using Ansible playbook to manage HTTPD Service.

Task Description📄

🔰 11.1 Configure Hadoop and start cluster services using Ansible Playbook

🔰 11.3 Restarting HTTPD Service is not idempotence in nature and also consume more resources suggest a way to rectify this challenge in Ansible playbook

11.1:- Configure Hadoop and start cluster services using Ansible Playbook

Type this command in your vm it will download the ansible for you.

pip3 install ansible

Now we have to make random name file in my…


LifeSum is one of the popular health startups, based at Stockholm, which offers a platform to support and encourage healthy and balanced lifestyle. It helps users to custom build their specific goals and aims, according to the weight loss plan and guidance, based on data. LifeSum’s vision is to make people healthier and happier by helping users to build good habits as well as an improved life.

Their app is based on a joint backend API, which supports them. It’s infrastructure is hosted on AWS primarily using Ubuntu. They needed a simple to-use and powerful configuration management, application deployment and…


🔰Write an Ansible PlayBook that does the following operations in the managed nodes:
🔹 Configure Docker
🔹 Start and enable Docker services
🔹 Pull the httpd server image from the Docker Hub
🔹 Run the docker container and expose it to the public

This was the task provided to me by Vimal Sir, in order to get our basic concepts for ansible playbook, better and easy to use in future

So, I did the given task in the following Steps:-

Step 1:- Checking the hosts availability.


So, We have been given these small tasks to complete under the Docker container topic, and it’s very easy to use without any complications.

Step 1 : Start Docker Services and run the CentOS image


Automating LVM Partitioning with Python is very easy and it takes a few lines of code to achieve it…

Step 1 :- Create a .py file for Automatic execution and Scripting

Arya Dhorajiya

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store