Friday, April 9, 2021
ARTH TASK - 10
π Write an Ansible PlayBook that does the
Tuesday, March 23, 2021
ARTH - Task 6
Task Description
>> Create High Availability Architecture with AWS CLI
>> The architecture includes -
- Web server configured on EC2 Instance
- Document Root(/var/www/html) made persistent by
mounting on EBS Block Device.
- Static objects used in code such as pictures stored in S3
- Setting up Content Delivery Network using CloudFront and
using the origin domain as S3 bucket.
- Finally place the Cloud Front URL on the webapp code for
security and low latency.
Step1: Download the Aws_cli
https://aws.amazon.com/cli/
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html
Step 2: Install the aws_cli and setting_up the
env_variable
SET THE ENV PATH FOR AWS_CLI
Step 3: configuring the aws_cli
Saturday, December 26, 2020
What is Kubernetes? How Kubernetes is used in Industries?
Hello Learners... Here I am with another post on an amazing topic Kubernetes. So, let's get started...
What is Kubernetes?
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
The name Kubernetes originates from Greek, meaning helmsman or pilot. Google open-sourced the Kubernetes project in 2014. Kubernetes combines over 15 years of Google's experience running production workloads at scale with best-of-breed ideas and practices from the community.
Why Use Kubernetes?
Features of Kubernetes
2. Service Discovery & Load balancing With Kubernetes, there is no need to worry about networking and communication because Kubernetes will automatically assign IP addresses to containers and a single DNS name for a set of containers, that can load-balance traffic inside the cluster.
3. Storage Orchestration With Kubernetes, you can mount the storage system of your choice. You can either opt for local storage, or choose a public cloud provider such as GCP or AWS, or perhaps use a shared network storage system such as NFS, iSCSI, etc.
4. Self-Healing Personally, this is my favorite feature. Kubernetes can automatically restart containers that fail during execution and kills those containers that don’t respond to user-defined health checks. But if nodes itself die, then it replaces and reschedules those failed containers on other available nodes.
5. Secret & Configuration Management Kubernetes can help you deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.
6. Batch Execution In addition to managing services, Kubernetes can also manage your batch and CI workloads, thus replacing containers that fail, if desired.
7. Horizontal Scaling Kubernetes needs only 1 command to scale up the containers, or to scale them down when using the CLI. Else, scaling can also be done via the Dashboard (kubernetes UI).
8. Automatic Rollbacks & Rollouts Kubernetes progressively rolls out changes and updates to your application or its configuration, by ensuring that not all instances are worked at the same instance. Even if something goes wrong, Kubernetes will rollback the change for you. These were some of the notable features of Kubernetes. Let me delve into the attractive aspects of Kubernetes with a real-life implementation of it and how it solved a major industry worry.
Kubernetes Architecture
So, now on moving onto the next part of this ‘what is Kubernetes’ blog, let me explain the working architecture of Kubernetes.
Since Kubernetes implements a cluster computing background, everything works from inside a Kubernetes Cluster. This cluster is hosted by one node acting as the ‘master’ of the cluster, and other nodes as ‘nodes’ which do the actual ‘containerization‘. Below is a diagram showing the same.
Kubernetes Master Node
Master Node is a collection of components like Storage, Controller, Scheduler, API-server that makes up the control plan of the Kubernetes. When you interact with Kubernetes by using CLI you are communicating with the Kubernetes cluster’s master node. All the processes run on a single node in the cluster, and this node is also referred to as the master.
Master Node Components:
1) Kube API-server performs all the administrative tasks on the master node. A user sends the rest commands as YAML/JSON format to the API server, then it processes and executes them. The Kube API-server is the front end of the Kubernetes control plane.
2) etcd is a distributed key-value store that is used to store the cluster state. Kubernetes stores the file in a database called the etcd. Besides storing the cluster state, etcd is also used to store the configuration details such as the subnets and the config maps.
3) Kube-scheduler is used to schedule the work to different worker nodes. It also manages the new requests coming from the API Server and assigns them to healthy nodes.
4) Kube Controller Manager task is to obtain the desired state from the API Server. If the desired state does not meet the current state of the object, then the corrective steps are taken by the control loop to bring the current state the same as the desired state.
There are different types of control manager in Kubernetes architecture:
- Node Manager, it manages the nodes. It creates new nodes if any node is unavailable or destroyed.
- Replication Controller, it manages if the desired number of containers is running in the replication group.
- Endpoints controller, it populates the endpoints object that is, joins Services & Pods.
Kubernetes Worker Node
Worker Node Components:
The business case for Kubernetes
- The cloud is based on the first-generation virtualization, which is being rendered obsolete and perhaps, in due course, irrelevant. An image of the software that would normally have been installed on a server's main hard drive, is rendered in the memory and storage of a remote server so that software can run there like it always has before. Now there's no need for software to be made to run like it always has before. The business case for continuing to produce monolithic applications has evaporated, even in the case of massively multiplayer online games whose underlying, proprietary platforms are the exclusive domains of their manufacturers.
- The Internet is mapped using a domain system that maps addresses to their registered owners rather than the functions and services being used. Service meshes are overlaying those maps with more relevant ones, enabling distributed applications to find each other over vastly dispersed networks. And these service meshes are bound tightly to Kubernetes, providing the second most relevant service of the system after workload orchestration.
- Mobile devices are dependent upon mobile apps that distribute "smart" functionality to the client-side, mainly to minimize the information exchanged between clients and servers. With wireless bandwidth no longer a premium commodity, it may become more practical and cost-effective to shift that functionality back to the server-side, enabling a new class of devices that are significantly "dumber" than their predecessors -- albeit with really great cameras -- yet accomplish the same tasks at conceivably greater speeds.
- Public cloud data centers are massive, "hyperscale" facilities that service tens of thousands of tenants simultaneously, oftentimes from distances several hundreds of miles away. With more highly distributable computing, it may become more practical and more desirable to have greater numbers of much smaller data centers, scattered in closer proximity to their users.
- Artificial intelligence comprises the upper class of software, mainly because of its relatively high cost in memory, storage, and other resources. Using distributed service models, comprising a myriad of containers, each with a much smaller footprint, AI may become far more commonplace, to the extent that software that draws better inferences (e.g., "Look out for that tree 30 yards away!") won't be called "smart" as much as it's called "standard operating equipment."
- Containerization makes business software easier to manage. In the context of server-based computing, a container is a package that enables workloads to be virtualized (portable, self-contained, running in isolation) while still hosted by an operating system (as opposed to a hypervisor). Modern applications are made portable among servers by containerizing them, which is not just about packaging put deployment. In a containerized environment, the code for software is retrieved or "pulled" from repositories (some public, others private), then immediately deployed and run in the production environment. This automated deployment method enables software to be improved not just every eighteen months or so, but potentially every day, not just by its originators but by its users as well. In turn, this dramatically improves data center system integrity as well as security.
What "orchestration" means
Industrial Use Case of Kubernetes
Thursday, December 10, 2020
AUTOMATING HADOOP USING ANSIBLE
Hello guys, I'm back with yet another amazing article. Here, we will see how can we automate Hadoop using ansible. Before that we must know some of the basic things such as:
What is Hadoop?
What is Hadoop Cluster?
What is Name node?
What is DataNode?
A DataNode stores data in the HadoopFileSystem. A functional filesystem has more than one DataNode, with data replicated across them. On startup, a DataNode connects to the NameNode; spinning until that service comes up. It then responds to requests from the NameNode for filesystem operations.
What is client node?
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. It includes its own declarative language to describe system configuration. Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.
How Ansible Works?
In Ansible, there are two categories of computers: the control node and managed nodes. The control node is a computer that runs Ansible. There must be at least one control node, although a backup control node may also exist. A managed node is any device being managed by the control node.
Ansible works by connecting to nodes (clients, servers, or whatever you're configuring) on a network, and then sending a small program called an Ansible module to that node. Ansible executes these modules over SSH and removes them when finished. The only requirement for this interaction is that your Ansible control node has login access to the managed nodes. SSH Keys are the most common way to provide access, but other forms of authentication are also supported.
Ansible Playbook
Modules in Ansible
Variables in Ansible
Name Node Variables
NameNode Playbook
Running NameNode Playbook
DataNode Variables
DataNode Playbook
Running DataNode Playbook
Client Node Variable
Client Node Playbook
Running Client Node Playbook :
As the Client Node ran successfully, now we need to see the dashboard that file that client wanted to send is sent successfully or not.
Hadoop WebApp Automation
Abstract : Today is an era of Technology and with the increase of technology the amount of data it produces increases every second even no...
-
Abstract : Today is an era of Technology and with the increase of technology the amount of data it produces increases every second even no...
-
Task Description π¬ π In this task : πCreate a model that will detect a car in a live stream or video and recognize characters on the nu...
-
In this project, I have integrated python with Docker !! Python is one of the most popular languages nowadays and Docker is used for conta...




















































