Monday, January 3, 2022

Azure DevOps Terraform Integration | How do you integrate Terraform with Azure DevOps | Automate Infrastructure setup using Terraform and Azure DevOps | Remote Store in S3 Bucket

We will be learning an interesting use case to provision resources in AWS cloud using Terraform and Azure DevOps. We will also learn how to store terraform state info remotely in AWS S3 bucket.

We will create S3 bucket for storing terraform state info and Dynamo DB table for providing state lock capability. 

We will try to create an EC2 instance and S3 Bucket using Terraform and Azure DevOps in AWS cloud. Look at the diagram that describes the whole flow. 


Watch the steps in YouTube channel:
    Pre-requistes:
    • Azure DevOps organization
    • Add Azure pipelines Terraform tasks 
    • Create AWS service connection in Azure DevOps for Terraform to use
    • Create service connection for connecting to GitHub
    • Create S3 bucket for storing TF state
    • Create dynamo DB table for providing lock capability
    • I have provided my public repo as an example which you can use.

    Step # 1 - Create S3 Bucket:
    Login to AWS, S3. Click on create S3 bucket.

    Give unique name to the bucket, name needs to be unique.

    Block all public access, enable bucket versioning as well.

    Enable encryption.


    Step # 2 - Create DynamoDB Table
    Create a new table with LockID as partition Key



    Step # 3 - Create Service connection to connect to AWS from Azure DevOps
    Go to Azure Devops, select your project. Project Settings

    Click Service Connections




    Select AWS for Terraform
    Enter Access Key, Secret Key and region code, enter name for service connection and choose Grant Access to all pipelines.


    Click Save.

    Create Service connection for connecting to GitHub

    Save

    Step 4 - Create a new Release Pipeline
    Click on Releases, New, choose New Release pipeline


    Select empty job. 

    Click on Add Artifacts


    Choose GitHub, select Github service connection, select the repo


    Click on Add tasks, type terraform
    choose the task


    Add task, search for install terraform and select installer task

    It should show something like this:
    Add another terraform task for init

    Search for terraform and add task

    select AWS from drop down, choose init as command and add -reconfigure as additional command arguments. Select AWS service connection and enter bucket name


    Add another task for plan, select right values.
    enter -out dev-plan 


    Add another task by cloning for apply.
    enter "dev-plan" as additional arguments


    Click on Save. 
    Create Release, now job should be running.





    Login to AWS--> S3 Bucket, you should see terraform state info 


    How to destroy all the resources created using Terraform?

    Clone the current infra setup release pipeline.

    Modify the pipeline name.

    Add 
    Modify the apply task to as shown in the diagram
    enter -destroy as additional argument.


    Click on Create Release to make sure all the resources are destroyed.

    Friday, December 3, 2021

    DevOps Coaching Program Model Information | AWS Cloud Azure Cloud DevOps Coaching Program Model Information

    Thanks for showing interest in learning DevOps. Believe it or not, anyone can become a successful DevOps engineer after finishing the exciting training with coach in person at Frisco, TX (currently doing only online due to covid-19)


    You really don't need to a have solid programming or software engineering experience. Many of my students did not have any computer background before attending the coaching program, now they are very successful DevOps engineers, making 6-figure income working at various companies across USA.

    What is DevOps?

    DevOps is #1 IT skills right now in the market and will be there for really long time. As a DevOps engineers/consultant you will help companies to release software products faster, automated and efficient ways.

    DevOps brings together people, processes, and technology, automating software delivery to provide continuous value to end users. DevOps automates and speeds software delivery. It makes your process and your products more reliable.

    Here is the coaching model:
    • total 9 weeks of coaching
    • 2 sessions per weekend/week
    • Fast paced
    • Purely lab oriented(hands on)
    • ~80% hands on, ~20 %theory
    • 40+ lab exercises, also few bonus lab exercises
    • Wiki page for troubleshooting needs
    • Collaborative way of learning - separate WhatsApp group per batch
    • Coach’s website(www.cidevops.com & www.coachdevops.com) also has instructions
    • YouTube channel
    • Help in resume preparation
    • Help in Interview preparation
    • Interview Coaching & tips
    • DevOps concepts and interview notes will be provided
    About the DevOps Coach:
    • 23 yrs of IT experience, 9+ Yrs in practicing DevOps and Cloud Automation.
    • Comprehensive hands on knowledge on Git, BitBucket, GitHub, Jenkins, Maven, SonarQube, Nexus, Terraform, Ansible, Docker and Kubernetes on AWS and Azure cloud platforms.
    • Many students already placed in reputed companies from my coaching program successfully.
    • Working as a Sr.DevOps Coach/Architect in a top IT services company in US.
    • Unique program...less theory, more hands on work on AWS and Azure 
    • Resume preparation will be done with candidates personally.
    • One-to-one Interview coaching.
    • Coaching is purely hands on with job relevant.
    • Coached about 990+ people successfully.
    Just believe!! Anything is possible!!

    Friday, November 26, 2021

    AWS and Azure Cloud and DevOps Coaching Online Classes - Jan 2023 Schedule

    Are you in IT? Tired of your work? Are you not able to make any good progress in your career? 

    Are you not having a job? Looking for a break in IT? Are you interested in learning DevOps? 
     
    Did you get laid off from your previous job due to Covid-19
     
    You are in the right place to kick start your career in DevOps. DevOps is one of the top and hot IT skills right now. Currently almost all the employers are struggling to get right resources in their teams who can do the DevOps and automation work..You could be that person by attending this coaching program.

    DevOps Coaching Classes schedules for Jan 2023:

    DateTimeTypeWhen?
    Jan 7th09:45 AM to 11:30 AM CST on Saturdays
             &
    10:30 AM to 12:30 pm CST on Sundays
    WeekendsSat/Sun
    Jan 19th6:00 to 8:00 PM CSTWeekdaysTuesdays/Thursdays

    DevOps Coaching Highlights:

    - Comprehensive hands on knowledge on Git, Jenkins, Maven, SonarQube, Nexus, Terraform, Ansible, Puppet, Docker, AWS IAM, ECR, Docker registry. AWS and Azure cloud platforms.

    - Coach is having about 22+ yrs of professional IT experience, 8+ Yrs in DevOps/Cloud/Automation.

    - Many students already got placed in reputed companies from this 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...
     
    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.

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

    To join coaching classes, contact the Coach below:

    Contact no # : +1(469)733-5248
    Email id: devops.coaching@gmail.com
    Contact: Coach

    If you live in India, please contact assistant coach Gunal to learn about the program:

    Name - Gunal
    Email id: gunal.j0907@gmail.com
    Contact no: +91 87600 02237


    Sunday, November 14, 2021

    Integrate Artifactory with Jenkins - Upload Artifacts from Jenkins to Artifactory - How to Integrate Jenkins with Artifactory

    How to Integrate Jenkins with Artifactory?

    You can install Artifact plug-in to integrate Artifactory with Jenkins. Let us see how to integrate Jenkins with Artifactory and able to upload War/Ear/Jar files using Maven.



    Pre-requisites:
    Install Artifactory plugin in Jenkins.
    go to Jenkins, Manage Jenkins, Manage plug-ins page, search for artifactory under available tab.

    Make sure Maven 3 is also configured under Manage Jenkins--> Global Tool configuration
    Enter Name as Maven3
    /usr/share/maven as MAVEN_HOME

    Configure Arifactory in Jenkins:
    Once you successfully install Artifactory plug-in, 
    1. Go to Manage Jenkins, Click on configure system. Look for JFrog section, click on JFrog Platform instance.
    Enter some name for Instance_ID and enter Artifactory url like below:
    http://public_dns_name:8081/artifactory
     


    2. Click on Advanced configuration
    Enter Artifactory URL again
    http://public_dns_name:8081/artifactory

     and also distribution URL as below
    http://public_dns_name:8081/distribution

    3. Add Credentials Entry


    Enter admin as username and enter Artifactory password as Admin123
    Click on Test connection to verify everything is right.

    4. Once you installed the above plug-in, click on existing Freestyle job configuration.
    4. Go under Build environment
    Select Maven 3 - Artifactory integration check box
    and click on refresh Repositories and choose repos as mentioned below:


     5.Click on Add Build step and choose Invoke Artifactory Maven 3

    6. Enter value as below, MyWebApp/pom.xml as root POM
    and goal as install

    7. Now click on Build, Jenkins should build using Maven and upload WAR file into Artifactory.

    8. Login to Artifactory, Click on Artifactory --> Artifacts


    Click on Builds to see the artifacts



    That's it folks!

    Monday, November 8, 2021

    How to Deploy Docker Containers into AKS cluster using Azure Pipelines | Deploy Docker Image into AKS cluster using Azure Release Pipelines

    We are going to learn how to deploy Docker containers into Azure Kubernetes Cluster(AKS) using Azure pipelines.




    Pre-requisites:

    1. AKS cluster needs to be up running. You can create AKS cluster using one of the below options:

    2. ACR is also setup in Azure cloud. 
    3. Already created Azure DevOps dashboard in 
    4. Dockerfile created along with the application source code

    Implementation Steps
    Step 1 - Create Azure Build pipeline for building Docker images and uploading into ACR
    Step 2 - Create Azure Release pipeline for deploying Docker containers into AKS
     
    Step 1 - How to create a Azure Build Pipeline

    1. Login into your Azure DevOps dashboard
    2. Click on Pipelines.

    3. Click on New Pipeline

    4. Click on use the classic editor
    Enter your repo name and branch name where you have stored your source code along with Dockerfile

    Click on Continue. Now choose the template by typing Docker, Select Docker container and Apply.
     

    Now pipeline is created with two tasks already. We need to configure it.

    Let's modify Build an image task.


    Select Push an image task

    Add a task for Copying YAML file, enter the Kubernetes deployment YAML file

    Add Publish artifact task


    Now click Save + Queue and run to start Building the pipeline



    Once the build is completed, you should be able to see the Docker images under 
    Services --> Repositories


    Step 2 - How to Create Release pipeline for deploying Docker containers into AKS Cluster 

    Go to Pipelines --> Click on Releases --> New Release pipeline

    Click on Stage 1 and choose a template by selecting
    Deploy to a Kubernetes cluster and click on Apply


    Change the stage name to Deploy to AKS


    Now click on Add an artifact


    Select the Build pipeline and click on the latest version

    Now click on Deploy to AKS stage
    Click on kubectl apply


    Now Click on New to enter AKS cluster connection info


    Choose the Azure subscription and enter Microsoft user credentials.



    Select AKS cluster from the drop down, choose default namespace


    Choose command as apply and select the yaml file from the dropdown from Configuration file 



    Now click on Save,
    Click on Create a release
    and then click Create to run the deployment


    Click on Stage to see the logs

    Now you will the following tasks are in green to confirm Deployment was successful.


    Let's check if deployment created any pods

    kubectl get deployments

    kubectl get pods

    kubectl get svc



    Now try to access application running inside AKS cluster by using external IP and port number


    Go to the browser enter http://external IP:5000