Consume ci-framework zuul base jobs

Existing jobs

The CI Framework defines a small subset of jobs.

The one you may be interested in is the multinode layout, ensuring CRC is running on a dedicated nodeset, with an external compute and an ansible-controller node.

In case you want to inherit from our base job, while still wanting to use only CRC and the ansible-controller one, you have to override a parameter via the extra_vars job parameter:

zuul.d/base.yaml
 1- job:
 2    name: my-job-with-2-nodes
 3    parent: podified-multinode-edpm-deployment-crc
 4    nodeset: centos-9-medium-crc-cloud-ocp-4-20-1-3xl
 5    vars:
 6      cifmw_deploy_edpm: false
 7      podified_validation: true
 8      cifmw_run_tests: false
 9    extra-vars:
10      crc_ci_bootstrap_networking:
11        networks:
12          default:
13            range: 192.168.122.0/24
14            mtu: 1500
15          internal-api:
16            vlan: 20
17            range: 172.17.0.0/24
18          storage:
19            vlan: 21
20            range: 172.18.0.0/24
21          tenant:
22            vlan: 22
23            range: 172.19.0.0/24
24        instances:
25          controller:
26            networks:
27              default:
28                ip: 192.168.122.11
29          crc:
30            networks:
31              default:
32                ip: 192.168.122.10
33              internal-api:
34                ip: 172.17.0.5
35              storage:
36                ip: 172.18.0.5
37              tenant:
38                ip: 172.19.0.5

Tip

We have to use that extra_vars in order to properly override the vars we define in the parent job - apparently, Zuul is merging mappings instead of properly overriding them like it does with actual string parameters.

Nodesets

Nodesets specify the sets of machines to be provisioned and used by Zuul during the execution of a specific job. Jobs inherit their nodesets from their parents, or can select their own nodesets to use by specifying nodeset: values in their own definitions.

For example, the above example job, my-job-with-2-nodes specifies the nodeset centos-9-medium-crc-cloud-ocp-4-20-1-3xl. This and all other nodesets that are available to the ci-framework’s jobs are defined in zuul.d/nodeset.yaml.

zuul.d/nodeset.yaml
 1- nodeset:
 2    name: centos-9-medium-crc-cloud-ocp-4-20-1-3xl
 3    nodes:
 4      - name: controller
 5        label: cloud-centos-9-stream-tripleo-medium
 6      - name: crc
 7        label: crc-cloud-ocp-4-20-1-3xl
 8    groups:
 9      - name: computes
10        nodes: []
11      - name: ocps
12        nodes:
13          - crc

The controller and crc nodes in the above nodeset are assigned the labels cloud-centos-9-stream-tripleo-medium and crc-cloud-ocp-4-20-1-3xl respectively. These labels select which virtual machine flavors and disk images to use when creating the virtual machines. Flavors define the number of vCPUs and the amount of memory to allocate to a given node. The complete list of labels available to our Zuul instance can be found on the ‘Labels’ tab of the Zuul web interface. The definition of these labels is found in our Zuul instance’s config project - see this commit for an example of how a label like crc-cloud-ocp-4-20-1-3xl from the above nodeset is defined.