How bathinanna/jenkins-101 works
Main Components
• Jenkins BlueOcean Container: This is built using the provided Dockerfile and configured via the Jenkinsfile (and its template). It is the core of the CI/CD system.
• Docker Host/Network: The container runs on a Docker host using the “jenkins” network. Show how Docker volumes (jenkins-data, jenkins-docker-certs) are attached.
• External Docker Containers and Agents: The README explains how to run an alpine/socat container for forwarding Docker traffic and pulling a Jenkins Python Agent image. These reflect external components which facilitate Docker communication and build execution.
• Python Application Code: The files helloworld.py and myapp/hello.py (along with myapp/requirements.txt) represent a sample or demo Python application that might be built, tested, or deployed from the pipeline.
• User Access: A web browser node connecting to Jenkins via the published ports (8080/50000). Also include the notion of Jenkins pipeline configuration via Jenkinsfile.
Relationships and Interactions
• The user interacts via a browser with the Jenkins BlueOcean Container.
• Inside Jenkins, pipeline definitions (from Jenkinsfile) trigger builds – these jobs can run the Python application code.
• The Jenkins container communicates with the Docker host: environment variables (DOCKER_HOST, DOCKER_CERT_PATH, DOCKER_TLS_VERIFY) indicate a secure connection that lets Jenkins spawn containers (e.g., using the Python agent or alpine/socat container).
• The alpine/socat container acts as a bridge by mapping the Docker port for Jenkins to reach the Docker daemon on the host.
Architectural Patterns and Design Principles
• Containerization and Isolation: Everything runs inside Docker containers, enforcing a clear separation between build/test environments and the host.
• CI/CD Pipeline Integration: The Jenkinsfile and associated pipeline template suggest a design that modularizes build steps, integration, and possibly deployment.
• Agent-based Execution: Using a dedicated Python agent container reflects a microservice-like, decoupled approach to running builds, isolating different parts of the pipeline depending on task.
Technologies and Frameworks
• Docker: For containerizing Jenkins and build components.
• Jenkins BlueOcean: Provides an enhanced Jenkins UI and pipeline orchestration.
• Python: The sample scripts indicate language-specific build and test processes.
• Alpine/socat: Used to forward traffic between containers for Docker communication.
• CI/CD concepts: Represented through Jenkinsfile pipeline definitions.