In this blog,we are going to discuss about how ML is integrated with some of the industrial use-cases to solve the issues may be threats related to security mostly.

src : https://www.securityroundtable.org/wp-content/uploads/2019/06/machine-learning-840x485.png

So lets understand first ,

What is Cyber Security ?

💻Cyber security refers to the body of technologies, processes, and practices designed to protect networks, devices, programs, and data from attack, damage, or unauthorized access. Cyber security may also be referred to as information technology security.

❗ THE IMPORTANCE OF CYBER SECURITY

Cyber security is important because government, military, corporate, financial, and medical organizations collect, process, and store unprecedented amounts of data on computers and other devices. A significant portion of that…


Ansible roles for haproxy and webserver configuration

In this article, we will be diminishing our dilemma while creating Ansible roles and organised way to keep our ansible code..

🎲What are Ansible ROLES ?

Roles let you automatically load related vars_files, tasks, handlers, and other Ansible artifacts based on a known file structure. Once you group your content in roles, you can easily reuse them and share them with other users.

📃Ansible role file structure :


os_dependent configuration

💬Use-case :

Create an Ansible Playbook which will dynamically
load the variable file named same as OS_name and just by
using the variable names we can Configure our target node.
(Note: No need to use when keyword here.)

Lets lookup how this can be done:

Before discussing further , we need to know what are the ansible-facts:

Ansible facts are data related to your remote systems, including operating systems, IP addresses, attached filesystems, and more. You can access this data in the ansible_facts variable. …


Scenario

Scenario : Our aim is to dynamically update the inventory file of hosts ,so that on the fly we can configure docker container as WebServer once it is launched….

Let we get insight over how it could be done :

1️⃣First of all , we would create our own ssh_enabled docker image:

first of all ,create working directory ..

#mkdir dynamic_inven

#cd /dynamic_inven

Now create docker file :

#vim Dockerfile

Dockerfile is the default name recognized by the docker build command….


Haproxy Configuration using Ansible

📚Our goal is to configure Haproxy Server using ansible , while the configuration files of haproxy will be dynamically updated as number of hosts incremented.

First of all, lets understand :
🤔what is Reverse Proxy?

In computer networks such as the internet, a reverse proxy is a common type of proxy server that is accessible from the public network. Large websites and content delivery networks use reverse proxies –together with other techniques– to balance the load between internal servers.

Now lets go more deep ….

🤔What is Haproxy ?

HAProxy is free, open source software that provides a high availability…


High Availability Architecture using CLI

To get started with AWS CLI and installation process refer docs

Lets see how we can create this High Availability Architecture :

✅Launch EC2 instance :

To configure AWS account :
Use : #aws configure
Here you need to specify the Access Key and ID along with Region
Launching AMI Linux instance :
# aws ec2 run-instances --image-id ami-0e306788ff2473ccb --count 1 --instance-type t2.micro --key-name <key_name> --security-group-ids sg-09ac2ee9a41df7156 --subnet-id subnet-21212849

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

Lets see how we can rectify this challenge ….

🟥Using when Keyword: Conditional expression, determines if an iteration of a task is run or not…..

🟥Using handlers : Handlers are just like regular tasks in an Ansible playbook (see Tasks) but are only run if the Task contains a notify directive and also indicates that it changed something. …


👉Our Aim : Configure Hadoop and start cluster services using Ansible Playbook…..

🔑What is an 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.

🔑What is Ansible PlayBook ?

An Ansible® playbook is a blueprint of automation tasks — which are complex IT actions executed with limited or no human involvement. Ansible playbooks are executed on a set, group, or classification of hosts, which together make up an Ansible inventory.

🔑What is Hadoop ?

Apache Hadoop is a collection of open-source software utilities that facilitates using a network of…


📚Lets see how the size of static partition can be incremented or decremented…..

We will be performing this task in AWS EC2 instance:

Thus first launch it and attach extra EBS volume with it :

Lets have a look if is attached or not:

#lsblk


🔅Integrating LVM with Hadoop and providing Elasticity to DataNode Storage :

✅We will be using AWS for launching RHEL8 instance to setup Hadoop.

Task Requirement :

JDK(Java Development Kit )

Hadoop software

For some reason, we will be disabling SE-Linux in RHEL8:

#setenforce 0
#getenforce

Configuring hadoop cluster now :

Technological Enthusiast , Like to express what is need of time, Relates real world to philosophical insights

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