How gn-mm/jenkins-101 works
Project Type and Purpose
• This is a tutorial/demo DevOps project showcasing how to run Jenkins BlueOcean in Docker, configure a Jenkins pipeline (via Jenkinsfile), and use a Python agent/container to build and test a simple Python app (“myapp”).
• The primary components are:
• Jenkins BlueOcean master (Docker container)
• A Docker socket–forwarder (alpine/socat container)
• Jenkins Python agent (container)
• Sample application code repository (myapp/)
• CI pipeline definitions (Jenkinsfile, Jenkinsfile.template, my_Jenkinsfile)
File Structure Analysis
• Top level:
• Dockerfile: builds the custom Jenkins BlueOcean image
• Jenkinsfile / Jenkinsfile.template / my_Jenkinsfile: pipeline definitions
• helloworld.py: standalone demo script
• myapp/hello.py & myapp/requirements.txt: sample Python app
• Jenkinsfile*, readme.md: documentation and pipeline config
• No separate “frontend/backend”; this is purely a CI/CD infrastructure demo.
README Insights
• Explains how to build/pull the Jenkins image, create a Docker network (“jenkins”), run the Jenkins container, run the socket-forwarder container, and use the Python agent.
• References volumes (jenkins-data, jenkins-docker-certs), environment variables for Docker TLS, and port mappings (8080, 50000).
• Shows usage of a custom Jenkins Python agent image.
a. Main Components to Represent
1. Git repository (source control) holding Dockerfile, Jenkinsfiles, and myapp code
2. Docker network (“jenkins”)
3. Jenkins BlueOcean master container
– Volume: jenkins-data → /var/jenkins_home
– Volume: jenkins-docker-certs → /certs/client
– Ports: 8080 (web UI), 50000 (agent connections)
4. Alpine/socat socket-forwarder container
– Exposes host Docker socket at TCP 2376 on the network
5. Docker Engine (host machine)
6. Jenkins Python Agent container
– Pulled from devopsjourney1/myjenkinsagents:python
7. myapp build/test job
– Builds/tests hello.py per requirements.txt
b. Relationships and Data Flows
c. Architectural Patterns & Principles
– Containerized CI/CD control plane (Jenkins master + agents)
– Sidecar pattern for socket forwarding (alpine/socat)
– Declarative pipeline (Jenkinsfile) as code
– Volume-based persistence for configuration & credentials
d. Key Technologies/Frameworks
– Docker & Docker network
– Jenkins BlueOcean plugin
– Jenkins pipeline syntax (Jenkinsfile)
– Alpine Linux + socat for socket forwarding
– Python environment in agent container