- Lab
- A Cloud Guru
Use Jenkins and Azure DevOps to Deploy a Node.js App
You have a Node.js application that you'd like to integrate using Jenkins. Instead of deploying to Azure from Jenkins though, you need to hand over the build artifacts to Azure DevOps to complete the deployment. Perform the necessary steps to create a CI process on the Jenkins server and the CD process in Azure DevOps.
Path Info
Table of Contents
-
Challenge
Create an Azure DevOps Organization
- Log in to the Azure Portal using the provided credentials.
- Search for Azure DevOps from the services menu.
- Create a new organization and project named MyFirstProject.
-
Challenge
Set Up Jenkins Server
- In the Azure portal, go to Virtual Machines and copy the public IP of the jenkins virtual machine.
- Paste the public IP in a new browser tab followed by
:8080
(e.g.,http://40.1.33.104:8080
). - Log in to the Jenkins server via SSH, and copy the
initialAdminPassword
. - Paste the password into the Jenkins installation wizard.
- Continue with installing Jenkins with the suggested plugins installed.
-
Challenge
Create CI Build
- This lab requires the use of a self-hosted agent. Instructions can be found here: Self-Hosted Agent Instructions.
- Create a new freestyle project.
- Fork this GitHub repository: https://github.com/ACloudGuru-Resources/content-az400-lab-resources.git using your own GitHub account.
Note: If you do not have a GitHub account, you can sign up for one for free.
- Paste in your GitHub URL, run
npm install
, and archive the artifacts. - Verify that the build was successful.
-
Challenge
Create CD Pipeline
- Create a service connection for Azure Resource Manager using the provided service principal.
- Create a service connection for Jenkins, and use the credentials you created during the Jenkins installation.
- To enable you to see the Releases option under the Pipelines icon, select AzureDevOps in the top right. In the bottom right, click Organization settings. Under the Pipelines category on the left, choose Settings. Turn off the Disable creation of classic build pipelines and the Disable creation of classic release pipelines options.
- Create a new release pipeline and deploy the artifact from Jenkins to the existing Azure WebApp.
- Make sure the pipeline is using the self-hosted agent.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.