Friday, March 19, 2021

Install Helm 3 Linux - Setup Helm 3 on Linux | Install Helm 3 on Ubuntu | Setup Helm 3 on Linux

What is Helm?

Helm is a package manager for Kubernetes. Helm is the K8s equivalent of yum or apt. It accomplishes the same goals as Linux system package managers like APT or YUM: managing the installation of applications and dependencies behind the scenes and hiding the complexity from the user.

Helm helps you manage Kubernetes applications. Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application. Charts are easy to create, version, share, and publish.

In helm 3 there is no tiller component. Helm client directly interacts with the kubernetes API for the helm chart deployment.

Helm 3 can be installed many ways. We will install Helm 3 using script

Download installables 
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3

provide permission
sudo chmod 700 get_helm.sh

Execute script to install
sudo ./get_helm.sh

 
Verify installation

helm version --client


Friday, March 5, 2021

DevOps / Cloud Hands on Training with 100% Job placement Assitance in Frisco, Plano and Dallas Areas

Are you in IT? Tired of your work? Not able to make a progress? 
Are you not having a job? Looking for a break in IT? No Worries.. 
Are you interesting in learning about DevOps? 

DevOps is THE hot skill in US. Currently almost all the employers are struggling to get a right resource in their teams who can do the DevOps and automation work..You could be that person by attending my coaching program.

DevOps Training - Online Classes 
DateTimeTypeWhen?
Sep 509:45 AM to 11:20 AM on Sat
10:30 AM to 12:15 pm CST on Sun
WeekendsSat/Sun

Sep 86:00 to 7:45 PM CSTWeekdaysMon/Wed

DevOps Coaching Highlights:

- Comprehensive hands on knowledge on Git, Jenkins, BitBucket, GitHub, Maven, SonarQube, Nexus, Terraform, Ansible, Puppet, Docker on AWS and Azure Cloud platforms.

- 21+ yrs IT exp, 5+ Yrs in DevOps/Cloud/Automation.

- Many students already placed in reputed companies from my coaching program successfully.

- Working as a Sr.DevOps Coach/Architect in a one of the top IT services companies in USA.

- Unique program...less theory, more hands on lab exercises...in Person class room training

Resume preparation will be done with candidates personally.

One-to-one Interview coaching.

- Coaching is purely hands on with 101% job relevant.

100% Job assistance.

- Both weekday(on-line) & weekend batches available.

- Coached about  930+ people successfully for past 4 years and many of my students got placed with many large enterprises in DFW, Chicago, Florida, Seattle, Bay area, Ohio and NY areas..

Email - devops.coaching@gmail.com
Contact: AK

Thursday, March 4, 2021

How to upload Docker images to Azure Container Registry | Hosting Docker images in Azure Container Registry

Azure Container Registry is a managed, private docker registry service. You can create and maintain Azure container registries to store and manage your private Docker container images.

It is alternative to Docker Hub. Azure Container Registry allows you to build, store, and manage container images and artifacts in a private registry for all types of container deployments.

Let us see how to upload a docker images from your VM into ACR.

Watch the steps below in YouTube channel:


Pre-requistes:
Make sure you have docker installed on your VM.
 
Step 1 - Create Azure Container Registry (ACR)

Go to https://portal.azure.com/
Create a Resource, Give container registry as a name

Click on Create

  
Enter values as mentioned below:
Give registry name, resource group and choose Enable admin user and SKU as Basic 



 Click on Review and then create, now your container registry is been created.

Step 2 - Download sample Python App

Go to your machine where you have docker images stored. perform below command to download sample pythonapp which is already dockerized.
 
git clone https://bitbucket.org/ananthkannan/mydockerrepo/src/master/pythonApp/ 

cd  pythonApp/pythonApp

Step 3 - Create docker image

docker build . -t mypythonapp

type below command:
sudo docker images

this should show docker images you have created locally.

Now go to ACR, click on docker registry you created. Click on access keys under Settings.


