This repository provides the configuration and deployment logic for a containerized Jenkins controller used in Ceph Storage pipelines.
Before deploying the containerized controller, ensure the following requirements are met:
-
Container Runtime: Podman or Docker must be installed on the host machine.
-
Configuration Files and Directories: The following are important files and directories -
containers: Contains custom Jenkins controller & agent Containerfile and configs.containers/controller/plugins.txt: Lists all required plugins.casc.yaml: Defines system-level configurations.properties.yaml: Actual environment configurations.jobs/seed.groovy: The initial script to bootstrap the job-processing logic.scripts:Bash/Pythonscripts to perform specific operations.$HOME/jenkins_config: Jenkins configs (properties.yaml, jenkins_home & shared_workspace)
Deployment follows "Configuration as Code" workflow to maintain the repository as the single source of truth.
-
Create Config Directory: Create Jenkins home directory for Jenkins config and shared workspace
mkdir -p $HOME/jenkins_config -
Create Properties: Create
$HOME/jenkins_config/properties.yamlwith your real-world Jenkins configs. This "hydrates" thecasc.yamltemplate with your actual cluster details and secrets. -
Start socket service: This will enable and start the socket for user.
systemctl --user enable --now podman.socket -
Verify socket exists: Verify the socket now exists for user id.
ls -l /run/user/$(id -u)/podman/podman.sock -
Enable "Linger": This will keep services running after user logout.
sudo loginctl enable-linger $(id -u) -
Set Execute Permissions: Set execute permissions to
scripts/deploy.shscript.chmod +x ./scripts/deploy.sh
-
Execute
deploy.sh: This script will build controller and agent images and deploysjenkins-controllercontainer../scripts/deploy.sh
-
Bootstrap Jobs: Upon startup, JCasC will automatically execute
seed.groovyto create theSeed Jobjob. -
Process Project Jobs: Run the
Seedfrom the Jenkins UI, providing the relative path to your project's Groovy definitions to generate project-specific pipelines.
The Ceph Jenkins environment utilizes multiple logging layers to ensure visibility across the "controller/builder" architecture.
-
Controller Logs: Monitor the startup and JCasC initialization via
podman logs -f jenkins-controller. -
Builder Logs: Detailed system logs are often captured during build execution using
journalctl.