Sunday, May 31, 2026

AI-Enabled DevSecOps & Cloud Engineering Bootcamp | Master DevSecOps and Multi Cloud Computing Course by Coach AK | DevSecOps and Cloud Computing Online Classes | July 2026 Schedule

Live AI-Enabled DevSecOps & Cloud Engineering Bootcamp - July 2026

🚀 Supercharge your DevOps career with real-world skills!

🔥 What You’ll Learn

👉 Master leading AI, DevSecOps tools & cloud platforms including:
✔ Git, GitHub, Bitbucket, Azure Repos
✔ Jenkins, GitHub Actions, Azure DevOps
✔ SonarQube, Trivy, Nexus, Slack
✔ Terraform, Ansible
✔ Docker & Kubernetes 
✔ Helm, Prometheus & more!

🌐 AI Enabled DevSecOps, AWS & Azure Cloud Training Included!


🧠 Real-World, Practical Training

✔ 100% Hands-On Projects
✔ Live Interactive Sessions
✔ Career Support: Resume + Interview Prep
✔ Build Recruiter-Ready Skills!


📅 Schedule Options

📍 Weekday Evening Batch
🗓 Starts July 13rd, 2026
🕕 Mondays & Wednesdays – 6:00 PM to 8:00 PM CST

📍 Weekend Batch
🗓 Starts July 25th, 2026
🕤 Sat –   09:45 AM to 11:30 AM CST
🕥 Sun – 10:30 AM to 12:30 PM CST

🌎 Online using zoom!


📌 Why Join This Bootcamp?

✅ Fully hands on coaching
✅ Industry-Relevant Projects
✅ Expert Coaching by Coach AK
✅ Flexible Schedules for Working Pros
✅ Multi-Cloud + Security Focus
✅ Networking & Career Growth Support

📞 Register Now – Spots Are Limited!

📱 Please contact coach AK on +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

➡ Early Bird Discounts Available!


🚀 Take the Next Step in Your DevOps Career!

💡 Learn with confidence. Build with purpose. Get hired faster.

Saturday, May 16, 2026

How to Implement CICD Pipeline using GitLab Yaml | GitLab CICD Tutorials | GitLab CICD Pipeline | Build Java WAR file using GitLab CICD YAML file

Here below is the code for creating GitLab CICD yaml file for Java Web App project to automate build and deployment. 

What is GitLab CICD?

GitLab CI/CD is a continuous integration and continuous deployment solution built into GitLab.


GitLab CI/CD

GitLab CI/CD is a feature of GitLab that automates:

  • Building code
  • Testing applications
  • Scanning code
  • Deploying applications

whenever developers push code into Git repositories.

What is .gitlab-ci.yml?

The .gitlab-ci.yml file is the heart of GitLab CI/CD pipelines.

It contains:

  • Pipeline stages
  • Jobs
  • Scripts
  • Variables
  • Artifacts
  • Deployment instructions

GitLab automatically reads this file whenever code changes are pushed into the repository. GitLab Runner uses a Docker container image to run the job. 

.gitlab-ci.yml for implementing CICD using GitLab

stages:

  - build

  - deploy


