Table of Contents
- Jenkins installed on Minikube with Helm (JCasC for configuration)
- Docker image: jenkins-on-minikube
- Jenkins agent for Maven 3 (Java 17)
- Docker image: jenkins-inbound-maven-agent
- Common tools containerized (kaniko + crane)
- Docker image: jenkins-container-tools
- Example of backend deployment on Minikube
- Source code: spring-hateoas-backend-java8
- Ingress controller to expose Jenkins and examples
This project was made following these steps:
- Install Jenkins with default chart values
- Get the default chart values (
helm/values.yaml
) - Check if all is working (
pipelines/*
) - Update plugins
- Check if all is working (
pipelines/*
) - Get updated plugins versions
- Modify Dockerfile with updated plugins versions
- Upload new Docker image (
image/Dockefile
) - Update chart values (
helm/values.custom.yaml
)
Commands are listed in (docs/commands.md
)
- (docs) Write "Methodology"
- (docs) Write "Security considerations"
- (scripts) Set parameters in a different sh file (
scripts/_params.sh
) - Configure backup lifecycle
- Update Jenkins (Jenkins chart 4.3.23)
- Ubuntu 22.04
- Docker 23.0.4
- Docker Hub account (Read
Security consideration #1
) - Kubectl v1.27.1
- Minikube v1.30.1
- Helm v3.11.3
- Jenkins chart 4.3.20 (Jenkins 2.387.2)
- Github account (Jenkins uses SSH to connect to Github. Read
Security considerations #2 and #3
)
-
#1. The script
scripts/_init.sh
requires a$HOME/.docker/config.json
file to connect Jenkins to Docker hub. You can create this file withdocker login
. This consideration is based on https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry -
#2. Public SSH key fingerprints are used to validate a connection to a remote server. In this project, Jenkins uses GitHub's SSH key fingerprints. They are configured as
approvedHostKeys
inhelm/values.security.yaml
. Those values could change in the future. -
#3. The script
scripts/_init.sh
requires a SSH key to connect Jenkins to Github. If there is a SSH key in pathGITHUB_SSH_KEY_FILE
, the script will ask to use it. Else, a new SSH key will be created and then the public key must be registered on your Github account. When you uninstall this project, you should consider to remove the SSH key from local and your Github account. This consideration is based on https://docs.github.com/en/authentication/connecting-to-github-with-ssh
-
Clone the repo
git clone https://github.com/kenkina/jenkins-on-minikube.git
-
(Optional) Change parameters in
scripts/_init.sh
-
Execute
scripts/_init.sh
sh scripts/_init.sh
- Execute
scripts/_wipe.sh
sh scripts/_wipe.sh
Distributed under the MIT License. See LICENSE.txt
for more information.