Copy value under login server 
Login to Azure Container Registry through command line.
sudo docker login mydockerazureregistry.azurecr.io
Username: mydockerazureregistry

Enter password by copying value below password


Step 4 - Tag and Push your docker image to ACR
Now tag the docker image per as below:
sudo docker tag mypythonapp mydockerazureregistry.azurecr.io/mypythonapp

sudo docker push mydockerazureregistry.azurecr.io/mypythonapp

That's it..Docker image is pushed into ACR. You can see it under Services--> repositories


Wednesday, March 3, 2021

Deploy Springboot Microservices App into Amazon EKS Cluster using Jenkins Pipeline | Containerize Springboot App and Deploy into EKS Cluster using Jenkins Pipeline

We will learn how to automate Docker builds using Jenkins and Deploy into AWS EKS - Kubernetes Cluster. 

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:


- Automating builds using Jenkins
- Automating Docker image creation
- Automating Docker image upload into Docker Hub
- Automating Deployments to Kubernetes Cluster
 
 

Please watch the above steps in YouTube channel:
 
Pre-requistes:
1. Amazon EKS Cluster is setup and running. Click here to learn how to create Amazon EKS cluster.
3. Setup Jenkins slave, install docker in it.
4. Docker, Docker pipeline and Kubernetes Deploy plug-ins are installed in Jenkins



5. Docker hub account setup in https://cloud.docker.com
6. Install kubectl on your instance


Step #1 -Make sure Jenkins can run Docker builds after validating per pre-requistes

Step #2 - Create Credentials for Docker Hub
Go to Jenkins UI, click on Credentials -->


Click on Global credentials
Click on Add Credentials


Now Create an entry for your Docker Hub account. Make sure you enter the ID as dockerhub

Step #3 - Create Credentials for Kubernetes Cluster
Click on Add Credentials, use Kubernetes configuration from drop down.


execute the below command to get kubeconfig info, copy the entire content of the file:
sudo cat ~/.kube/config


Enter ID as K8S and choose enter directly and paste the above file content and save.

Step #4 - set a clusterrole as cluster-admin

By default, clusterrolebinding has system:anonymous set which blocks the cluster access. Execute the following command to set a clusterrole as cluster-admin which will give you the required access.

kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous

Step # 5 - Create a pipeline in Jenkins
Create a new pipeline job.


Step # 6 - Copy the pipeline code from below
Make sure you change red highlighted values below:
Your docker user id should be updated.
your registry credentials ID from Jenkins from step # 1 should be copied

node ("slave") {
  def image
  def mvnHome = tool 'Maven3'
     stage ('checkout') {
        checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '', url: 'https://bitbucket.org/ananthkannan/myawesomeangularapprepo/']]])      
        }
   
    stage ('Build') {
            sh 'mvn -f MyAwesomeApp/pom.xml clean install'           
        }
       
       
    stage ('Docker Build') {
         // Build and push image with Jenkins' docker-plugin
            withDockerRegistry([credentialsId: "dockerhub", url: "https://index.docker.io/v1/"]) {
            image = docker.build("akdevopscoaching/mywebapp", "MyAwesomeApp")
            image.push()    
            }
        }

      stage ('K8S Deploy') {
       
                kubernetesDeploy(
                    configs: 'MyAwesomeApp/springboot-lb.yaml',
                    kubeconfigId: 'K8S',
                    enableConfigSubstitution: true
                    )           
               
            
        }
    
}

Step # 7 - Build the pipeline
Once you create the pipeline and changes values per your Docker user id and credentials ID, click on 


Step # 8 - Verify deployments to K8S

kubectl get pods



kubectl get deployments

kubectl get services



Steps # 9 - Access SpringBoot App in K8S cluster
Once build is successful, go to browser and enter master or worker node public ip address along with port number mentioned above
http://master_or_worker_node_public_ipaddress:port_no_from_above

You should see page like below:




Install kubectl on Mac OS | How to install kubectl in MAC OS

Kubernetes uses a command line utility called  kubectl  for communicating with the cluster API server. It is  tool for controlling  Kubernet...