build_war:

  stage: build

  image: maven:3.8.6-eclipse-temurin-11


  script:

    - echo "Building WAR file using Maven"

    - mvn clean install -f MyWebApp/pom.xml

    - echo "Listing target directory"

    - ls -la MyWebApp/target


  artifacts:

    paths:

      - MyWebApp/target/*.war

    expire_in: 1 hour


deploy_to_tomcat:

  stage: deploy

  image: curlimages/curl:latest


  dependencies:

    - build_war


  script:

    - echo "Deploying WAR file to Tomcat running on AWS EC2"


    - |

      curl -v -u ${TOMCAT_USER}:${TOMCAT_PASSWORD} \

      -T MyWebApp/target/MyWebApp.war \

      "http://${TOMCAT_HOST}/manager/text/deploy?path=/MyWebApp&update=true"


Sunday, February 1, 2026

DevSecOps and Multi Cloud Bootcamp from Coach AK Schedule for Feb 2026

Fix Found | Error No plugin found for prefix 'sonar' in the current project | Jenkins throws error when Integrating with SonarQube when using Maven goal | Fix Explained

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/var/lib/jenkins/.m2/repository), central (https://repo.maven.apache.org/maven2)]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

Fix:
In Jenkins: don’t use sonar:sonar in the Maven targets field. Instead, call the Sonar goal with the fully-qualified plugin.

problem command is mvn clean install sonar:sonar

Fixed Code is mvn clean install org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar

Jenkins Pipeline Code

     stage ('Code Quality scan')  {
       withSonarQubeEnv('Sonar') {
            sh """
              ${mvnHome}/bin/mvn -f MyWebApp/pom.xml \
             org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \
              -Dsonar.organization=org_key \
              -Dsonar.projectKey=project_key \
              -Dsonar.projectName=MyWebApp
            """
        }
   }

Why this happens 

sonar:sonar relies on Maven “plugin prefix resolution”, which is not always reliable in Jenkins jobs, especially with older Maven/Jenkins integration. Fully qualifying the plugin is the standard CI fix.

Sunday, January 25, 2026

Master DevSecOps and Multi Cloud Computing Course by Coach AK | DevSecOps and Cloud Computing Online Classes | Jan 2026 Schedule

 Master DevSecOps and cloud Computing Bootcamp Schedule for Jan 2026

Are you ready to supercharge your career in DevSecOps? Whether you're a beginner or an experienced professional, this hands-on bootcamp will take you from zero to expert with real-world training on the latest DevSecOps tools and practices!

✅ Master Top DevSecOps Tools: Git, GitHub, Bitbucket, Jenkins, SonarQube, Slack, Trivy, Nexus, Terraform, Ansible, Docker, Kubernetes, Helm, Prometheus and more!
✅ Cloud Platforms – AWS & Azure
✅ Live Interactive Sessions – Get personalized guidance from industry experts!
✅ Weekend & Weekday Batches – Flexible schedules to fit your lifestyle!
✅ Weekday Evenings Batch Available! – Perfect for working professionals!
✅ Real-World Projects – Build experience that recruiters love!
✅ 100% Hands-On Training – No boring theory, just practical DevSecOps!
✅ Career Support & Guidance – Resume building, interview prep, and networking!

📅 Weekend Batch Starts: Jan 31st, 2026
🕒 Timings: Saturdays - 09:45 AM to 11:30 AM CST & Sundays - 10:30 AM to 12:30 PM CST

📍 Online – Learn from Anywhere!

🎯 Spots are Limited! Secure your seat now and take the first step toward becoming a DevSecOps pro!

📞 Contact Coach AK Now:
📱 +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

💥 Act Fast! Early Bird Discounts Available! 🚀

👉 Register Today by making payments, contact Coach AK!

📈 Why join this Bootcamp?

✅ Hands-on Training – Work on real-world projects
✅ Learn Top Security Tools - SonarQube, Aqua Trivy, GitHub Advanced Security, Checkov
✅ Expert-Led Live Sessions – Interactive & practical guidance
✅ Career Support – Resume tips, interview prep & certification guidance
✅ Project-Based Learning – Apply skills in real DevOps environments

Friday, August 8, 2025

Master DevSecOps and Multi Cloud Computing Course by Coach AK | DevSecOps and Cloud Computing Online Classes | Jan 2026 Schedule

Master DevSecOps and Cloud Computing Mastery BootCamp Schedule for Jan 2026

Are you ready to supercharge your career in DevSecOps? Whether you're a beginner or an experienced professional, this hands-on bootcamp will take you from zero to expert with real-world training on the latest DevSecOps tools and practices!

✅ Master Top DevSecOps Tools: Git, GitHub, Bitbucket, Jenkins, SonarQube, Slack, Trivy, Nexus, Terraform, Ansible, Docker, Kubernetes, Helm, Prometheus and more!
✅ Cloud Platforms – AWS & Azure
✅ Live Interactive Sessions – Get personalized guidance from industry experts!
✅ Weekend & Weekday Batches – Flexible schedules to fit your lifestyle!
✅ Weekday Evenings Batch Available! – Perfect for working professionals!
✅ Real-World Projects – Build experience that recruiters love!
✅ 100% Hands-On Training – No boring theory, just practical DevSecOps!
✅ Career Support & Guidance – Resume building, interview prep, and networking!

📅 Weekend Batch Starts: Jan 31st, 2026
🕒 Timings: Saturdays - 09:45 AM to 11:30 AM CST & Sundays - 10:30 AM to 12:30 PM CST

📍 Online – Learn from Anywhere!

🎯 Spots are Limited! Secure your seat now and take the first step toward becoming a DevSecOps pro!

📞 Contact Coach AK Now:
📱 +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

💥 Act Fast! Early Bird Discounts Available! 🚀

👉 Register Today by making payments, contact Coach AK!

📈 Why Join this Bootcamp?

✅ Hands-on Training – Work on real-world projects
✅ Learn Top Security Tools - SonarQube, Aqua Trivy, GitHub Advanced Security, Checkov
✅ Expert-Led Live Sessions – Interactive & practical guidance
✅ Career Support – Resume tips, interview prep & certification guidance
✅ Project-Based Learning – Apply skills in real DevOps environments

Monday, July 7, 2025

Master DevSecOps Bootcamp July 2025 Schedule | DevOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

 🚀DevSecOps Bootcamp - Master Security in DevOps | July 2025

Are you ready to supercharge your career in DevSecOps? Whether you're a beginner or an experienced professional, this hands-on bootcamp will take you from zero to expert with real-world training on the latest DevSecOps tools and practices!

✅ Master Top DevSecOps Tools: Git, GitHub, Bitbucket, Jenkins, SonarQube, Slack, Trivy, Nexus, Terraform, Ansible, Docker, Kubernetes, Helm, Prometheus and more!
✅ Cloud Platforms – AWS & Azure
✅ Live Interactive Sessions – Get personalized guidance from industry experts!
✅ Weekend & Weekday Batches – Flexible schedules to fit your lifestyle!
✅ Weekday Evenings Batch Available! – Perfect for working professionals!
✅ Real-World Projects – Build experience that recruiters love!
✅ 100% Hands-On Training – No boring theory, just practical DevSecOps!
✅ Career Support & Guidance – Resume building, interview prep, and networking!

📅 Weekend Batch Starts: July 19th, 2025
🕒 Batch Timings:

  • Weekend Batch: Saturdays (11:30 AM - 01:30 PM CST) & Sundays (1:00 PM - 3:00 PM CST)

📅 Weekday Evening Batch Starts: July 15th, 2025
🕒 Batch Timings:

  • Weekday Evenings Batch: Tuesdays & Thursdays (6:00 PM - 8:00 PM CST)

📍 Online – Learn from Anywhere!

🎯 Spots are Limited! Secure your seat now and take the first step toward becoming a DevSecOps pro!

📞 Contact Coach AK Now:
📱 +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

💥 Act Fast! Early Bird Discounts Available! 🚀

👉 Register Today by making payments, contact Coach AK!

📈 Why Join this Bootcamp?

✅ Hands-on Training – Work on real-world projects
✅ Learn Top Security Tools - SonarQube, Aqua Trivy, GitHub Advanced Security, Checkov
✅ Expert-Led Live Sessions – Interactive & practical guidance
✅ Career Support – Resume tips, interview prep & certification guidance
✅ Project-Based Learning – Apply skills in real DevOps environments

Sunday, June 1, 2025

DevSecOps Bootcamp June 2025 Schedule | DevOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

 ✔️ "🚀 DevSecOps Bootcamp - Master Security in DevOps | June 2025"

Are you ready to supercharge your career in DevSecOps? Whether you're a beginner or an experienced professional, this hands-on bootcamp will take you from zero to expert with real-world training on the latest DevSecOps tools and practices!

✅ Master Top DevSecOps Tools: Git, GitHub, Bitbucket, Jenkins, SonarQube, Slack, Trivy, Nexus, Terraform, Ansible, Docker, Kubernetes, Helm, Prometheus and more!
✅ Cloud Platforms – AWS & Azure
✅ Live Interactive Sessions – Get personalized guidance from industry experts!
✅ Weekend & Weekday Batches – Flexible schedules to fit your lifestyle!
✅ Weekday Evenings Batch Available! – Perfect for working professionals!
✅ Real-World Projects – Build experience that recruiters love!
✅ 100% Hands-On Training – No boring theory, just practical DevSecOps!
✅ Career Support & Guidance – Resume building, interview prep, and networking!

📅 Weekend Batch Starts: June 7th, 2025
🕒 Batch Timings: Saturdays (10 AM - 12:00 PM CST) & Sundays (11:00 AM - 1:00 PM CST)

📅 Weekday Evening Batch Starts: June 10th, 2025
🕒 Batch Timings: Tuesdays & Thursdays (6:00 PM - 8:00 PM CST)

📍 Online – Learn from Anywhere!

🎯 Spots are Limited! Secure your seat now and take the first step toward becoming a DevSecOps pro!

📞 Contact Coach AK Now:
📱 +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

💥 Act Fast! Early Bird Discounts Available! 🚀

👉 Register Today by making payments, contact Coach AK!

📈 Why Join This Bootcamp?

✅ Hands-on Training – Work on real-world projects
✅ Learn Top Security Tools – SonarQube, Snyk, Trivy, Aqua Security
✅ Expert-Led Live Sessions – Interactive & practical guidance
✅ Career Support – Resume tips, interview prep & certification guidance
✅ Project-Based Learning – Apply skills in real DevOps environments

Wednesday, February 19, 2025

DevSecOps Bootcamp Apr 2025 Schedule | DevOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

✔️ "🚀 DevSecOps Bootcamp - Master Security in DevOps | April 2025"

Are you ready to supercharge your career in DevSecOps? Whether you're a beginner or an experienced professional, this hands-on bootcamp will take you from zero to expert with real-world training on the latest DevSecOps tools and practices!

✅ Master Top DevSecOps Tools: Git, GitHub, Bitbucket, Jenkins, SonarQube, Slack, Trivy, Nexus, Terraform, Ansible, Docker, Kubernetes, Helm, Prometheus and more!
✅ Cloud Platforms – AWS & Azure
✅ Live Interactive Sessions – Get personalized guidance from industry experts!
✅ Weekend & Weekday Batches – Flexible schedules to fit your lifestyle!
✅ Weekday Evenings Batch Available! – Perfect for working professionals!
✅ Real-World Projects – Build experience that recruiters love!
✅ 100% Hands-On Training – No boring theory, just practical DevSecOps!
✅ Career Support & Guidance – Resume building, interview prep, and networking!

📅 Weekend Batch Starts: April 5th, 2025
🕒 Batch Timings: Saturdays (11:35 AM - 01:30 PM CST) & Sundays (12:45 PM - 2:30 PM CST)

📅 Weekday Evening Batch Starts: Apr 15th, 2025
🕒 Batch Timings: Tuesdays & Thursdays (6:00 PM - 8:00 PM CST)

📍 Online – Learn from Anywhere!

🎯 Spots are Limited! Secure your seat now and take the first step toward becoming a DevSecOps pro!

📞 Contact Coach AK Now:
📱 +1 (469) 733-5248 (WhatsApp Available)
📧 devops.coaching@gmail.com

💥 Act Fast! Early Bird Discounts Available! 🚀

👉 Register Today by making payments, contact Coach AK!

📈 Why Join This Bootcamp?

✅ Hands-on Training – Work on real-world projects
✅ Learn Top Security Tools – SonarQube, Snyk, Trivy, Aqua Security
✅ Expert-Led Live Sessions – Interactive & practical guidance
✅ Career Support – Resume tips, interview prep & certification guidance
✅ Project-Based Learning – Apply skills in real DevOps environments

Wednesday, January 8, 2025

How to Set Up AquaSec Trivy Scanner | How to install AquaSec Trivy Scanner on Linux OS

What is Trivy?

  • open-source security scanner tool developed by Aqua Security. 
  • Used for vulnerability scanning in such as 
    • container images 
    • file systems/folders 
    • Git repositories
    • Kubernetes clusters
    • misconfiguration in files such as Terraform, K8S manifest files
  • Trivy helps identify security issues and misconfigurations early in the software development lifecycle.

How to Install Trivy scanner on Linux OS?

Trivy scanner can be installed so many ways. Check here for more information. But we will using APT package manager to install on Ubuntu.

sudo apt-get install wget gnupg -y
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null 
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee -a /etc/apt/sources.list.d/trivy.list 
sudo apt-get update 
sudo apt-get install trivy -y

Check Trivy got installed
trivy --version


This confirm that Trivy got installed successfully.

Perform some scan locally

trivy image nginx


Complete Roadmap for 2025 to become a DevSecOps Engineer | Top DevSecOps Skills for 2025 | Skills required to become a DevSecOps engineer |

 Complete Roadmap to become a successful DevOps Engineer



We all know how DevOps is trending right now. And we know where it is going. Let's get to know what skills will make you a successful a DevOps engineer.

Top DevOps skills

1. Linux knowledge and scripting - basic troubleshooting, intermediate scripting, looking at the logs

2. Experience in Git, GitHub, Bitbucket or any version control systems such as SVN, TFVC

3. Experience in Continuous Integrations tools such as Jenkins, TeamCity, Circle CI 

4. Experience in Code quality tool/security scanning tools - Sonarqube, Aquasec Trivy

5. Experience in Infrastructure automation tools such as Terraform, AWS cloud formation

6. Experience in Configuration Management tools such as Ansible, Puppet or Chef

7. Experience in scripting languages such as YAML, groovy, Ruby, Python and Shell

8. Experience in containers such as Docker, Kubernetes and Helm

9. Experience in Monitoring tools such as Prometheus, Grafana

10. Ability to troubleshoot in case builds, deployments failure.

11. Any cloud knowledge and experience - AWS, Azure and Google cloud

Soft skills employers are looking:

These days employers are not only looking for strong technical skills but also looking "soft skills" which are essentials to become successful in IT. If you think if you are lagging on any of these skills, no worries. All these skills can be developed and improved over period of time by practicing.

1. Open minded

2. Willingness to learn new skills

3. Communication

4. Approachable

5. "Get it done" attitude

6. Being adaptable. 

Saturday, September 14, 2024

What is the difference between Code Coverage and Code Analysis

Both code coverage and code analysis are methods used to improve software quality, but they differ in their approach, goals, and implementation. Here's a detailed comparison:

Code Coverage:

  • Definition: Code coverage is a metric that measures the amount of code that is executed during automated tests.
  • Purpose: The main goal is to ensure that the test suite exercises as much of the codebase as possible, helping to identify untested areas.
  • How it Works:
    • Tools run the tests and track which parts of the code (lines, branches, functions) are executed.
    • Coverage is expressed as a percentage indicating how much of the code has been executed during tests.
  • Metrics Tracked:
    • Line Coverage: How many lines of code are executed.
    • Branch Coverage: How many decision points (e.g., if statements) are tested.
    • Function Coverage: How many functions or methods are invoked during tests.
  • Example Tools: JaCoCo, Coverage.py, Istanbul.
  • Output: Reports showing which portions of the code are covered by tests and which are not.
  • Use Case: Primarily used during the testing phase to gauge the extent to which the code is exercised by tests.

Code Analysis:

  • Definition: Code analysis is a technique used to evaluate the quality, structure, and potential errors in the codebase. It can be performed either statically (without executing the code) or dynamically (during runtime).
  • Types of Code Analysis:
    • Static Code Analysis: Inspects the source code for issues such as coding standards violations, potential bugs, or security vulnerabilities without running the code.
    • Dynamic Code Analysis: Involves analyzing the behavior of the code during execution, often looking for performance issues, memory leaks, or runtime errors.
  • Purpose: The goal is to find potential problems or improve code quality by identifying security risks, performance bottlenecks, or areas that violate best practices.
  • How it Works:
    • Static analysis tools scan the code for patterns that match predefined rules (e.g., code smells, unused variables).
    • Dynamic analysis tools monitor the code while it's running to observe its actual behavior.
  • Example Tools:
    • Static Analysis: SonarQube, Pylint, ESLint.
    • Dynamic Analysis: Valgrind, Dynatrace.
  • Output: Reports showing potential bugs, security vulnerabilities, code smells, or violations of coding standards.
  • Use Case: Can be performed during development to ensure code quality and prevent issues from entering production.

Sunday, May 12, 2024

DevOps Interview Preparation Useful real time tips | Crack DevOps Interviews | How to clear DevOps Interviews

 Are you failing in DevOps Interviews? Are you not be able to go to next round in the Interview process? 

First of all you need to have clear story about following five key items:

#1.     Come up with a story to talk about your back ground and over all experience 

            What are the Devops tools you have worked in, what cloud platform you are familiar ?

#2.     Have clear idea to talk about your role in your current project

           Your role instead of what whole team did

#3.     Your day to day responsibilities as a DevOps engineer

           How you spend your day 9-5. Starting with stand up, cicd, infra automation, collaborate with teams, meetings and documentation.

#4.     Be ready to talk about the challenges, how you overcome them in your current project

           What challenges you had, how did you over-come and what was the outcome?

#5.     Be clear about what you know and what you don’t know.            

  • It is OK to say you don’t know or have not worked that specific tool when asked about it. Show some willingness to learn
  • For e.g you may be good in CICD but not good in,  let’s say in container orchestration tools such as Kubernetes, which is OK.

Saturday, April 20, 2024

Fix for Jenkins slowness when Running in AWS EC2 instance | Jenkins Very Slow Upon Starting EC2 Instance after Stopping

Let's say that you have configured Jenkins in AWS EC2 instance and you are using AWS free tier and you are NOT using Elastic IP, so when ever you start EC2 instance after stopping, you would have noticed Jenkins UI is taking a lot of time to come up. You try to access any page in Jenkins, it will be really slow.

What is the root cause of the issue?

Because EC2 configured in AWS free tier account would have new IP after every restart, Jenkins was trying to use old IP address when you are trying to start Jenkins. Due to this issue, Jenkins will be very slow.

Pre-requisites:

  • Jenkins is setup in AWS cloud using free-tier account.

There are two ways you can fix this issue:

First option using command line

Make changes in the xml file by logging into EC2 instance through command line using Git bash or any SSH tool.

Connect to Jenkins EC2 instance using Git bash or iTerm:

Navigate to Jenkins installation directory:

cd /var/lib/jenkins/

Modify jenkins.model.JenkinsLocationConfiguration.xml file by executing below command:

sudo nano jenkins.model.JenkinsLocationConfiguration.xml

Make sure you provide Jenkins current URL in below location and restart Jenkins.

sudo service jenkins restart

Now try accessing Jenkins through UI, it will be really performing well.

Second option us using Jenkins UI

Change public URL under Manage Jenkins->System

Change Jenkins URL to current Jenkins URL:

Click on Apply-> Save.

that's it. You will notice Jenkins is performing well now.

Watch steps in YouTube channel: 

GitHub Actions CICD Pipeline to Deploy Java WebApp into Azure App Service | Integration GitHub Actions with Azure App Service

 


Pre-requisites:

  • Make sure Java web app is setup in GitHub
  • Azure subscription to create web app
What are we going to do in this lab?
1. Create a Web App in Azure Cloud
2. Configure WebApp to Deploy using gitHub Actions
3. Create workflow yaml
4. Add steps/tasks in the yaml file
5. Run the workflow yaml
6. Check if Java Web App is deployed in Azure App Service

How to Create WebApp in Azure Portal?

1. Login portal.azure.com
2. Click on App services


3.Click on + Add or click on Create app service


Click on Web App. Choose your Azure subscription, usually Pay as you Go or Free trial subscription
Create a new resource group or you can use existing resource group)


Enter App service name(it should be unique)
Publish as Code
Run time stack as Java 17
Java Web Server stack --> Tomcat 10.0
Operating System as Linux
Region as Central US or where ever you are based at

Enter LinuxPlan name
Choose pricing plan

Now go to Deployment tab:
Enable basic authentication
and enable Continuous Deployment 


Click on GitHub account, Authorize.
Authorize AzureappService
now select organization, repo, branch



You can also click on preview file to get pipeline YAML code 

Click on Review and Create




Create Web App
Now make sure AzureAppService_PublishProfile secret is automatically created in GitHub repo you selected.



Create GitHub Actions CICD workflow yaml:

name: Build and deploy WAR app to Azure Web App
on:
  push:
    branches:
      - main
  workflow_dispatch:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Java version
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'adopt'
      - name: Build with Maven
        run: mvn clean install -f MyWebApp/pom.xml
      - name: Upload artifact for deployment job
        uses: actions/upload-artifact@v3
        with:
          name: MyWebApp
          path: '${{ github.workspace }}'
  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: 'Production'
      url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
    steps:
      - name: Download artifact from build job
        uses: actions/download-artifact@v3
        with:
          name: MyWebApp
      - name: Deploy to Azure Web App
        id: deploy-to-webapp
        uses: azure/webapps-deploy@v2
        with:
          app-name: 'spingbootwebapp'
          slot-name: 'Production'
          publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_76B948D486E54ED7B06775D572207D40 }}
          package: '*.war'


Check the output after running the pipeline:


Verify if WebApp has been deployed into Azure App Service by browsing Web App url.

https://mysuperjavaapp.azurewebsites.net/MyWebApp/

Watch here all the steps in YouTube channel:

Saturday, April 6, 2024

GitHub Actions Pipeline to Create Docker Image and Push Docker Image into DockerHub | GitHub Actions Integration with DockerHub

 Please find steps for integrating DockerHub with GitHub Actions:


Implementation steps:

  • Create access token in DockerHub
  • Add access token, docker hub user name as secrets in GitHub Actions
  • Create GitHub Actions workflow yaml in your repo
  • Add tasks for Maven build, docker image creation, tagging and docker push 
  • Run the workflow/build in GitHub hosted runner(e.g. Ubuntu)
  • Verify docker image have been uploaded into DockerHub

Pre-requisites:

Steps below to create access token in DockerHub:

Click on new access token:
    Copy on Generate

 

Add Docker Hub user name and token as Secrets in GitHub Actions

Go to your GitHub Repo --> Settings --> 

Click on Secrets and Variables under Security in left nav 
Click new Repository Secret


Enter DOCKERHUB_USERNAME as secret name and 
Enter your docker hub user name


Enter DOCKERHUB_TOKEN as secret name and 
Enter your token as secret



Create GitHub Actions CICD workflow yaml:

Go to GitHub repo where your Java project is, create a new file:

.github/workflows/cicd.yml


The below file have four steps(tasks) 
    - Checkout
    - Install Java on runner
    - Build using Maven
    - Build docker image and tag it
    - Upload docker image into DockerHub

Copy below YAML code:

name: cicd-workflow to create docker image and upload into Dockerhub
on:
  push:
    branches: [ "master" ]
jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up JDK 17
      uses: actions/setup-java@v2
      with:
        distribution: 'adopt'
        java-version: '17'
    - name: Build with Maven
      run: mvn clean install
    - name: Login to Docker Hub
      uses: docker/login-action@v3
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_TOKEN }}
    - name: Build and push Docker image
      env:
        IMAGE_TAG: ${{ github.sha }}
      run: |
        docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/myspringbootapp:${IMAGE_TAG} .
        docker push ${{ secrets.DOCKERHUB_USERNAME }}/myspringbootapp:${IMAGE_TAG}


Commit the file.

As soon as you commit, build will run immediately in GitHub Actions. 
Now you can see the output of build in Actions tab.


Login to DockerHub to verify if docker image have been uploaded successfully.


Watch steps in YouTube channel: