Minikube

Setup Jenkins X on your laptop

NOTE

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

This guide will walk you though how to setup Jenkins X on your laptop using minikube

Prerequisites

NOTE:- User of windows 10 home (Hyper-V not supported). To install Minikube consider Docker as driver(docker should be pre-installed) instead of virtualBox driver. Use command “minikube start –driver=docker”.

  • If you have previously used minikube please delete the current cluster:
minikube delete
  • You need to create a minikube cluster via the following command:
minikube start --cpus 4 --memory 6048 --disk-size=100g --addons=ingress --kubernetes-version=1.24

Setup

export DOMAIN="$(minikube ip).nip.io"
jx gitops requirements edit --domain $DOMAIN
  • the ingress.domain in jx-requirements.yml should now be configured to the value of $DOMAIN

  • to enable webhooks you need to install and setup ngrok

  • setup a webhook tunnel to your laptop:

ngrok http 8080
  • 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"
  • git add, commit and push your changes:
git add *
git commit -a -m "fix: configurations for local minikube"
git push origin main
jx ns jx
  • once Jenkins X is installed run the following command to enable webhooks via ngrok
kubectl port-forward svc/hook 8080:80

Restarting

If you quit minikube, reboot and come back to start working on it again, you will have to complete the whole procedure under #setup to get back to speed. The minikube ip is normally the same on each invocation, but you should verify that as well.