Skip to content

siderolabs/talos-metal-agent

Repository files navigation

talos-metal-agent

This repository contains the metal agent extension for Talos.

This repository builds only the agent binary itself - it gets packaged into an extension along with its dependencies (e.g., ipmitool) in the extensions repository.

Development

When developing the agent, after doing your changes, run the following command to build Talos boot assets with the agent containing your changes:

  1. Set up a buildx builder instance with access to the host network, if you don't have one already:

    docker buildx create --driver docker-container --driver-opt network=host --name local1 --buildkitd-flags '--allow-insecure-entitlement security.insecure' --use
  2. Start a local image registry if you don't have one running already:

    docker run -d -p 5005:5000 --restart always --name local registry:2
  3. Build Talos boot assets with the agent containing your changes:

    make image-boot-assets \
    OUTPUT_REGISTRY_AND_USERNAME=127.0.0.1:5005/siderolabs

    Hint: see .kres.yaml for more customization options. For example:

    • You can build against a different Talos version using the IMAGER_TAG variable.
    • You can customize the extensions repo references using EXTENSIONS_* variables.

    This command will build a container image with a tag like 127.0.0.1:5005/siderolabs/talos-metal-agent-boot-assets:v1.9.0-alpha.2-agent-198cabf-dirty, with the following structure:

    Permission     UID:GID       Size  Filetree
    -rw-r--r--         0:0      187 B  ├── cmdline-metal-amd64
    -rw-r--r--         0:0      203 B  ├── cmdline-metal-arm64
    -rw-r--r--         0:0      97 MB  ├── initramfs-metal-amd64.xz
    -rw-r--r--         0:0      78 MB  ├── initramfs-metal-arm64.xz
    -rw-r--r--         0:0      19 MB  ├── kernel-amd64
    -rw-r--r--         0:0      22 MB  └── kernel-arm64
    
  4. Push this image to your local registry:

    make push-boot-assets \
    OUTPUT_REGISTRY_AND_USERNAME=127.0.0.1:5005/siderolabs
  5. See the README in Omni Bare-Metal Infra Provider repository to build a provider image containing these boot assets.