This project contains several executables that are intended to work with the OpenShift Assisted Installer Service:
The project uses the ghw library to collect the inventory and generate a unique identifier (UUID) of the host that the agent is running on.
/var/log/agent.log
. Default is true
.true
.false
.[!WARNING] The inventory process is typically executed during the agent provisioning workflow. Therefore, the inventory configuration must be set before reaching the step of calling the
inventory
binary.
The GPU configuration file is in YAML format with 3 elements:
classes
. PCI class (base + subclass) allowed.vendors
. Combination of PCI class + PCI vendor-idmodels
. Combination od PCI class + PCI vendor-id + PCI device-idThe idea for filtering devices is to go from the most generic (PCI Class) to the most specific (Hardware model). If any hardware matches a generic filter it will be added to the list of GPUs. We discard the use of a single element, for example the vendor-id, because it can cause false positives. For example, Intel hardware (0x8086
) can be a VGA display controller but also a sound controller. For this reason, for a vendor-id we should add a PCI class to be more precise.
Example:
---
# Include all Display controllers, VGA compatible (0x0300)
classes:
- '0300'
# Include Nvidia (0x10de) 3D controllers (0x302)
vendors:
- '0302 10de'
# Include Habana labs (0x1da3) Gaudi2 (0x1020) AI accelerator (0x1200)
models:
- '1200 1da3 1020'
Example filtering only Nvidia (0x10de) display controllers:
---
# Include Nvidia (0x10de) 3D controllers (0x302)
vendors:
- '0300 10de'
- '0302 10de'
By default, the PCI classes discovered will be:
0x0300
)0x0302
)0x0380
)0x1200
)By default, the executables are packaged in a container image quay.io/ocpmetal/assisted-installer-agent:latest
.
The executables inside the image reside under /usr/bin/.
Since the agent is a statically linked go executable, it can be copied and run outside a container. If running outside a container,
the agent must run as root. If running in a Podman container, the podman run
command should be invoked with --net=host
and --privileged
.
The other tools can be invoked using podman run <flags> quay.io/ocpmetal/assisted-installer-agent:latest <executable>
.
pip install strato-skipper
.To build the executables run: skipper make
To build the container image run: skipper make build-image
For unit tests, run skipper make unit-test
.
The subsystem tests use Docker Compose to run the agent and Wiremock stubs that simulate the assisted installer service. To perform the subsystem tests run skipper make subsystem
.
WARNING: The subsystem tests can only run with the default image name and tag. You can build it locally just for this purpose.
To run selected system tests use a regular expression: skipper make subsystem FOCUS=register
.
To publish the container image run skipper make push
.
You can override the image name and tag via the ASSISTED_INSTALLER_AGENT
variable.