talos-metal-agent

module
v0.1.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MPL-2.0

README

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.

Directories

Path Synopsis
api
cmd
talos-metal-agent
Package main contains the entrypoint for the Talos metal agent.
Package main contains the entrypoint for the Talos metal agent.
internal
agent
Package agent contains Talos metal agent mode functionality.
Package agent contains Talos metal agent mode functionality.
config
Package config contains the configuration for the agent.
Package config contains the configuration for the agent.
ipmi
Package ipmi implements various IPMI functions.
Package ipmi implements various IPMI functions.
service
Package service provides the agent GRPC service server.
Package service provides the agent GRPC service server.
version
Package version contains variables such as project name, tag and sha.
Package version contains variables such as project name, tag and sha.
pkg
config
Package config contains public configuration options for the agent.
Package config contains public configuration options for the agent.
constants
Package constants contains public constants for the agent.
Package constants contains public constants for the agent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL