OpenShift CodeReady Containers
This guide will walk you though how to setup Jenkins X on your laptop using OpenShift 4.x with CodeReady Containers
Prerequisites
-
once you have the
crc
binary setup the amount of memory and disk:
crc config set cpus 6
crc config set memory 11264
crc start
- once your cluster boots up you can setup your environment…
eval $(crc oc-env)
You can copy/paste the oc login -u kubeadmin
login command….
oc login -u kubeadmin -p XXXX https://api.crc.testing:6443
- 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
-
Create the cluster Git Repository based on the jx3-gitops-repositories/jx3-openshift-crc template
- if the above button does not work then please Login to GitHub first and then retry the button
-
git clone
the new repository via HTTPS andcd
into the git clone directory -
to enable webhooks you need to install and setup ngrok
-
setup a webhook tunnel to your laptop:
ngrok http http://hook-jx.apps-crc.testing
- copy your personal ngrok domain name of the form
abcdef1234.ngrok.io
into thecharts/jenkins-x/jxboot-helmfile-resources/values.yaml
file in theingress.customHosts.hosts
file so that your file looks like this…
ingress:
customHosts:
hook: "abcdef1234.ngrok.io"
...
- git add, commit and push your changes:
git add *
git commit -a -m "fix: configure webhooks"
git push origin master
-
switch to the
jx
namespace
jx ns jx
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.