Documentation

Deploy Operator Service for Jenkins® on Azure

Operator Service for Jenkins on Azure enables Microsoft Azure users to natively provision VirtusLab-managed Jenkins in any supported Azure region directly through the Azure Marketplace. Azure Managed Application deployed within the client’s subscription provides production-ready and fully customizable Cloud-Native CI/CD platform. The underlying infrastructure is built on top of Kubernetes to leverage self-healing and auto-scaling capabilities with declarative configuration as code.

In this tutorial, you will deploy and configure an instance of Operator Service for Jenkins on your Azure subscription directly from the Azure Marketplace.

Prerequisites

This tutorial requires basic understanding of Azure and deploying applications from the Azure Marketplace. Also, previous experience with Azure Virtual Networks and Azure Kubernetes Service might be beneficial.

Operator Service for Jenkins requires at least 2 Kubernetes nodes with 2 vCPU and 4Gi memory available. For production deployments please take a look at the capacity planning section.

Managed Operator Service for Jenkins on Azure

Operator Service for Jenkins is deployed via Azure Marketplace as Azure Managed Application within customer Azure Subscription. The customer is able to perform some additional actions listed below, in addition to the default */read actions on the application resources:

  • Microsoft.Network/virtualNetworks/virtualNetworkPeerings/*
  • Microsoft.ContainerService/managedClusters/read
  • Microsoft.ContainerService/managedClusters/listClusterUserCredential/action
  • Microsoft.Network/virtualNetworks/peer/action

If the customer wants to connect Jenkins to the existing network infrastructure VNet peering can be configured.

In case of support activities, the VirtusLab team have read & write permissions on Operator Service for Jenkins Resource Group created dynamically within the customer’s subscription.

Create Operator Service for Jenkins on Azure

Go to Azure Marketplace and search “VirtusLab Operator Service for Jenkins on Azure”.

Note: Please make sure you’ve requested private preview access, otherwise the application won’t be visible on Azure Marketplace.

Click the Create button to start the configuration process.

Configure Operator Service for Jenkins on Azure

This section outlines the step by step guide on how to configure and provision the Operator Service for Jenkins.

Basic Settings

  • Subscription: specify the subscription where you want the application to be deployed.
    • Resource Group: create a new resource group or specify the existing one.
  • Region: specify the region where you want the application to be deployed.
  • Application Name: define the name of the application deployed inside the resource group.

Networking Settings

  • Virtual Network: use existing virtual network or create a new one.
  • Subnet: use existing subnet or create a new one.

Kubernetes Settings

  • AKS Name: specify AKS cluster name.
  • Kubernetes Version: specify Kubernetes API version.
  • Maximum Kubernetes Nodes: define maximum number of nodes for cluster autoscaler.
  • Kubernetes Node Type: choose node size.

Jenkins Configuration

  • Username: specify username used to access the Jenkins instance.
  • Password: specify password used to access the Jenkins instance.
  • Storage Account: use existing or create a new storage account for Jenkins backups.

Click Review + Create and then Create. The provisioning process can take up to 20 minutes.

Access Operator Service for Jenkins

Set up access to your Azure subscription:

1
2
az login
az account set --subscription "<subscription-name>"

Get Azure Kubernetes credentials:

1
az aks get-credentials -n jenkins -g <your-management-resource-group>

Example management resource group: mrg-jenkins_operator-preview-20201021122732

Connect to the Jenkins instance (via port forwarding):

1
kubectl -n jenkins port-forward service/jenkins-operator-http-jenkins 8080:8080

The Jenkins should be now accessible on http://localhost:8080

Credentials can be obtained using commands below:

1
kubectl -n jenkins get secret jenkins-operator-credentials-jenkins -o 'jsonpath={.data.user}' | base64 -d
1
kubectl -n jenkins get secret jenkins-operator-credentials-jenkins -o 'jsonpath={.data.password}' | base64 -d

What’s Next?

In this tutorial, you’ve successfully deployed managed VirtusLab Jenkins Operator Service on Azure. You have configured the initial setup of Jenkins which is ready to use or customize further.

As a next step, we are going to Customize Operator Service for Jenkins including installing plugins, configuration as code and pipelines. This enables you to utilize the full potential of the CI/CD platform.

If you have any comments, feedback, or found a bug we would love to hear from you! Contact us at [email protected]