What is K-means Clustering?

K-means clustering is a type of unsupervised learning, which is used when you have unlabeled data (data without defined categories or groups). The goal of this algorithm is to find groups in the data, with the number of groups represented by the variable K

The results of the K-means clustering algorithm are:

The centroids of the K clusters, which can be used to label new data

Labels for the training data (each data point is assigned to a single cluster)

Where k-means clustering algorithm is used?

k-mean clustering algorithm is used in Machine Learning models where we have to do unsupervised learning with improper historical data…

What are Ansible Roles?

Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules. In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse. -Roles in Ansible are a way of managing playbooks. If we need the same tasks in multiple playbooks, then instead of writing in every playbook we create separate roles for each task and apply them to playbooks.

command is used for creating a role:

ansible-galaxy role init <role_name>

To set the path…

What is MongoDB?
MongoDB is a document-oriented, no sequel(NOSQL) database.
It replaces the concept of roles of conventional relational data models with something called Documents. It offers developers the flexibility with evolving data models. Since it is document-based MongoDB allows embedded documents, arrays, represent complex hierarchical relationships using a single record. It is also schema-free which means that the keys defined are not fixed as a result massive data migrations can be ruled.

🔅Integrate LVM with Hadoop and
provide Elasticity to DataNode Storage
🔅Increase or Decrease the Size of Static
Partition in Linux.
🔅Automating LVM Partition using Python-Script.

Step -1: Launching 2 instances one for Hadoop master(Name node) and the other for Hadoop slave(Data node).

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.


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.

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. By default, you can also access some Ansible facts as top-level variables with the ansible_ prefix. You can disable this behavior using the INJECT_FACTS_AS_VARS setting. To see all available facts, add this task to a play:

- name: Print all available facts
var: ansible_facts

Facts include a large amount of variable data, in which we will use this:

fig: A key named ansible_distribution containing OS name as it’s value

Now, we will…

Ansible Playbook for dynamically updating the inventory with the new container IP to deploy a webserver in it!


Aakash Bhardwaj

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