User Tools

Site Tools


services:downstream_ci

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:downstream_ci [2026/11/08 10:09] – akraitmanservices:downstream_ci [2026/11/23 16:14] (current) – akraitman
Line 57: Line 57:
  
 Once the migration to the RDU3 Jenkins instance is complete, the temporary migration branch can be retired and the normal production configuration workflow can be used. Once the migration to the RDU3 Jenkins instance is complete, the temporary migration branch can be retired and the normal production configuration workflow can be used.
 +
 +
 +===== Job Definitions =====
 +
 +Jobs are Jenkins Job Builder YAML in:
 +
 +<code>
 +https://gitlab.cee.redhat.com/ceph/rhcs-jenkins-jobs
 +</code>
 +
 +  * Definition: ''<job>/config/definitions/<job>.yaml''
 +  * Build script: ''<job>/build/build''
 +
 +To change a job:
 +
 +  - Branch from ''master'', edit, open an MR.
 +  - Merge. The ''jenkins-job-builder'' job runs on every push to ''master'' and updates all jobs.
 +
 +To test a branch before merging:
 +
 +  - Run ''jenkins-job-builder'' with ''GITLAB_BRANCH=<branch>'' and ''JOB_NAME=<job>''.
 +  - Only that job is updated. It stays on the branch version until the next ''master'' run.
 +
 +Do not edit jobs in the Jenkins UI. The next ''master'' run overwrites them.
 +
 +
 +===== Jenkins Access =====
 +
 +Login is Red Hat SSO. Permissions are roles in ''casc.yaml'' in the [[https://gitlab.cee.redhat.com/ccit/jenkins-csb-customers/storage-casc-ceph-downstream/-/blob/main/casc.yaml#L675|configuration repository]], under ''jenkins.authorizationStrategy''.
 +
 +Roles: ''admin'', ''admin_read'', ''ceph-dev-qe-config'', ''schedule_build'', ''readonly''.
 +
 +To give someone access:
 +
 +  - Add ''%%- user: "<kerberos id>"%%'' under the role's ''entries''. Use ''%%- group: "<name>"%%'' for an SSO group.
 +  - Open an MR to ''main''. Merge.
 +  - Restart the Jenkins pod to load it (repository README).
 +
 +Notes:
 +
 +  * "<user> is missing the Overall/Read permission" means the user is in no role.
 +  * Roles assigned in the Jenkins UI are lost at the next restart.
  
  
Line 62: Line 104:
  
 The Jenkins build agents are RHEL 9 virtual machines running through OpenShift Virtualization. The Jenkins build agents are RHEL 9 virtual machines running through OpenShift Virtualization.
 +
 +Builders/OCP VM's subnet is 10.5.225.0/24
  
 Example agent types include: Example agent types include:
Line 372: Line 416:
  
  
-## Accessing Running Jenkins Builders (RDU3)+===== Accessing Running Jenkins Builders (RDU3) =====
  
-Jenkins builders run as KubeVirt Virtual Machines (VMs) in the RDU3 OpenShift cluster. Developers can access a running builder via SSH using `virtctl port-forward`.+Jenkins builders run as KubeVirt Virtual Machines (VMs) in the RDU3 OpenShift cluster. Developers can access running builders via SSH using ''virtctl port-forward''.
  
-### 1. List running builders+==== 1. List running builders ====
  
 Log in to the RDU3 OpenShift cluster and select the Jenkins tenant namespace. Log in to the RDU3 OpenShift cluster and select the Jenkins tenant namespace.
  
-```bash +<code bash> 
-oc project ceph-downstream-tenant--runtime-int+oc project ceph-downstream-tenant--pipeline
 oc get vmi oc get vmi
-```+</code>
  
 Example output: Example output:
  
-```text+<code>
 NAME                        AGE     PHASE     IP             NODENAME                                    READY NAME                        AGE     PHASE     IP             NODENAME                                    READY
 rhel8medium-rdu3-c36e1a98   8h      Running   172.17.44.37   worker07.itup-003.prod.rdu3.dc.redhat.com   True rhel8medium-rdu3-c36e1a98   8h      Running   172.17.44.37   worker07.itup-003.prod.rdu3.dc.redhat.com   True
 rhel9large-rdu3-8f20a52c    5h38m   Running   172.19.12.11   worker26.itup-003.prod.rdu3.dc.redhat.com   True rhel9large-rdu3-8f20a52c    5h38m   Running   172.19.12.11   worker26.itup-003.prod.rdu3.dc.redhat.com   True
-```+</code>
  
 Identify the running builder you want to access. Identify the running builder you want to access.
  
-### 2. Forward the builder's SSH port+==== 2. Forward the builder's SSH port ====
  
 Open a terminal and run: Open a terminal and run:
  
-```bash+<code bash>
 virtctl port-forward \ virtctl port-forward \
   vmi/rhel8medium-rdu3-c36e1a98 \   vmi/rhel8medium-rdu3-c36e1a98 \
   2222:22   2222:22
-```+</code>
  
-This forwards local TCP port `2222` to SSH port `22` on the selected VM.+This forwards local TCP port ''2222'' to SSH port ''22'' on the selected VM.
  
 **Keep this terminal running** while connected to the builder. **Keep this terminal running** while connected to the builder.
  
-### 3. Connect to the builder via SSH+==== 3. Connect to the builder via SSH ====
  
 Open a second terminal and run: Open a second terminal and run:
  
-```bash+<code bash>
 ssh -i jenkins-build.id \ ssh -i jenkins-build.id \
   -o IdentitiesOnly=yes \   -o IdentitiesOnly=yes \
   -p 2222 \   -p 2222 \
   jenkins-build@127.0.0.1   jenkins-build@127.0.0.1
-```+</code>
  
-Replace `jenkins-build.id` with the path to your authorized SSH private key.+Replace ''jenkins-build.id'' with the path to your authorized SSH private key.
  
-### Notes+==== Notes ====
  
-- You must be logged in to the RDU3 OpenShift cluster and have the required namespace permissions. +  * You must be logged in to the RDU3 OpenShift cluster and have the required namespace permissions. 
-- VM names are dynamic. Always use `oc get vmi` to find the current running builder. +  * VM names are dynamic. Always use ''oc get vmi'' to find the current running builder. 
-- Use the namespace containing the target VM. Production builders may be in `ceph-downstream-tenant--pipeline`. +  * Production builders may be in ''ceph-downstream-tenant--pipeline''. Select the namespace containing your target VM. 
-- The SSH connection requires an authorized private key for the `jenkins-build` user. +  * SSH access requires an authorized private key for the ''jenkins-build'' user. 
-- Do not modify or interrupt active Jenkins builds. +  * Do not modify or interrupt active Jenkins builds. 
-- Stop the port-forward process using `Ctrl+C` when finished.+  * Stop the port-forward process using ''Ctrl+C'' when finished. 
 + 
 + 
 +===== Debugging Failed Builds and Builders ===== 
 + 
 +==== A build fails ==== 
 + 
 +  - Open the build console. Read the first ''ERROR''. 
 +  - Bare ''java.lang.NullPointerException'' with no stack trace: open the first failed build after the last green one. It has the trace. 
 +  - List the recent builds. Note the time the failure started or changed. 
 +  - Match that time against commits in ''rhcs-jenkins-jobs'' and ''storage-casc-ceph-downstream''. 
 +  - Open ''<jenkins url>/job/<job>/config.xml'' and compare it with ''master''. The job may be running a test branch (see Job Definitions). 
 + 
 +Known signatures: 
 + 
 +  * ''NullPointerException'' in ''SecretBuildWrapper.buildEnvVars'': a credential binding in the job has no ''variable''. 
 +  * ''Permission denied (publickey)'' from GitHub: the credential is named in the ''[ssh-agent] Using credentials'' line. Check the key is still on the GitHub account at ''https://github.com/<account>.keys''. 
 + 
 +==== A build waits for a builder ==== 
 + 
 +  - Manage Jenkins -> Nodes. Open the log of any offline agent. 
 +  - List the builder VMs and their disks. 
 +  - Read the namespace events. 
 +  - DataVolume in ''ErrExceededQuota'': the storage quota is full. No new builder starts until a running one finishes. Check the quota. 
 +  - Read the controller log. It holds about 30 minutes. 
 + 
 +<code bash> 
 +oc -n ceph-downstream-tenant--pipeline get vm,vmi,dv,pvc 
 +oc -n ceph-downstream-tenant--pipeline get events --sort-by=.lastTimestamp | tail -40 
 +oc -n ceph-downstream-tenant--pipeline get appliedclusterresourcequota -o yaml 
 +oc -n ceph-downstream-tenant--pipeline logs deploy/ceph-downstream-jenkins | grep -iE 'kubevirt|Timed out waiting' 
 +</code>
  
 ===== Managing Jenkins Secrets with git-crypt ===== ===== Managing Jenkins Secrets with git-crypt =====
services/downstream_ci.1794132554.txt.gz · Last modified: by akraitman