WARNING: Jenkins X version 2.x is unmaintained. Do not use it.

Please refer to thev3 documentation for the latest supported version.

Get started

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Tekton as the underlying pipeline engine.

 

Step 1: Provision your Kubernetes Cluster

Provisioning your Kubernetes cluster is easy. Jenkins X does not really care how you provision your cluster, however there are many resources that are provisioned, so we recommend using the Terraform modules we've made available. Prerequisite for using them is an installedterraform binary. You can find the installation instructionshere.

 

1. Create amain.tf file in an empty directory and add the code snippet below. You will need to provide the GCP project id in which to install the cluster.

module"jx" {source ="jenkins-x/jx/google"gcp_project ="<my-gcp-project-id>"}output"jx_requirements" {value = module.jx.jx_requirements}

This setup uses defaults parameters. For more details instructions on how to provision a Kubernetes cluster with the GKE Terraform module refer to theGKE terraform module.

2. Provision the cluster using Terraform.

terraform initterraform apply

1. Create amain.tf file in an empty directory and add the code snippet below.

module"eks-jx" {source  ="jenkins-x/eks-jx/aws"}output"jx_requirements" {value = module.eks-jx.jx_requirements}output"vault_user_id" {value       = module.eks-jx.vault_user_iddescription ="The Vault IAM user id"}output"vault_user_secret" {value       = module.eks-jx.vault_user_secretdescription ="The Vault IAM user secret"}

This setup uses defaults parameters. For more details instructions on how to provision a Kubernetes cluster with the EKS Terraform module refer to theEKS terraform module.

2. Provision the cluster using Terraform.

terraform initterraform applyexport VAULT_AWS_ACCESS_KEY_ID=$(terraform output vault_user_id)export VAULT_AWS_SECRET_ACCESS_KEY=$(terraform output vault_user_secret)

 

 

Step 2: Install the Jenkins X CLI

The next step is installing the Jenkins X binaryjx for your operating system.

Using Homebrew

brew install jenkins-x/jx/jx

Using Curl

# Download the `.tar` file, unarchive it.curl -L"https://github.com/jenkins-x/jx/releases/download/$(curl --silent https://api.github.com/repos/jenkins-x/jx/releases/latest | jq -r'.tag_name')/jx-darwin-amd64.tar.gz" | tar xzv"jx"# Add `jx` to your pathsudo mv jx /usr/local/bin# verify installationjx version --short
 
# Download the `.tar` file, and unarchive it in ``a directory where you can run the `jx` command.curl -LO https://github.com/jenkins-x/jx/releases/download/latest/jx-linux-amd64.tar.gz -LO https://github.com/jenkins-x/jx/releases/download/latest/jx-linux-amd64.tar.gz.sig# Verify the integrity of the dcosign verify-blob --key https://raw.githubusercontent.com/jenkins-x/jx/main/jx.pub --signature jx-linux-amd64.tar.gz.sig jx-linux-amd64.tar.gz# Unarchive the package.tar -zxvf jx-linux-amd64.tar.gz# verify installationjx version --short
 

Using Chocolatey

1. Right-click menu:Start\[Command Prompt (Admin)\].

2. At the shell prompt, execute a `powershell.exe` command to download and install the `choco` binary and set the installation path so that the binary can be executed:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile`-InputFormat None -ExecutionPolicy Bypass`-Command"iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"`&& SET"PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
3. Install Jenkins X using Chocolatey:
choco install jenkins-x

 

 

 

Step 3: Install Jenkins X on your cluster

You have provisioned your Kubernetes cluster and installed thejx CLI. Now you are ready to install Jenkins X into the cluster. To do that, you will use thejx boot command. For more details around JX Boot refer to theRun Boot section.

In an empty directory run:

terraform output jx_requirements > <some_empty_dir>/jx-requirements.ymlcd <some_empty_dir>jx boot --requirements jx-requirements.yml