Path D: BuildStreaM Automated Deployment¶
Overview¶
Use this deployment path to automate image building and node provisioning with BuildStreaM and its managed GitLab pipelines.
The workflow prepares the Omnia Infrastructure Manager (OIM) and the base module services before deploying BuildStreaM. A change to the catalog starts the build pipeline, which synchronizes repository content and builds the selected images. A change to the PXE mapping starts the deploy pipeline, which deploys the selected image, restarts the target nodes, and validates the deployment. Deploying BuildStreaM prepares the automation environment; image building and node provisioning occur when you run the corresponding pipeline.
BuildStreaM also provides an optional cadence workflow. It periodically
reconciles the RPM repositories referenced by cadence_catalog_rhel.json and,
when package content changes, runs image build, deployment, node restart, and
validation in one pipeline. The independent build and deploy workflows remain
available.
BuildStreaM workflow¶
Prerequisites¶
- Use an Omnia source checkout on the OIM. For the documented validated RC1 baseline, run BuildStreaM on RHEL 10.0 with Python 3.12 or later, Ansible Core 2.20 or later, and Podman 5.0 or later. See the Operating Systems Matrix.
- Set
SYSTEM_ADMIN_NIC_IPV4insrc/main/omnia.envto an IPv4 address assigned to an OIM interface. KeepOMNIA_PROJECT_NAME=project_defaultfor this workflow because the current BuildStreaM setup role fixes its project input and output directories to that name. - Prepare the Repository Manager and Image Build Manager base services. The
BuildStreaM precheck specifically requires running
pulp,minio-server, andregistrycontainers and the two modules' credential files. - Provide a GitLab host reachable from the OIM through SSH and HTTPS. Provide its root SSH password during BuildStreaM credential collection.
- Disable SELinux on the GitLab host and reboot it before deployment. The source prerequisite check stops when SELinux is enabled.
- Ensure the GitLab host meets the minimum CPU, memory, and free-storage values
configured in
build_stream_config.yml. The supplied defaults are 2 CPU cores, 4 GB of memory, and 20 GB free on/. - Ensure the configured BSM and GitLab HTTPS ports are available. The GitLab
host must be able to reach
build_stream_host_ip. - Provide working package repositories on the OIM and GitLab host. GitLab deployment also requires access to the configured GitLab package source and the registries used for the runner, helper, and default CI images.
- Avoid overlapping pipelines that operate on the same catalog, image, mapping, or deployment state. The generated GitLab configuration permits concurrent pipelines.
Procedure¶
1. Configure and set up the OIM¶
-
Edit the environment configuration from the Omnia source tree:
Run on: OIM hostcd src/main vi omnia.env -
Create the shared virtual environment, install module dependencies, and stage the module input files and BuildStreaM application:
Run on: OIM host./omnia.sh --setup-venvThis command runs the selected modules'
domain-init.shscripts. With the standard environment, BuildStreaM stages its configuration at:<OMNIA_DATA_PATH>/build_stream/input/<OMNIA_PROJECT_NAME>/build_stream_config.ymlBuildStreaM derives its data directory directly from
OMNIA_DATA_PATH. SetOMNIA_DATA_PATHto customize the common data root. -
Load the installed environment and activate the shared virtual environment in the current shell:
Run on: OIM hostsource /etc/profile.d/omnia-env.sh source "$OMNIA_DATA_PATH/activate-omnia.sh" build_stream_path="${OMNIA_DATA_PATH}/build_stream" repo_manager_path="${OMNIA_DATA_PATH}/repo_manager" image_build_manager_path="${OMNIA_DATA_PATH}/image_build_manager" orchestrator_path="${OMNIA_DATA_PATH}/orchestrator"This workflow currently requires
OMNIA_PROJECT_NAME=project_default, but using the loaded variables keeps the data root portable.
For all environment and setup options, see Configure the environment and Set up the OIM.
2. Configure and prepare the base modules¶
BuildStreaM does not consume an upstream status file during its own preparation, but its precheck and generated pipelines depend on the base module services and inputs.
-
Review the staged project inputs that the GitLab deployment copies into the managed repository:
Deployment module Inputs used by the managed pipelines Repository Manager repo_manager_config.yml,repo_manager_endpoint_config.ymlImage Build Manager image_build_config.yml,package_groups.ymlOrchestrator omnia_config.yml,orchestrator_config.yml,network_spec.yml,security_config.yml,storage_config.yml,high_availability_config.yml,additional_cloud_init.yml,pxe_mapping_file.csv,set_pxe_boot_config.ymlRepository and image-build inputs must be ready before the first build pipeline. Orchestrator inputs and the mapping must be ready before the deploy pipeline.
-
Prepare the base services and credentials in the order implemented by
omnia.sh:Run on: OIM hostcd src/main ./omnia.sh --prepare-baseThe BuildStreaM precheck expects
pulp,minio-server, andregistryto be running. It also checks for:$repo_manager_path/input/$OMNIA_PROJECT_NAME/repo_manager_config_credentials.yml $image_build_manager_path/input/$OMNIA_PROJECT_NAME/image_build_credentials.yml
3. Configure BuildStreaM¶
-
Edit the staged consolidated configuration:
Run on: OIM hostvi "$build_stream_path/input/$OMNIA_PROJECT_NAME/build_stream_config.yml" -
Set
enable_build_stream: trueand providebuild_stream_host_ipandgitlab_host. Review the following values in the same file:Setting Purpose build_stream_portHTTPS port for the BSM API; supplied default is 8010.gitlab_project_nameManaged project name; supplied default is omnia-catalog.gitlab_project_visibilityprivate,internal, orpublic.gitlab_default_branchBranch used for repository and API operations. gitlab_https_portHTTPS port exposed by GitLab; supplied default is 443.gitlab_min_storage_gbMinimum free space checked on the GitLab host. gitlab_min_memory_gbMinimum memory checked on the GitLab host. gitlab_min_cpu_coresMinimum CPU count checked on the GitLab host. gitlab_puma_workersGitLab Puma worker count. gitlab_sidekiq_concurrencyGitLab Sidekiq concurrency. Do not create a separate
gitlab_config.ymland do not add unsupported keys; the source schema rejects unknown fields.
For the complete input and credential contract, see BuildStreaM and the BuildStreaM contract.
4. Validate and deploy BuildStreaM¶
-
Run the opt-in base-service precheck:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run build_stream --tags precheckRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/build_stream/playbooks ansible-playbook build_stream.yml --tags precheck -
Run the complete untagged BuildStreaM flow:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run build_streamRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/build_stream/playbooks ansible-playbook build_stream.ymlThe flow validates
build_stream_config.yml, collects or reuses the encrypted BuildStreaM credentials, prepares PostgreSQL, the BSM API, and the playbook watcher on the OIM, and then deploys and configures GitLab. The GitLab phase creates the managed project and trigger, sets the BSM project variables, pushes the pipeline and available module input files, and deploys an online project runner.Credential collection requests the GitLab root and SSH passwords, BSM authentication username and password, and PostgreSQL username and password. These values are written to an Ansible Vault-protected file beside the BuildStreaM configuration.
-
Confirm that preparation wrote:
$build_stream_path/output/$OMNIA_PROJECT_NAME/build_stream_status.ymlThe current writer records
overall_status: prepared. GitLab deployment does not change that field torunning.
5. Review the managed GitLab project¶
-
Open the URL reported as
gitlab_urlinbuild_stream_status.ymland sign in asroot. The project path uses the configured project name:https://<gitlab_host>:<gitlab_https_port>/root/<gitlab_project_name> -
Confirm that the project contains
catalog_rhel.json,omnia.env, theinput/directory, and these pipeline definitions:.gitlab-ci.yml .gitlab-ci-build.yml .gitlab-ci-deploy.yml .gitlab-ci-deploy-child-template.yml .gitlab-ci-cleanup.yml .gitlab-ci-cleanup-child-template.yml -
Under Settings > CI/CD > Runners, confirm that the Omnia Hosted Runner is online.
6. Run the build pipeline¶
-
Review the root
catalog_rhel.jsonagainst the catalog schema in:src/build_stream/app/core/catalog/resources/CatalogSchema.jsonWhen creating a new catalog revision, use a unique catalog
identifier. Configure the repository and image-build files underinput/for the catalog content and functional groups being built. -
Commit a change to
catalog_rhel.json. The parent pipeline automatically selects the build pipeline. Alternatively, start a web pipeline and choose its manual build action, or invoke it withPIPELINE_TYPE=build. -
Monitor the source-defined build stages:
initialization -> parse-catalog -> configure-local-repository -> build-images -> summaryThe pipeline uses BSM jobs to invoke Repository Manager and Image Build Manager. Do not start the deploy pipeline until the build pipeline and its module status contracts are successful.
For detailed operation and retry guidance, see Execute the Build Pipeline.
7. Run the deploy pipeline¶
-
Edit
input/orchestrator/pxe_mapping_file.csvin the managed project. Keep the source-defined header and assign only functional groups that have built images:FUNCTIONAL_GROUP_NAME,GROUP_NAME,SERVICE_TAG,PARENT_SERVICE_TAG,HOSTNAME,ADMIN_MAC,ADMIN_IP,BMC_MAC,BMC_IP,IB_NIC_NAME,IB_IPThe following example uses the mixed x86_64 and aarch64 functional groups in the default RHEL 10.0 catalog:
Example: input/orchestrator/pxe_mapping_file.csvFUNCTIONAL_GROUP_NAME,GROUP_NAME,SERVICE_TAG,PARENT_SERVICE_TAG,HOSTNAME,ADMIN_MAC,ADMIN_IP,BMC_MAC,BMC_IP,IB_NIC_NAME,IB_IP slurm_control_node_rhel_10_0_x86_64,grp0,BSM001,,nid001,02:00:00:00:31:01,172.16.107.81,02:00:00:00:32:01,172.17.107.81,, slurm_node_rhel_10_0_aarch64,grp1,BSM002,BSM006,nid002,02:00:00:00:31:02,172.16.107.82,02:00:00:00:32:02,172.17.107.82,InfiniBand.Slot.7-2,192.168.0.121 login_compiler_node_rhel_10_0_aarch64,grp8,BSM003,,nid003,02:00:00:00:31:03,172.16.107.83,02:00:00:00:32:03,172.17.107.83,InfiniBand.PCIe.Slot.8-1,192.168.0.122 service_kube_control_plane_rhel_10_0_x86_64,grp3,BSM004,,nid004,02:00:00:00:31:04,172.16.107.84,02:00:00:00:32:04,172.17.107.84,, service_kube_control_plane_rhel_10_0_x86_64,grp3,BSM005,,nid005,02:00:00:00:31:05,172.16.107.85,02:00:00:00:32:05,172.17.107.85,, service_kube_node_rhel_10_0_x86_64,grp1,BSM006,,nid006,02:00:00:00:31:06,172.16.107.86,02:00:00:00:32:06,172.17.107.86,, service_kube_control_plane_rhel_10_0_x86_64,grp3,BSM007,,nid007,02:00:00:00:31:07,172.16.107.87,02:00:00:00:32:07,172.17.107.87,, os_rhel_10_0_x86_64,grp6,BSM008,,nid008,02:00:00:00:31:08,172.16.107.88,02:00:00:00:32:08,172.17.107.88,, os_rhel_10_0_aarch64,grp7,BSM009,,nid009,02:00:00:00:31:09,172.16.107.89,02:00:00:00:32:09,172.17.107.89,,Important
Replace every sample service tag, MAC address, IP address, and hostname with values from the target servers. Keep the exact 11-column header; leave optional fields empty with consecutive commas. In the example, the Slurm compute node and its service Kubernetes parent share
grp1, and the compute node'sPARENT_SERVICE_TAGidentifies that worker. PopulateIB_NIC_NAMEandIB_IPtogether, or leave both empty. Use unique lowercase hostnames without a domain suffix; whendns_enabledistrue, usenid001throughnid999. Ensure the admin addresses belong to a configured admin subnet and every functional group exists incatalog_rhel.jsonand has a successful image-build result.For the complete schema, validation rules, and OME-generated workflow, see Create a Mapping File and the PXE Mapping File reference.
-
Commit the mapping change. The parent pipeline automatically selects the deploy pipeline. Alternatively, start a web pipeline and choose its manual deploy action, or invoke it with
PIPELINE_TYPE=deploy. -
The deploy parent lists the available image groups and generates a child pipeline. Select the intended image group, then start its manual deploy action. Monitor the child stages:
select_image -> deploy -> restart -> validate -> summaryThe restart stage performs the PXE restart workflow. Do not run a separate PXE utility step for this BuildStreaM deployment.
For the complete procedure, see Execute the Deploy Pipeline.
8. Optionally enable automated cadence¶
Cadence is disabled by default. Enable it only after the independent build and deploy inputs are complete and a writable local clone of the managed GitLab project is available on the OIM.
Configure the cadence mapping in build_stream_config.yml, validate the
file, and restart playbook-watcher.service. When a reconciliation finds RPM
package changes, BuildStreaM updates cadence_catalog_rhel.json and runs:
initialization
-> parse-catalog
-> configure-local-repository
-> build-images
-> deploy
-> restart
-> validate
-> summary
For configuration, manual invocation, verification, and failure handling, see Automate Build and Deployment with Cadence.
Verification¶
-
Inspect the BuildStreaM output contract on the OIM:
Run on: OIM hostcat "$build_stream_path/output/$OMNIA_PROJECT_NAME/build_stream_status.yml"Confirm
overall_status: preparedand verify thatgitlab_urlandbsm_api_urlmatchbuild_stream_config.yml. -
Verify the OIM services:
Run on: OIM hostsystemctl is-active omnia_postgres.service systemctl is-active omnia_build_stream.service systemctl is-active playbook-watcher.service -
Verify the BSM health endpoint with its generated certificate:
Run on: OIM hostcurl --cacert "$OMNIA_DATA_PATH/build_stream_ssl/ssl/bs_cert.pem" \ https://<build_stream_host_ip>:<build_stream_port>/health -
Verify GitLab and its runner on the GitLab host:
Run on: GitLab hostgitlab-ctl status systemctl is-active gitlab-runner.service -
After a build pipeline, confirm the GitLab summary and BSM job state. Also inspect the module outputs generated for
project_default:Run on: OIM hostgrep '^overall_status:' "$repo_manager_path/output/$OMNIA_PROJECT_NAME/repo_status.yml" grep '^overall_status:' "$image_build_manager_path/output/$OMNIA_PROJECT_NAME/build_status.yml" -
After a deploy pipeline, confirm its child-pipeline summary and BSM job state, then inspect Orchestrator's output:
Run on: OIM hostgrep '^overall_status:' "$orchestrator_path/output/$OMNIA_PROJECT_NAME/orchestrator_status.yml" cat "$orchestrator_path/output/$OMNIA_PROJECT_NAME/provisioning_report.yml"
BuildStreaM does not write pipeline_status.yml or catalog_manifest.yml to
its project output directory. GitLab and BSM job state are the authoritative
pipeline results.
Next steps¶
- Update the Catalog for subsequent catalog revisions.
- Add Nodes by updating the mapping and running the deploy pipeline again.
- Retry Pipelines after correcting a failed stage.
- Automate Build and Deployment with Cadence to periodically reconcile RPM content and run a unified lifecycle.
- Clean Up Pipeline Resources with the manual/API-only cleanup pipeline. It is never selected by a catalog or mapping file change.
- Deploy Telemetry after a service Kubernetes cluster is available.
Troubleshooting¶
- If the BuildStreaM input directory is missing, keep
OMNIA_PROJECT_NAME=project_defaultand rerun OIM setup or the BuildStreaMdomain-init.sh. The current executable role does not select another project. - If the precheck fails, ensure
pulp,minio-server, andregistryare running and the two upstream credential files exist. The source precheck directs the operator to runomnia.sh --prepare-base. - If configuration validation fails, use only the keys in the staged
build_stream_config.yml, setenable_build_stream: true, provide both host addresses, and confirm both ports are available. - If GitLab-host validation fails, disable SELinux, meet the configured CPU, memory, and storage minimums, and verify that the GitLab host can reach the BSM address.
- If the GitLab phase reports an inactive OIM service or missing certificate,
verify
omnia_postgres.service,omnia_build_stream.service,playbook-watcher.service, and<OMNIA_DATA_PATH>/build_stream_ssl/ssl/bs_cert.pem. - If a commit does not select the expected pipeline, use the exact paths
catalog_rhel.jsonfor build andinput/orchestrator/pxe_mapping_file.csvfor deploy, andcadence_catalog_rhel.jsonfor cadence. Cleanup has no file-change trigger. - If a module stage fails, open its GitLab job log, follow the BSM job and log path reported there, and inspect the corresponding module status contract.
- If restart has partial node failures, review
miscellaneous/failed_nodes.json, correct the BMC or PXE issue, and follow the deploy-pipeline retry procedure. - Do not cancel a running stage or start an overlapping pipeline against the same resources; either action can leave shared workflow state incomplete.
- See BuildStreaM troubleshooting for detailed investigations.