Getting Started
Verified against tag
v0.2.0(commit 761a00b). Commands assume a workingkubectlcontext, Go 1.24+, Docker, and a container registry you can push to.
Prerequisites
- Go version v1.24.0+ (the README and
go.modpingo 1.24.0). - Docker version 17.03+.
kubectlversion v1.11.3+ and access to a Kubernetes v1.11.3+ cluster.- For a real attach: a supported CDI provider (Fujitsu FTI_CDI, SNIA Sunfish, or NEC) and the composable fabric behind it. Without one, you can install and run the operator, but
ComposabilityRequestobjects will not complete.
Install
Clone the repository and check out the documented version.
git clone https://github.com/CoHDI/composable-resource-operator.git
cd composable-resource-operator
git checkout v0.2.0Build the manager binary to confirm the toolchain is set up. The build target runs manifests, generate, fmt, and vet first.
make buildA first working setup
Install the CRDs into the cluster your kubeconfig points at.
bashmake installConfirm both CRDs registered.
bashkubectl get crds | grep cro.hpsys.ibm.ie.comBuild and push the operator image to your registry.
bashmake docker-build docker-push IMG=<some-registry>/composable-resource-operator:v0.2.0Deploy the manager. The deployment needs a provider configured through environment variables (
CDI_PROVIDER_TYPE,DEVICE_RESOURCE_TYPE, and provider endpoints); editconfig/managerbefore applying if you are wiring real hardware.bashmake deploy IMG=<some-registry>/composable-resource-operator:v0.2.0Create a
ComposabilityRequest. This is the spec form from the project README.bashkubectl apply -f - <<'EOF' apiVersion: cro.hpsys.ibm.ie.com/v1alpha1 kind: ComposabilityRequest metadata: name: composabilityrequest-sample spec: resource: type: "gpu" size: 2 model: "NVIDIA-A100-PCIE-40GB" target_node: "node1" allocation_policy: "samenode" EOF
Verify it works
Check that the operator is running and that the request is progressing through its state machine.
kubectl get pods -n composable-resource-operator-system
kubectl get composabilityrequest composabilityrequest-sample -o jsonpath='{.status.state}'With a configured fabric the state moves NodeAllocating to Updating to Running, and one ComposableResource per device appears.
kubectl get composableresourceWithout a fabric, the request stays in an earlier state; that still confirms the CRDs and controller are installed and reconciling.
Where to go next
- Uninstall with
make undeployandmake uninstallwhen you are done. - The Architecture and Internals pages cover the reconcile state machines and the CDI provider layer.
- For production concerns (registry permissions, RBAC, the build-installer bundle), see the project README and the Kubebuilder documentation.