Skip to content

Day 1

Enroll hosts

Make the operator find each new machine and make a Host for it.

  1. Add one ledger line for each BMC to the ledger file of your overlay. The key is the BMC MAC in lower case.

    ledger.yaml
    "02:00:48:0b:74:83": https://192.0.2.21
  2. Apply the overlay. The manager reads the ledger only when it starts. The overlay gives the ledger ConfigMap a new name, and thus the apply restarts the manager.

    Terminal window
    kubectl apply --server-side -k overlays/site
  3. Make the credentials Secret in the namespace pk-metal.

    Terminal window
    kubectl -n pk-metal create secret generic bmc-factory \
    --from-literal=username=admin --from-literal=password="$PK_METAL_BMC_PASSWORD"
  4. Write one Asset for each machine.

    sim-0001.yaml
    apiVersion: metal.platform-kit.org/v1alpha1
    kind: Asset
    metadata:
    name: sim-0001
    spec:
    cid: "ASSET-01"
    serial: "SIMHW2288V5000397"
    bmcMac: "02:00:48:0b:74:83"
    credentialsRef:
    name: bmc-factory
  5. Apply the Assets.

    Terminal window
    kubectl apply -f assets/
  6. Monitor the endpoints.

    Terminal window
    kubectl get managementendpoints -w

    The phase goes from Connecting to Ready.

Terminal window
kubectl get hosts -o wide

Each machine has a Host. The name is the serial number in lower case. The phase is Available.

NAME ASSET SERIAL VENDOR PHASE BLOCKED CLAIM AGE
simhw2288v5000397 sim-0001 SIMHW2288V5000397 Huawei Available 2m
What you see Go to
Asset Materialized=False, reason NoLedgerEntry Add the ledger line. Do step 2 again.
Endpoint phase Unreachable BMC unreachable. For a certificate error, see BMC certificates.
Endpoint phase Mismatch, SerialMismatch or MACMismatch Host in Mismatch