Configure static IP address on CentOS

After a fresh installation CentOS uses DHCP (dhclient -v) to assign an IP to the machine, which keep in changing on reboots, or service restarts, etc.

Use-case: Various service setups, especially involving a clustered configuration we need to set a fixed IP for each machine, so they can communication with each other, in case of DHCP the installation may break on the reboot, as anyone of the machine gets a new IP address. So the first step is to set a static IP address. Continue reading “Configure static IP address on CentOS”

Ruby Kernel for Jupyter Notebook

Jupyter notebooks are nice way to keep your code, diagrams, documentation together, mostly in a single file, which is also executable i.e. can run/interpret your code in it, and also have the result saved as it is. Here’s blogpost for installing Jupyter Notebook – today I’ll share how to use Ruby kernel with Jupyter Notebook i.e. executing Ruby code inside the notebooks.
To create notebooks that can execute Ruby code we need to integrate Ruby kernel, the 3 simple steps are:
  • Install Jupyter
  • Install Ruby
  • Install iruby

Continue reading “Ruby Kernel for Jupyter Notebook”

Install latest Ruby version using rbenv

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Yukihiro “Matz” Matsumoto created it in the mid-1990s, using his influence from other prpgramming languages i.e. Perl, Ada, Lips, Eiffel, and Smalltalk. Ruby was released in 1995. Like Python (released few years earlier), ruby also has dynamic typing and implicit memory management

Continue reading “Install latest Ruby version using rbenv”

Install Jupyter Notebook

What is Jupyter Notebook

If you’re a Python developer, or someone who has to interact with Python, you may be hearing or seeing the term Jupyter Notebook quite lot, while reading articles, or looking for some solution on-line.
The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.

Continue reading “Install Jupyter Notebook”

Install Ansible on CentOS 7

For an overview of what is Ansible – Getting started with Ansible

For this tutorial we are using 3 VMs, with IPs and hostnames – one Ansible controller/manager (ansible-controller) which will be doing the provisioning on the two remote servers i.e. ansible-node1 and ansible-node2:
192.168.40.192 ansible-controller
192.168.40.193 ansible-node1
192.168.40.194 ansible-node2
ansible-controller‘ is the manger node, the one performing the provisioning on the rest of the hosts i.e. on ansible-controller we’ll be installing and configuring Ansible.

Continue reading “Install Ansible on CentOS 7”

Getting started with Ansible

Relevant posts


What is Ansible ?

Ansible is an open-source configuration management tool i.e. for automating development or production environment setups, cloud provisioning, change management across multiple nodes. The thing which makes Ansible better then the other popular configuration management tools, like Puppet, Chef, etc is it’s agentless architecture. In the formal (Chef and Puppet) you are required to install the daeman/agent on all the nodes i.e. the controller/master node, as well as the nodes you need to manage (can be 100s or 1000s). In case of Ansible all you need to do is install the Ansible on the controller/master node, and it’ll ssh into all the ‘to be managed’ nodes (may require you to add the keys). This architecture not only makes the setup easy, but also reduces the network overhead, as continuous polling of controller node by the client nodes isn’t required. Ansible was initially supported and sponsored by Ansible, Inc (originally AnsibleWorks, Inc) – in October 2015 it was acquired by Red Hat.

Continue reading “Getting started with Ansible”

Rabbitmq Cluster on CentOS 7

Step 0. Prelimenaries

Run yum update

$ sudo yum update

Stop the firewall

To make the ports accessible i.e. for clustering nodes use 5672, 4369, and 25672.
$ sudo systemclt stop firewall-cmd

Disable SELinux

$ sudo setenforce 0
The above command will disable SELinux for the session i.e. until next reboot – to permanently disable it set SELINUX=disabled in /etc/selinux/config file.

Set host names

Doing so later will most probably break the installation.
We’ll name the nodes/VMs as rabbit1 (192.168.40.192) and rabbit2 (192.168.40.193) – the default is localhost.

Continue reading “Rabbitmq Cluster on CentOS 7”