Solution 🔥

Here we have to use the handlers

Code:

- hosts: HOST_NAMEvars:
- port: "4444"
tasks:
- name: Add EPEl repo
yum_repository:
name: epel
description: EPEL YUM repo
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
- name: Install httpd
package:
name: "httpd"
state: present
- name: Copying conf file
template:
dest: "/etc/httpd/conf.d/myhttpd.conf"
src: "myhttpd.conf"
notify:
- changed
- name: Adding rule for http
firewalld:
port: "{{ port }}/tcp"
state: enabled
permanent: yes
immediate: yes
- name: Staring httpd service
service:
name: httpd
state: started
handlers:
- name: changed
service:
name: "httpd"
state: restarted
enabled: yes

Image for post
Image for post

What is Ansible?

Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems and can configure both Unix-like systems as well as Microsoft Windows.

Why we use Ansible?

Ansible is easy to learn, it is agentless, it automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

Companies using Ansible

British Army


Image for post
Image for post

Prerequisite 🚀

Here we need 2 roles 📚1 for Hadoop master and 1 for Hadoop slave

Hadoop Master ☀️

Step-1) Create Roles for Hadoop Master

ansible-galaxy init hadoop_master

Step-2)Writing tasks in the main.yml

- name: Add epel repo
yum_repository:
name: epel
description: EPEL YUM repo
baseurl: "{{ epel_url }}"
- name: Download Java8
get_url:
url: https://repo.huaweicloud.com/java/jdk/8u171-b11/jdk-8u171-linux-x64.rpm
dest: /root/jdk-8u171-linux-x64.rpm
- name: Download Hadoopv1.2
get_url:
url: https://archive.apache.org/dist/hadoop/core/hadoop-1.2.1/hadoop-1.2.1-1.x86_64.rpm
dest: /root/hadoop-1.2.1-1.x86_64.rpm
- name: Install java8
command: rpm -ivh jdk-8u171-linux-x64.rpm
- name: Installing Hadoop
command: rpm -ivh hadoop-1.2.1-1.x86_64.rpm --force
- name: Creating namenodedir
file:
path: "{{ nn_dir }}"
state: directory
- name: Copy hdfs conf file of hadoop
template:
src: "nn_hdfs-site.xml"
dest: "/etc/hadoop/hdfs-site.xml"
- name: Copy core conf file of hadoop
template:
src: "nn_core-site.xml"
dest: "/etc/hadoop/core-site.xml"
- name: Formating namenode dir
command: echo Y | hadoop namenode…


Image for post
Image for post

Prerequisite:

Step-1)Creating navbar

nav.js:

import React from 'react';
import './header.css';
function Nav(){
return(
<div className="navbar_main">
<div className="netflix_logo">
<img src="https://thewhitonline.com/wp-content/uploads/2020/09/netflix-logo.png" alt="neflix_logo" height="60px"></img>
<div className="nav_right">UNLIMITED TV SHOWS & MOVIES
<button className="btn_join_now">JOIN NOW</button>
<button className="btn_sign">SIGN IN</button>

</div>
</div>
</div>
);
}
export default Nav;

Style.css:

.navbar_main{
font-family: 'Ubuntu';
position: sticky;
height: 60px;
background-color: black;
}
.netflix_logo{
display: flex;
flex-direction: row;
justify-content: space-between;
height: 60px;
padding-left: 50px;
}
.nav_right{
position: static;
color: white;

}
.btn_join_now{ …


Image for post
Image for post

Prerequisite:

Problem Statement:

Step-1) Install AWS CLI and configure it.

aws --version


Image for post
Image for post

Problem Statement:

In a Hadoop cluster, find how to contribute a limited/specific amount of storage as a slave to the cluster?

Prerequisite:

Step-1)Create Volume.

Command

fdisk -l
Image for post
Image for post

Step-2)Make partition:

Image for post
Image for post

fdisk /dev/xvdf

Step-3)Format Partition

Image for post
Image for post
mkfs.ext4 /dev/xvdf

Step-5)Mount Volume

Image for post
Image for post

Step-6)Add the directory name in the slave configuration file.

Image for post
Image for post

Step-7)Start datanode:

hadoop-daemon.sh start datanode

Output

Command

hadoop dfsadmin -report
Image for post
Image for post
Image for post
Image for post
webUI

AI refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving.

Companies using AI/ML:

NVIDIA

Image for post
Image for post

Image for post
Image for post

Problem Statement:

Prerequisites:

Step-1)Create a Security group for RDS:

resource "aws_security_group" "mysql-rds" {name        = "RDS-Security-Group"
description = "MySQL Ports"

ingress {
description = "Mysql RDS"
from_port = 3306
to_port = 3306
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"] …


Image for post
Image for post

Prerequisite

Problem Statement

Step-1) Install AWS CLI and configure it.

aws --version

About

Ritesh Singh

Tech Enthusiast, zeal for learning, and explore the new technologies, loves to do automation in today’s Agile world.

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