Overview
This template provides a production‑ready Jenkins instance as a Monk runnable. You can:- Run it directly to get a managed Jenkins automation server with sensible defaults
- Inherit it in your own runnable to seamlessly add CI/CD capabilities to your stack
What this template manages
- Jenkins LTS container (
jenkins/jenkins:ltsimage) - Web UI service on port 8080
- Agent communication service on port 50000
- Persistent volume for Jenkins home directory
- Admin credential retrieval action
Quick start (run directly)
- Load templates
- Run Jenkins with defaults
- Get admin credentials
http://localhost:8080 (or the runnable hostname inside Monk networks) and complete the initial setup wizard using the admin password retrieved in step 3.
Configuration
Key variables you can customize in this template:${monk-volume-path}/jenkins on the host, mounted to /var/jenkins_home inside the container.
Use by inheritance (recommended for apps)
Inherit the Jenkins runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
httpon TCP port8080(web UI) - Service:
tcp-agenton TCP port50000(agent communication) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the Jenkins host.
Persistence and configuration
- Data path:
${monk-volume-path}/jenkins:/var/jenkins_home - All Jenkins configuration, plugins, jobs, and build artifacts are persisted in this volume.
- You can customize JVM options via the
JAVA_OPTSenvironment variable.
Features
- Pipeline as Code (Jenkinsfile)
- 1800+ plugins available
- Distributed builds
- REST API
- Blue Ocean UI
- Docker integration
- Extensive SCM integration (Git, GitHub, GitLab, Bitbucket)
Admin credentials
To retrieve the initial admin password after first start:http://\<jenkins-host>:8080.
Related templates
- Integrate with source control (
gitlab/,github/templates) - Use with artifact repositories (
nexus/,artifactory/) - Combine with container registries for Docker image management
- Deploy alongside
sonarqube/for code quality analysis
Troubleshooting
- Jenkins may take a few minutes to start on first launch while it initializes the home directory.
- If you cannot retrieve admin credentials, ensure the container has fully started and the volume is writable by the Jenkins user.
- Check logs:
- For plugin installation issues, verify network connectivity and check the Jenkins system log in the web UI.