Skip to content

Commit

Permalink
feat: add the new rust-based xen-guest-agent as extension
Browse files Browse the repository at this point in the history
Adds new rust-based `xen-guest-agent` extension.
Also remove the old `xe-guest-utilities`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
j3rwin authored and frezbo committed Mar 11, 2024
1 parent ee6071c commit e5488bd
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 90 deletions.
17 changes: 9 additions & 8 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- util-linux-tools
- v4l-uvc-drivers
- wasmedge
- xe-guest-utilities
- xen-guest-agent
- zfs
additionalTargets:
nonfree:
Expand All @@ -46,6 +46,14 @@ spec:
- TAG
- PKGS
- PKGS_PREFIX
makefile:
extraVariables:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.7.0-alpha.0-33-g3aacf03
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
useBldrPkgTagResolver: true
---
kind: common.Build
Expand Down Expand Up @@ -78,13 +86,6 @@ spec:
makefile:
enabled: true
phony: true
variables:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.7.0-alpha.0-33-g3aacf03
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
depends:
- internal/extensions/descriptions.yaml
script:
Expand Down
16 changes: 8 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-03-08T14:57:49Z by kres latest.
# Generated on 2024-03-08T17:16:57Z by kres latest.

# common variables

Expand Down Expand Up @@ -48,6 +48,12 @@ COMMON_ARGS += --build-arg=TAG="$(TAG)"
COMMON_ARGS += --build-arg=PKGS="$(PKGS)"
COMMON_ARGS += --build-arg=PKGS_PREFIX="$(PKGS_PREFIX)"

# extra variables

EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
PKGS ?= v1.7.0-alpha.0-33-g3aacf03
PKGS_PREFIX ?= ghcr.io/siderolabs

# targets defines all the available targets

TARGETS = amdgpu-firmware
Expand Down Expand Up @@ -83,16 +89,10 @@ TARGETS += usb-modem-drivers
TARGETS += util-linux-tools
TARGETS += v4l-uvc-drivers
TARGETS += wasmedge
TARGETS += xe-guest-utilities
TARGETS += xen-guest-agent
TARGETS += zfs
NONFREE_TARGETS = nonfree-kmod-nvidia

# extra variables

EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
PKGS ?= v1.7.0-alpha.0-33-g3aacf03
PKGS_PREFIX ?= ghcr.io/siderolabs

# help menu

export define HELP_MENU_HEADER
Expand Down
4 changes: 2 additions & 2 deletions guest-agents/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ QEMU_VERSION: 8.2.2
GLIB_VERSION: 2.80.0
# renovate: datasource=github-releases extractVersion=^pcre2-(?<version>.*)$ depName=PCRE2Project/pcre2
PCRE2_VERSION: 10.42
# renovate: datasource=github-releases extractVersion=^v(?<version>.*)$ depName=xenserver/xe-guest-utilities
XE_GUEST_UTILITIES_VERSION: 8.4.0
# renovate: datasource=git-tags depName=https://gitlab.com/xen-project/xen-guest-agent.git
XEN_GUEST_AGENT_VERSION: 0.4.0
11 changes: 0 additions & 11 deletions guest-agents/xe-guest-utilities/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions guest-agents/xe-guest-utilities/manifest.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions guest-agents/xe-guest-utilities/pkg.yaml

This file was deleted.

1 change: 0 additions & 1 deletion guest-agents/xe-guest-utilities/vars.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions guest-agents/xen-guest-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# xen-guest-agent

Adds [xen-guest-agent](https://gitlab.com/xen-project/xen-guest-agent) as system extension.

## Installation

See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).

## Verification

Confirm extension service is running by executing `talosctl service ext-xen-guest-agent`
10 changes: 10 additions & 0 deletions guest-agents/xen-guest-agent/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: xen-guest-agent
version: "$VERSION"
author: Jerwin NJ
description: |
xen-guest-agent communicates information and metrics with the Xen host.
compatibility:
talos:
version: ">= v1.5.0"
37 changes: 37 additions & 0 deletions guest-agents/xen-guest-agent/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: xen-guest-agent
variant: alpine
shell: /bin/sh
install:
- cargo
- xen-dev
- clang-dev
- llvm-dev
- pkgconf
steps:
- env:
PKG_CONFIG_PATH: /usr/lib/pkgconfig
RUSTFLAGS: '-C target-feature=+crt-static'
- sources:
- url: https://gitlab.com/xen-project/xen-guest-agent/-/archive/{{ .XEN_GUEST_AGENT_VERSION }}/xen-guest-agent-{{ .XEN_GUEST_AGENT_VERSION }}.tar.gz
sha256: 492ba2022b4155b38443ddf34a5bdbb0d72966d0936aab8545b4a135fa69c990
sha512: 527611f1d0c4fec81ac44434304f426bb9ebe75ceeaac84a417397ec845da6a225514d6ff8b9dc03b5c27d4fa3b59a47fd1a64276fbf6b492664244796ef483c
destination: xe-guest-agent.tar.gz
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
tar -xzvf xe-guest-agent.tar.gz --strip-components=1
build:
- cargo build --release -F static --target {{ .ARCH }}-alpine-linux-musl
install:
- |
containerRoot=/rootfs/usr/local/lib/containers/xen-guest-agent
mkdir -p "$containerRoot"
mv target/{{ .ARCH }}-alpine-linux-musl/release/xen-guest-agent "$containerRoot/xen-guest-agent"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
- from: /pkg/xen-guest-agent.yaml
to: /rootfs/usr/local/etc/containers/
1 change: 1 addition & 0 deletions guest-agents/xen-guest-agent/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .XEN_GUEST_AGENT_VERSION }}"
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: xe-guest-utilities
name: xen-guest-agent
container:
entrypoint: ./xe-daemon
entrypoint: ./xen-guest-agent
# log to stderr
args:
- -s
security:
writeableRootfs: false
writeableSysfs: true
mounts:
# libs
- source: /lib/modules
destination: /lib/modules
type: bind
options:
- bind
- ro
# xenbus
- source: /dev/xen
destination: /dev/xen
Expand Down
8 changes: 7 additions & 1 deletion hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ See [Talos Linux documentation](https://www.talos.dev/v1.7/talos-guides/configur

[notes]

[notes.xen]
title = "Xen Guest Agent"
description = """\
Xen guest agent extension is now available. This removes the previous `xe-guest-utilities` extension.
See [this](https://github.com/xenserver/xe-guest-utilities/issues/118) for more info.
"""

[notes.updates]
title = "Component Updates"
description = """\
Expand All @@ -27,7 +34,6 @@ See [Talos Linux documentation](https://www.talos.dev/v1.7/talos-guides/configur
* Tailscale: 1.60.1
* nvidia-container-runtime: v1.14.5
* libnvidia-container: v1.14.5
* xe-guest-utilities: 8.4.0
"""


Expand Down

0 comments on commit e5488bd

Please sign in to comment.