Friday, August 28, 2020

How to install Puppet 6 on Ubuntu 18.0.4 | Puppet Master install Ubuntu 18.0.4 | Setup Puppet on Ubuntu

Puppet is a configuration management tool, similar to Ansible, Chef and SaltStack. Puppet also can be used for automating infrastrcture as well.

Puppet is based in client/server model. The server does all the automation of tasks on nodes/servers that have a client(agent) installed. The work of the Puppet agent is to send facts to the puppet master and request a catalog based on certain interval level(default time 30 mins). Once it receives a catalog, Puppet agent applies it to the node by checking each resource the catalog describes. It makes relevant changes to attain the desired state. The work of the Puppet master is to control configuration information.  Each managed agent node requests its own configuration catalog from the master.

We will see how to setup Puppet Master in Ubuntu 18.0.4.

Install Puppet master on new Ubuntu with medium instance
port 8140 needs to be opened.

First let us see how to install Puppet 6.x on Ubuntu 18.0.4.

Steps for Puppet Master Installation
1. Modify Puppet Master Hosts file to add hostname of Puppet Master
sudo vi /etc/hosts

2. Download puppet installable

curl -O
sudo dpkg -i puppet6-release-bionic.deb
sudo apt-get update
sudo apt-get install puppetserver -y
sudo ufw allow 8140
sudo systemctl enable puppetserver.service

(the above command is to start the service during starting the Ubuntu instance)
sudo systemctl start puppetserver.service           

(The above command is for starting the server and this may take some time)
sudo systemctl status puppetserver.service

Now press q to come out of window.
Add puppet master ip address and puppet next to it like shown below

This confirms that Puppet Master is installed successfully.

Verify which version of Puppet installed by executing below command:
apt policy puppetserver

2. you need to install the aws-sdk-core and retries gems as root (or superuser):
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk-core retries
Done installing documentation for retries after 0 seconds
6 gems installed
3. Also install AWS SDK for accessing resources in AWS
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk -v 2.0.42

Done installing documentation for retries after 0 seconds
4 gems installed
4. Now you can install puppet-labs-aws module
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-aws

That's it. Puppet Master is setup successfully!!!! You can watch the above steps in YouTube as well.

Tuesday, August 25, 2020

How to install Terraform on Ubuntu 22.0.4 | TerraForm Installation on 22.0.4

Terraform is used for provisioning infrastructure on Cloud. You don't need to create manually any resource in AWS. Please find steps for installing Terraform On Ubuntu 22.0.4.

Create a working directory
sudo mkdir -p /opt/terraform
cd /opt/terraform

Download Terraform from HasiCorp website
sudo wget

Install unzip utility
sudo apt-get install unzip -y

Unzip Terraform Zip file
sudo unzip

Add terraform to PATH
sudo mv /opt/terraform/terraform /usr/bin/

terraform -version
this should show version of Terraform.
Terraform v1.5.4

Please watch the above steps as Demo in YouTube below:

How to change default port number in Sonatype Nexus 3? | Change default port number in SonaType Nexus 3 | Change default port number in Nexus

The default port number for Sonatype Nexus is 8081. It can be changed though by modifying the below properties file.


Modify the desired port no in the above file. once you modify, you need to restart Nexus service to take effect.

sudo service nexus stop

sudo service nexus start

sudo service nexus status

Click here to see steps for how to install Nexus on Redhat.
Click here to see steps for how to install Nexus on Ubuntu.

How to install Ansible on Mac OS | Ansible Installation Steps on Apple Mac OS

Ansible is one of the popular configuration management tools. Ansible can also be used for infrastructure provisioning as well in AWS. Please find steps for installing Ansible on Apple Mac OS or laptop.

Ansible can be installed on Mac OS many ways, but preferred way is using pip which is a Python package manager.

Install Pip

If pip isn’t already available on your system, run the following commands to install it:
curl -o
pip --version

Once pip is installed, install Ansible using pip.

Install Ansible using Pip
To install ansible globally, use following command
sudo -H pip3 install ansible
Once Ansible is installed, you can verify the version.

ansible --version
You should be able to see the version.

Install Boto framework
Boto is a Python package that provides interfaces to Amazon Web Service. It is AWS SDK for Python.

sudo pip install boto
sudo pip install boto3
Create Ansible hosts file
when you install Ansible on Mac OS, it does not create ansible hosts file. so you need to create it.
sudo mkdir /etc/ansible
Watch the above steps as a video in YouTube channel:

Monday, August 3, 2020

How to configure Nexus 3 as private Docker Registry | How to host private Docker Registry in Nexus 3

Nexus 3 is one of the popular binary repository managers. It can be also used to store Docker images as well besides storing binaries such as WARs, EARs, Jars, DLLs and Exes.

Let us see how to configure Nexus to host as private Docker registry.

  • Make sure Nexus is successfully configured, it is up and running.
  • Also do open port 8085 open as well besides port 8081 for Nexus.
  • Docker is setup and running.
Steps to configure Nexus 3 as Docker Registry:

1. Login to Nexus and click on Server Administration link at the top of the window. Click on Repositories.

2. Now click on create repository

3. Choose docker hosted repository

4. Choose the value as mentioned:

5. Click on Create repository.

Configure Realm
6. Move Docker Bearer Token realm to right by clicking on >

This settings allows docker repository to have anonymous read enabled.

7. after moving save it.

Please click below link to know how to create Docker image and push docker images into Nexus

Saturday, August 1, 2020

How to Reset Jenkins Admin password | Jenkins admin password unlock | Forgotten Jenkins Admin Password | How to Recover Jenkins admin password

Let's say you have forgotten Jenkins admin password. How to reset or retrieve the admin password? Here below are the steps for resetting Jenkins admin password:

1. Edit the Jenkins config.xml under /var/lib/jenkins to disable securityFlag by executing below command:

sudo vi /var/lib/jenkins/config.xml

you need to disable security to Jenkins by below change
2. Find this <useSecurity>true</useSecurity> and change it to <useSecurity>false</useSecurity>
3. Restart Jenkins by below command:
sudo service jenkins restart
4. Access Jenkins now, click on Manage Jenkins, click on configure Global security 

5. click on Enable security 

6. Click on Jenkins Own user database option.

7. click on apply and save
8. Now click on Manage users, click on admin, click on configure

  9. Enter new password and apply/save

DevOps Bootcamp Aug 2024 Schedule | DevOps & AWS Azure Cloud Coaching by Coach AK | DevOps and Cloud Computing Online Classes

  (Lot of new topics covered like GitHub Actions, Helm and Monitoring..) The DevOps requirements in the IT market space is expected to grow ...