Ansible Playbook for installing Tomcat 9 on Ubuntu 18.0.4
sudo vi installTomcat.yml---
- hosts: My_Group
tasks:
become: yes
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- tomcat9
Hands on DevOps Coaching provided on AWS and Azure Cloud platforms. please contact devops.coaching@gmail.com for more info.
Ansible Playbook for installing Tomcat 9 on Ubuntu 18.0.4
sudo vi installTomcat.ymlAre you in IT? Tired of your work? Are you not able to make any good progress in your career?
Date | Time | Type | When? |
---|---|---|---|
Dec 11th | 6:00 to 8:00 PM CST | Weekdays | Mondays/Wednesdays |
Dec 9th | 09:45 AM CST to 11:35 AM CST on Saturdays 10:30 AM CST to 12:30 PM CST on Sundays | Weekends | Sat/Sundays |
We are going to learn how to Automate build and deployment of Springboot Microservices App into Azure Kubernetes Cluster(AKS) using Jenkins pipeline.
Sample springboot App Code:
I have created a sample Springboot App setup in GitHub. Click here to access code base in GitHub.
Jenkins pipeline will:
- Automate maven build(jar) using Jenkins
- Automate Docker image creation
- Automate Docker image upload into Azure container registry
- Automate Deployments to Azure Kubernetes Cluster
1. AKS cluster needs to be up running. You can create AKS cluster using any of one of the below options:
To avoid charges from Azure, you should clean up unneeded resources. When the cluster is no longer needed, use the az group delete command to remove the resource group, container service, and all related resources.
az group delete --name myResourceGroup --yes --no-wait
Webhooks allows developers to trigger jobs in CI server (such as Jenkins or Azure DevOps) for every code changes in SCM. In this article, we will learn how to trigger Azure Pipeline build jobs instantly for every code change in SCM.
Go to Pipelines
Click on Pipelines
Click on EditRoot cause and Fix:
Microsoft has temporarily disabled the free grant of parallel jobs for public projects and for certain private projects in new organizations. However, you can request this grant by submitting a request. Submit a ticket using below url to request increased parallelism in Azure DevOps.
CICD Process Flow Diagram - Implement CICD using Jenkins
Let's say you have setup SonarQube using Docker or Docker Compose, you have forgotten the admin password for SonarQube. This article helps you to reset/recover the admin password. If you changed and then lost the admin
password, you can reset it using the following steps.
Watch Steps in YouTube channel:
Pre-requisites:
As we have configured SonarQube using Docker compose, We need to login to PostgreSQL running inside postgres docker container and execute update command to reset to default password.
Step 1: Login into PostgreSQL docker container
type below command to see the list of containers running in your EC2 instance.
sudo docker ps
Now login into PostgresSQL docker container
docker exec -it <container_id> /bin/bash
Step 2: Connect to PostgreSQL database by executing below command:
psql -p 5432 -d sonarqube -U sonar -h <container_id>
now enter the password for sonarqube database:
from my lab exercise, password for sonar user is admin123
Make sure it shows sonarqube which is your database schema inside PostgresSQL db.
Step 3: Execute the below query to change admin password to default password which is also admin
update users set crypted_password='100000$t2h8AtNs1AlCHuLobDjHQTn9XppwTIx88UjqUm4s8RsfTuXQHSd/fpFexAnewwPsO6jGFQUv/24DnO55hY6Xew==', salt='k9x9eN127/3e/hf38iNiKwVfaVk=', hash_method='PBKDF2', reset_password='true', user_local='true' where login='admin';
Step 4: Login to SonarQube UI and login as admin/admin
Login as admin/admin
Now it will immediately ask you to change the default admin password to something else:
That's it! That is how you recover SonarQube admin password.
References:
https://docs.sonarqube.org/latest/instance-administration/security/
How to create EC2 instance in AWS console?
What is EC2 instance?
It is virtual server provided by AWS. We will be using this EC2 to setup Jenkins. Please follow the below steps to create an EC2 instance.We will learn how to automate springboot microservices builds using Jenkins pipeline and Deploy into AWS EKS Cluster with help of Kubernetes CLI plug-in.
We will use Springboot Microservices based Java application. I have already created a repo with source code + Dockerfile. The repo also have Jenkinsfile for automating the following: