devscripts_sno
Deploy a Single Node OpenShift (SNO) cluster on libvirt/KVM using the
dev-scripts agent installer
(make agent).
This role is a thin wrapper around the devscripts role: it prepares secrets
and host prerequisites, runs the dev-scripts configuration and host-prep steps,
executes make agent, and copies the resulting kubeconfig to ~/.kube/config.
It complements the full devscripts deployment path (baremetal/libvirt with
make all) and the physical bare metal path documented in
bm_sno (cifmw_bm_sno: true).
When used from the reproducer, set cifmw_devscripts_sno: true so the
devscripts configuration template exports SNO-specific variables (see
dev-scripts AGENTS.md).
That flag is separate from including this role by name; reproducer scenarios
such as scenarios/reproducers/va-hci-minimal-sno.yml combine the flag with
cifmw_devscripts_config_overrides for a one-master layout.
Parameters
Role-specific
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Seconds before |
|
str |
|
Path to the dev-scripts repository |
|
str |
|
Base directory for CI Framework data on the host |
|
str |
|
Directory for role script artifacts and logs |
Required for standalone use
When running this role outside the reproducer playbook, provide secret content
(the role writes files from these variables in pre.yml):
Parameter |
Description |
|---|---|
|
CI token string written to |
|
Pull secret JSON written to |
Default secret file paths (from defaults/main.yml):
Parameter |
Default |
|---|---|
|
|
|
|
Alternatively, use the file-based variables documented in the
devscripts role README if you
integrate with manage_secrets directly.
SNO and dev-scripts configuration
Set cifmw_devscripts_sno: true so conf_ciuser.j2 exports the reduced SNO
variable set (NUM_MASTERS=1, NUM_WORKERS=0, and agent-related keys).
Cluster version, networking, and VM sizing are controlled through
cifmw_devscripts_config_overrides (and optional
cifmw_devscripts_config_overrides_patch.* keys), same as the devscripts
role. See devscripts README and
Supported keys in cifmw_devscripts_config_overrides.
Common SNO overrides (also used in scenarios/reproducers/va-hci-minimal-sno.yml):
Key |
Example |
Description |
|---|---|---|
|
|
Single control-plane node |
|
|
Memory (MiB) for the master VM |
|
|
Root disk size (GiB) |
|
|
vCPUs for the master VM |
|
|
Agent installer test scenario |
|
|
Agent platform type |
|
|
OpenShift version (minor or |
|
|
Release type ( |
|
|
External network for the cluster |
|
|
IP stack ( |
Additional dev-scripts variables (for example cifmw_devscripts_cpu_passthrough,
cifmw_devscripts_host_bm_net_ip_addr) follow the devscripts role
documentation.
Task files
Task file |
Description |
|---|---|
|
Orchestrates pre, QEMU ACL, setup, and post phases |
|
Maps role vars to |
|
Installs |
|
Runs |
|
Copies cluster kubeconfig to |
Examples
Standalone playbook
See example-playbook.yaml in this role directory:
ansible-playbook \
-e @secrets.yaml \
-e @scenarios/reproducers/va-hci-minimal-sno.yml \
-i inventory.yaml \
roles/devscripts_sno/example-playbook.yaml
Minimal secrets.yaml for standalone runs:
cifmw_devscripts_sno: true
cifmw_manage_secrets_citoken_content: "{{ lookup('env', 'CI_TOKEN') }}"
cifmw_manage_secrets_pullsecret_content: |
{{ lookup('file', lookup('env', 'HOME') ~ '/pull-secret') }}
cifmw_devscripts_config_overrides:
openshift_version: "stable-4.18"
openshift_release_type: ga
num_masters: 1
master_memory: 16384
master_disk: 120
master_vcpu: 12
external_subnet_v4: 192.168.111.0/24
ip_stack: v4
agent_e2e_test_scenario: SNO_IPV4
agent_platform_type: none
Reproducer scenario (libvirt SNO)
From scenarios/reproducers/va-hci-minimal-sno.yml:
cifmw_devscripts_sno: true
cifmw_reproducer_allow_one_ocp: true
cifmw_devscripts_cpu_passthrough: true
cifmw_devscripts_host_bm_net_ip_addr: "192.168.111.1"
cifmw_devscripts_config_overrides:
num_masters: 1
master_memory: 16384
master_disk: 120
master_vcpu: 12
external_subnet_v4: 192.168.111.0/24
ip_stack: v4
agent_e2e_test_scenario: SNO_IPV4
agent_platform_type: none
openshift_release_type: ga
openshift_version: stable-4.18
After deployment, credentials are under the dev-scripts auth directory:
export KUBECONFIG=~/src/github.com/openshift-metal3/dev-scripts/ocp/ocp/auth/kubeconfig
oc login -u kubeadmin \
-p "$(cat ~/src/github.com/openshift-metal3/dev-scripts/ocp/ocp/auth/kubeadmin-password)"
SNO deployment methods in CI Framework
Flag |
Role / method |
Environment |
|---|---|---|
|
dev-scripts agent ( |
Virtual machine on the hypervisor |
|
|
Physical bare metal host |
See reproducer README for how these paths fit into full reproducer jobs.