❗ Please refer to EDP documentation to get the notion of the main concepts and guidelines. |
---|
Get acquainted with the Jenkins Operator and the installation process as well as the local development, and architecture scheme.
Jenkins Operator creates, deploys and manages the EDP Jenkins instance, which is equipped with the necessary plugins, on Kubernetes and OpenShift. Also, Jenkins operator is responsible for creating Jenkins job's.
There is an ability to customize the Jenkins instance and to check changes during the application creation.
NOTE: Operator is platform-independent, that is why there is a unified instruction for deploying.
- Linux machine or Windows Subsystem for Linux instance with Helm 3 installed;
- Cluster admin access to the cluster;
- EDP project/namespace is deployed by following the Install EDP instruction.
In order to install the EDP Jenkins Operator, follow the steps below:
-
To add the Helm EPAMEDP Charts for local client, run "helm repo add":
helm repo add epamedp https://epam.github.io/edp-helm-charts/stable
-
Choose available Helm chart version:
helm search repo epamedp/jenkins-operator -l
Example response:
NAME CHART VERSION APP VERSION DESCRIPTION epamedp/jenkins-operator 2.13.1 2.13.1 A Helm chart for EDP Jenkins Operator epamedp/jenkins-operator 2.13.0 2.13.0 A Helm chart for EDP Jenkins Operator epamedp/jenkins-operator 2.12.1 2.12.1 A Helm chart for EDP Jenkins Operator epamedp/jenkins-operator 2.12.0 2.12.0 A Helm chart for EDP Jenkins Operator
NOTE: It is highly recommended to use the latest released version.
-
Full chart parameters available in deploy-templates/README.md.
NOTE: You can add any number of shared libraries. For correct passing values you have to adjust it by index [i]:
--set jenkins.sharedLibraries[0].name="stub-name" --set jenkins.sharedLibraries[0].url="stub-url" --set jenkins.sharedLibraries[0].tag="stub-tag" --set jenkins.sharedLibraries[0].secret="stub-secret-name" --set jenkins.sharedLibraries[0].type="ssh"
NOTE: Adding private shared-library requires pre-condition before deploy - created secret with credentials to private repository:
Shared library secrets examples:
SSH secret:
kind: Secret
apiVersion: v1
metadata:
name: <jenkins.sharedLibraries[i].secret>
namespace: <edp-project>
data:
id_rsa: private-key
id_rsa.pub: private-key
username: username
type: Opaque
Password secret:
kind: Secret
apiVersion: v1
metadata:
name: <jenkins.sharedLibraries[i].secret>
namespace: <edp-project>
data:
first_name: first-name
last_name: last-name
password: password
username: username
type: Opaque
Token secret:
kind: Secret
apiVersion: v1
metadata:
name: <jenkins.sharedLibraries[i].secret>
namespace: <edp-project>
data:
password: token
username: username
type: Opaque
NOTE: Due to the unstable work of the Jenkins plugin with the "token" secret type, it is recommended to use the "password" secret type. Simply add the token into the Password field.
- Install operator in the namespace with the helm command; find below the installation command example:
helm install jenkins-operator epamedp/jenkins-operator --version <chart_version> --namespace <edp-project> --set name=jenkins-operator --set global.edpName=<edp-project> --set global.platform=<platform_type> --set global.dnsWildCard=<cluster_DNS_wildcard>
- Check the namespace that should contain operator deployment with your operator in a running status.
In order to develop the operator, first set up a local environment. For details, please refer to the Local Development page.
Development versions are also available, please refer to the snapshot helm chart repository page.