How to Setup Jenkins X on Oracle Container Engine
Abstract
This setup guide will help to setup jenkins-x on an OKE cluster.
Prereqs
- Install the OCI CLI
- Configure the oci profile config file
- Install kubectl
- install jenkins-x
Step 1
- deploy vcn and resources in OCI
- use the network module for a template of how to configure 2 load balancer subnets and 3 public worker subnet with appropriate security list
- docs on how to configure your vcn for OKE
Step 2 Deploy new cluster in OCI
- Create a new oke cluster with jenkins x installed
- the regional container engine for kubernetes rest endpoint
- to find the ocid of the vcn, compartment, load balancer and worker subnets refer to the oci console
jx create cluster oke \
--name="c2-oke-hcbc" \
--docker-registry="iad.ocir.io/<tenancy-name>" \
--compartmentId="<compartment-ocid>" \
--serviceLbSubnetIds="<loadbalancer1-ocid>,<loadbalancer2-ocid>" \
--endpoint="https://containerengine.us-ashburn-1.oraclecloud.com" \
--vcnId="<vcn-ocid>" \
--sshPublicKey="<content-of-public-ssh-key>" \
--nodePoolSubnetIds="<worker-node-subnet-ocid>" \
- follow the prompt to choose the latest kubernetes version, image versions, and instance shapes that you want
Setup 3 Download kubeconfig file
- click the access kubectl button on the oke page to download the kubectl config
mkdir -p $HOME/.kube
``` oci ce cluster create-kubeconfig –cluster-id–file $HOME/.kube/config –region us-ashburn-1
## Setup Change to jx ns
jx ns jx
## Step 4 Create a docker authentication token
- create docker auth
- for the secret value you create an auth token for the user in the tenancy
jx create docker auth –host “iad.ocir.io” –secret “
## Step 5 Deploy an application on Jenkins X
- create application
jx create quickstart -l go ```