OpenShift

Setup Jenkins X on an existing OpenShift cluster

If you don’t have a cluster or want to try Openshift on your laptop then please try Install Jenkins X with OpenShift CodeReady Containers


NOTE

Ensure you are logged into GitHub else you will get a 404 error when clicking the links below


Prerequisites

  • OpenShift cluster is installed and working correctly. You have also installed the oc binary on your $PATH
oc login -u kubeadmin -p ...
  • to allow Tekton to be installed on OpenShift you also need to run the following commands:
oc new-project tekton-pipelines
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-controller
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-webhook

Setup

cluster:
...
ingress:
  domain: mydomain.com
...
  • git add, commit and push your changes:
git add *
git commit -a -m "fix: added domain"
git push origin master
jx ns jx

Enable WebHooks

If your cluster is not accessible on the internet and you can’t open a firewall to allow services like GitHub to access your ingress then you will need to enable webhooks as follows:

kubectl get ing
  • copy the hook host name into…
ngrok http http://yourHookHost
  • copy your personal ngrok domain name of the form abcdef1234.ngrok.io into the charts/jenkins-x/jxboot-helmfile-resources/values.yaml file in the ingress.customHosts.hosts file so that your file looks like this…
ingress:
  customHosts:
    hook: "abcdef1234.ngrok.io"
...

OpenShift CodeReady Containers

Use Jenkins X and OpenShift 4.x on your laptop


Last modified November 24, 2020: fix: use consistent links (e57cb94b10)