Wednesday, August 26, 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 https://releases.hashicorp.com/terraform/1.5.4/terraform_1.5.4_linux_386.zip

Install unzip utility
sudo apt-get install unzip -y

Unzip Terraform Zip file
sudo unzip terraform_1.5.4_linux_386.zip

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.

$install-dir/nexus/etc/nexus-default.properties

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.

Tuesday, August 25, 2020

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 https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
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.

Pre-requisites:
  • 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

How to Reset the Jenkins administrator 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

After changing the password, you will be able to log into your Jenkins controller again using the same username and the new password that you have just set.

Enable security

  1. Log in as your admin account.

  2. On the dashboard, select Manage Jenkins in the navigation pane on the left side of the page.

  3. On the Manage Jenkins page, under the Security section, select Configure Global Security.

  4. Set the Authorization to Logged-in users can do anything. Uncheck the option Allow anonymous read access. Select Save.

Wednesday, July 22, 2020

Install AWS CLI 2 on Red Hat Linux | Install AWS CLI 2 on Ubuntu 18.0.4

Follow these steps from the command line to install the AWS CLI on Linux.

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

aws --version
The above command should display the version like below:
aws-cli/2.0.33 Python/3.7.3 Linux/5.3.0-1030-aws botocore/2.0.0dev37

How to Integrate SonarQube & Trivy with GitLab CI/CD | DevSecOps Pipeline with Quality Gate

In this tutorial, we will integrate Trivy and SonarQube with GitLab CI/CD to build a DevSecOps pipeline for a Java web application. Th...