Controller for Jenkins example
84
This image to be used along with mandarnilange/jenkins-inbound-agent
Please check Git repo - Jenkins as Code for this example for this image and instructions
This example implements Jenkins as a code using Jenkins Configuration as Code Plugin.
Objective of this demo is to demonstrate capability to run Jenkins controller and agent as docker image (instead running them on VM).
This example uses official Jenkins docker images jenkins/jenkins and jenkins/inbound-agent as base images.
Implemented features
jenkins.yaml
admin and readonly (password same as username)docker-agent2UI and Microservicesgit using sshplugins.txt)Start the Jenkins controller
docker run -p 8080:8080 -p 50000:50000 -e CASC_JENKINS_CONFIG=/usr/share/jenkins/ -e MY_JENKINS_URL="http://host.docker.internal:8080/" mandarnilange/jenkins-controller
Go to Jenkins web controller at http://localhost:8080, and identify secret for docker-agent2.
Start Jenkins Agent
docker run --init -e JENKINS_URL=http://host.docker.internal:8080 -e JENKINS_AGENT_NAME=docker-agent2 -e JENKINS_AGENT_WORKDIR=/home/jenkins/agent -e JENKINS_SECRET=<Secret from master> mandarnilange/jenkins-inbound-agent
Go to Jenkins controller web and confirm agent is connected and jobs created to confirm job installation.
In case, you want to build yourself from source and run locally then check out Git repo - Jenkins as Code for this example
You can extend this implementation - some key next steps that can be taken
jenkins.yaml and recreate imagejenkins.yaml and recreate imagestartController.shSSH_PRIVATE_KEY before starting controllerplugins.txt and recreate imagejenkins.yaml and recreate imageHappy Learning!
mandarnilange/jenkins-controller
mandarnilange/jenkins-inbound-agent
Content type
Image
Digest
sha256:9a75f5a9d…
Size
399.8 MB
Last updated
over 3 years ago
docker pull mandarnilange/jenkins-controller