Installation
This document describes installation procedure of self-hosted Operator Service for Jenkins®.
Installation of a self-hosted Operator Service for Jenkins® happens with Helm Chart.
When purchasing the Operator Service for Jenkins, client is given a personalized token with a password and name of the registry to access the Operator’s image and helm chart.
First create namespaces of choice to deploy Operator and Jenkins in.
$ kubectl create ns <operator-namespace>
$ kubectl create ns <jenkins-namespace>
Second create a secret for downloading the Enterprise image by exchanging the placeholders in the below code:
$ kubectl create secret docker-registry token \
--namespace <operator-namespace> \
--docker-server=<registry-name> \
--docker-username=<token-name> \
--docker-password=<password>
This secret must reside in the same namespace as Operator and be named image-secret in order to fetch the image.
Third create a secret with the license information.
apiVersion: v1
kind: Secret
metadata:
name: <custom-name>
stringData:
clientName: "<your-name>"
licenseKey: "<your-license-key>"
By default the Operator will look for a secret named “license”, but you can use custom name by specifying it in the flag in the Operator command:
-license-secret=<custom-name>
Next, prepare your two custom values.yaml files: values-operator.yaml and values-crs.yaml, and specify all of the desired configuration for the Operator and other available Custom Resources. Don’t forget to exchange the jenkins namespace and operator namespace with the one you have just created. You can copy and customize the default files:
Login to registry to download Helm charts:
$ export HELM_EXPERIMENTAL_OCI=1
$ helm registry login operatorservice.azurecr.io -u <token-name> -p <token-password>
In this step, replace default values.yaml with your own. Deploy Operator Service for Jenkins® in the first one running Helm command:
$ helm install operator-service -f values-operator.yaml ./op-svc-jenkins -n <operator-namespace>
$ helm install operator-service-crs -f values-crs.yaml ./op-svc-jenkins-crs -n <jenkins-namespace>
At that moment, the Operator and Jenkins pods will start to appear. You can watch over the process by running:
$ kubectl get po --all-namespaces -w
Operator will keep on printing logs about reaching consecutive phases and announce itself Ready. Then you can start to use it freely.
To connect to the UI you can use:
$ kubectl -n <jenkins-namespace> port-forward <jenkins-pod> 8080:8080
At http://localhost:8080 (or with customized suffix) you will find the Jenkins UI.
Login credentials can be obtained using commands below:
$ kubectl -n <jenkins-namespace> get secret <jenkins-name>-credentials -o 'jsonpath={.data.user}' | base64 -d
$ kubectl -n <jenkins-namespace> get secret <jenkins-name>-credentials -o 'jsonpath={.data.password}' | base64 -d
For further information about customization and configuration of Jenkins please refer to the Getting Started section.