Skip to content

Latest commit

 

History

History

kubernetes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Running slaves in Kubernetes

The following example runs a Jenkins Master using docker-compose and uses Minikube to run slaves within it.

Running the example will:

  • Run the Jenkins master
  • Configure Jenkins with the following:
    • jenkins_database realm (user: admin, password: admin)
    • certificate credential: minikube-cert that will enable Jenkins connect with the Minikube cluster
    • kubernetes cloud: kube-cloud with jenkinsci/jnlp-slave:latest slave template
    • maven installer: MVN-3.5.0 that will be installed on every slave when needed
    • Seed Job: seed-job that will create a sample-job using jobDSL

Prerequisites

$ minikube start

Running the example

In order to run the example

$ # Clone the repository
$ git clone https://github.com/odavid/my-bloody-jenkins.git
$ cd my-bloody-jenkins/examples/kubernetes
$ # setup variables to be used by docker-compose
$ . ./setup-env
$ # run the docker-compose
$ docker-compose up -d
$ # view logs
$ docker-compose logs -f

Wait until you'll see:

INFO: Jenkins is fully up and running

Open the browser:

open http://localhost:8080/

You should see the seed job running and waiting for a kubernetes slave to be started. Please be patient, pulling the jenkinsci/jnlp-slave:latest may take a while.