Node.js Application with a DevOps Workflow using Github, Jenkins, SonarQube and Azure Kubernetes

Setting up a DevOps Environment using Node.js, Github, Jenkins, SonarQube, and Azure Kubernetes

Developing a Node.js application is a common use case in the software development industry. In this article, we will show you how to set up a DevOps environment for a Node.js application using Github, Jenkins, SonarQube, and Azure Kubernetes.

Github is a version control system that allows you to store and manage your code in a centralized repository. To start, you need to create a Github repository for your Node.js application.

Next, we will set up Jenkins for continuous integration. Jenkins is a tool that automates the process of building, testing, and deploying code. To configure Jenkins, you will need to install the Jenkins plugin for Github. This plugin allows Jenkins to automatically build and test your code when changes are pushed to the Github repository.

After that, we will set up SonarQube, which is a code quality tool. It analyzes the source code of your application and identifies potential issues such as bugs, security vulnerabilities, and code smells. To set up SonarQube, you need to install the SonarQube Jenkins plugin. This plugin integrates SonarQube with Jenkins and allows you to run code analysis before deploying the code.

Finally, we will deploy the application to Azure Kubernetes, which is a managed Kubernetes service provided by Microsoft. To deploy the application, you will need to create a Kubernetes cluster in Azure and configure it to run your application.

In summary, by setting up a DevOps environment using Node.js, Github, Jenkins, SonarQube, and Azure Kubernetes, you can automate the process of building, testing, and deploying code, ensuring that your application is of high quality and is deployed to production in a timely manner.

New Project with Devops Chain Tools

Starting  to the Devops Journey

In April 2019, we initiated building a DevOps environment in our corporate while starting a new project.
I will give a short brief for every main actors in the DevOps chain and finally show the continuous delivery flow of our project.

What is DevOps?

  • Is a set of software development practices
  • Combines software development and information technology operations to shorten the systems development life cycle
  • Delivering features, fixes, and updates frequently in close alignment with business objectives

Current DevOps Chain in our project:

A DevOps toolchain is a set or combination of tools that aid in the delivery, development, and management of software applications throughout the systems development life cycle, as coordinated by an organisation that uses DevOps practices. Below picture shows the actors in our project DevOps chain:

What is Jira?

Jira is a issue tracking product developed by Atlassian that allows bug tracking and agile project management.

  • Plan – Create user stories and issues, plan sprints, and distribute tasks across your software team
  • Track – Prioritize and discuss your team’s work in full context with complete visibility
  • Release – Ship with confidence and sanity knowing the information you have is always up-to-date.
  • Report – Improve team performance based on real-time, visual data that your team can put to use.

What is GitHub?

GitHub is a code hosting platform for collaboration and version control. GitHub lets you (and others) work together on projects.

What is Jenkins?

Jenkins is an open source automation server which helps to automate the non-human part of the software development process

  • building
  • testing
  • delivering or deploying

What is SonarQube?

SonarQube is the leading product for Continuous Code Quality which detects bugs, code smells, and security vulnerabilities on 20+ programming languages. With a Quality Gate in place(Jenkins), you can fix the leak and therefore improve code quality systematically.

Project Continuous Delivery Flow

Continuous delivery automates the entire software release process. Every revision that is committed triggers an automated flow that builds, tests, and then stages the update. The final decision to deploy to a live production environment is triggered by the developer. Here is the flow prepared for Project:

We are planing to add the selenium test automation tool to our system and we will integrate it with Jenkins. I will share it soon.

In many thanks to for the contributions about it to Serhat Karataş.