Skip to content

Commit

Permalink
feat: add all firmware extensions into the agent boot assets
Browse files Browse the repository at this point in the history
Grab all the firmware extensions in the extensions repo, and make them part of the boot assets image (which is mainly used for local development).

Also:
- Add a simple hello (ping) endpoint to the GRPC server.
- Replace some of the temporary settings in .kres.yaml to their final ones.
- Bump Talos version references to `v1.9.0-alpha.2`.
- Bump Go to 1.23.3.

Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Nov 13, 2024
1 parent e22099c commit 8d7f2e8
Show file tree
Hide file tree
Showing 13 changed files with 681 additions and 263 deletions.
13 changes: 7 additions & 6 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
EXTENSIONS_REPO=$(EXTENSIONS_REPO)
EXTENSIONS_REF=$(EXTENSIONS_REF)
EXTENSIONS_PATH=$(EXTENSIONS_PATH)
EXTENSION_DIGESTS_IMAGE=$(EXTENSION_DIGESTS_IMAGE)
IMAGER_REGISTRY_AND_USERNAME=$(IMAGER_REGISTRY_AND_USERNAME)
IMAGER_TAG=$(IMAGER_TAG)
PUSH_TAG=$(PUSH_TAG)
Expand All @@ -53,19 +54,19 @@ spec:
hack/boot-assets/build.sh
variables: # MAKE SURE to have the same values in the push-boot-assets step as well
- name: EXTENSIONS_REPO
defaultValue: https://github.com/utkuozdemir/sidero-extensions.git # # todo: temporary, revert to the value below after https://github.com/siderolabs/extensions/pull/491 is merged
#defaultValue: https://github.com/siderolabs/extensions.git
defaultValue: https://github.com/siderolabs/extensions.git
- name: EXTENSIONS_REF
defaultValue: metal-agent-mode # todo: temporary, revert to the value below after https://github.com/siderolabs/extensions/pull/491 is merged
#defaultValue: main
defaultValue: v1.9.0-alpha.2
- name: EXTENSIONS_PATH
defaultValue: guest-agents/metal-agent
- name: EXTENSION_DIGESTS_IMAGE
defaultValue: ghcr.io/siderolabs/extensions
- name: IMAGER_REGISTRY_AND_USERNAME
defaultValue: ghcr.io/siderolabs
- name: IMAGER_TAG
# this must point to a commit where Talos agent mode logic was introduced,
# i.e., not older than https://github.com/siderolabs/talos/commit/2136358d65ddf6ad040ed62c835b335f99a59399
defaultValue: v1.9.0-alpha.0-53-g05c620957
defaultValue: v1.9.0-alpha.2
- name: PUSH_TAG
defaultValue: "" # if specified, needs to be a semver tag for the extension validation to not fail
- name: OUTPUT_REGISTRY_AND_USERNAME
Expand All @@ -91,7 +92,7 @@ spec:
hack/boot-assets/push.sh
variables: # MAKE SURE to have the same values in the image-boot-assets step as well
- name: IMAGER_TAG
defaultValue: v1.9.0-alpha.0-53-g05c620957 # point to the same one above
defaultValue: v1.9.0-alpha.2 # point to the same one above
- name: PUSH_TAG
defaultValue: "" # point to the same one above
- name: OUTPUT_REGISTRY_AND_USERNAME
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax = docker/dockerfile-upstream:1.11.0-labs
# syntax = docker/dockerfile-upstream:1.11.1-labs

# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-05T11:43:39Z by kres 398a599.
# Generated on 2024-11-12T13:39:39Z by kres b6443eb.

ARG TOOLCHAIN

Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-06T14:42:38Z by kres 1fc767a.
# Generated on 2024-11-12T14:03:44Z by kres b6443eb.

# common variables

Expand All @@ -21,11 +21,11 @@ PROTOBUF_GO_VERSION ?= 1.35.1
GRPC_GO_VERSION ?= 1.5.1
GRPC_GATEWAY_VERSION ?= 2.23.0
VTPROTOBUF_VERSION ?= 0.6.0
GOIMPORTS_VERSION ?= 0.26.0
GOIMPORTS_VERSION ?= 0.27.0
DEEPCOPY_VERSION ?= v0.5.6
GOLANGCILINT_VERSION ?= v1.61.0
GOLANGCILINT_VERSION ?= v1.62.0
GOFUMPT_VERSION ?= v0.7.0
GO_VERSION ?= 1.23.2
GO_VERSION ?= 1.23.3
GO_BUILDFLAGS ?=
GO_LDFLAGS ?=
CGO_ENABLED ?= 0
Expand Down Expand Up @@ -72,11 +72,12 @@ TOOLCHAIN ?= docker.io/golang:1.23-alpine

# extra variables

EXTENSIONS_REPO ?= https://github.com/utkuozdemir/sidero-extensions.git
EXTENSIONS_REF ?= metal-agent-mode
EXTENSIONS_REPO ?= https://github.com/siderolabs/extensions.git
EXTENSIONS_REF ?= v1.9.0-alpha.2
EXTENSIONS_PATH ?= guest-agents/metal-agent
EXTENSION_DIGESTS_IMAGE ?= ghcr.io/siderolabs/extensions
IMAGER_REGISTRY_AND_USERNAME ?= ghcr.io/siderolabs
IMAGER_TAG ?= v1.9.0-alpha.0-53-g05c620957
IMAGER_TAG ?= v1.9.0-alpha.2
PUSH_TAG ?=
OUTPUT_REGISTRY_AND_USERNAME ?= ghcr.io/siderolabs
TEMP_REGISTRY ?= 127.0.0.1:5005
Expand Down Expand Up @@ -229,7 +230,7 @@ image-talos-metal-agent: ## Builds image for talos-metal-agent.

.PHONY: image-boot-assets
image-boot-assets:
EXTENSIONS_REPO=$(EXTENSIONS_REPO) EXTENSIONS_REF=$(EXTENSIONS_REF) EXTENSIONS_PATH=$(EXTENSIONS_PATH) IMAGER_REGISTRY_AND_USERNAME=$(IMAGER_REGISTRY_AND_USERNAME) IMAGER_TAG=$(IMAGER_TAG) PUSH_TAG=$(PUSH_TAG) BUILD_TAG=$(TAG) OUTPUT_REGISTRY_AND_USERNAME=$(OUTPUT_REGISTRY_AND_USERNAME) TEMP_REGISTRY=$(TEMP_REGISTRY) hack/boot-assets/build.sh
EXTENSIONS_REPO=$(EXTENSIONS_REPO) EXTENSIONS_REF=$(EXTENSIONS_REF) EXTENSIONS_PATH=$(EXTENSIONS_PATH) EXTENSION_DIGESTS_IMAGE=$(EXTENSION_DIGESTS_IMAGE) IMAGER_REGISTRY_AND_USERNAME=$(IMAGER_REGISTRY_AND_USERNAME) IMAGER_TAG=$(IMAGER_TAG) PUSH_TAG=$(PUSH_TAG) BUILD_TAG=$(TAG) OUTPUT_REGISTRY_AND_USERNAME=$(OUTPUT_REGISTRY_AND_USERNAME) TEMP_REGISTRY=$(TEMP_REGISTRY) hack/boot-assets/build.sh

.PHONY: push-boot-assets
push-boot-assets:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When developing the agent, after doing your changes, run the following command t
- 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.0-53-g05c620957-agent-198cabf-dirty`, with the following structure:
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:

```text
Permission UID:GID Size Filetree
Expand Down
Loading

0 comments on commit 8d7f2e8

Please sign in to comment.