Skip to content

Commit e5488bd

Browse files
j3rwinfrezbo
authored andcommitted
feat: add the new rust-based xen-guest-agent as extension
Adds new rust-based `xen-guest-agent` extension. Also remove the old `xe-guest-utilities`. Signed-off-by: Noel Georgi <git@frezbo.dev>
1 parent ee6071c commit e5488bd

File tree

13 files changed

+90
-90
lines changed

13 files changed

+90
-90
lines changed

.kres.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
- util-linux-tools
3737
- v4l-uvc-drivers
3838
- wasmedge
39-
- xe-guest-utilities
39+
- xen-guest-agent
4040
- zfs
4141
additionalTargets:
4242
nonfree:
@@ -46,6 +46,14 @@ spec:
4646
- TAG
4747
- PKGS
4848
- PKGS_PREFIX
49+
makefile:
50+
extraVariables:
51+
- name: EXTENSIONS_IMAGE_REF
52+
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
53+
- name: PKGS
54+
defaultValue: v1.7.0-alpha.0-33-g3aacf03
55+
- name: PKGS_PREFIX
56+
defaultValue: ghcr.io/siderolabs
4957
useBldrPkgTagResolver: true
5058
---
5159
kind: common.Build
@@ -78,13 +86,6 @@ spec:
7886
makefile:
7987
enabled: true
8088
phony: true
81-
variables:
82-
- name: EXTENSIONS_IMAGE_REF
83-
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
84-
- name: PKGS
85-
defaultValue: v1.7.0-alpha.0-33-g3aacf03
86-
- name: PKGS_PREFIX
87-
defaultValue: ghcr.io/siderolabs
8889
depends:
8990
- internal/extensions/descriptions.yaml
9091
script:

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2024-03-08T14:57:49Z by kres latest.
3+
# Generated on 2024-03-08T17:16:57Z by kres latest.
44

55
# common variables
66

@@ -48,6 +48,12 @@ COMMON_ARGS += --build-arg=TAG="$(TAG)"
4848
COMMON_ARGS += --build-arg=PKGS="$(PKGS)"
4949
COMMON_ARGS += --build-arg=PKGS_PREFIX="$(PKGS_PREFIX)"
5050

51+
# extra variables
52+
53+
EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
54+
PKGS ?= v1.7.0-alpha.0-33-g3aacf03
55+
PKGS_PREFIX ?= ghcr.io/siderolabs
56+
5157
# targets defines all the available targets
5258

5359
TARGETS = amdgpu-firmware
@@ -83,16 +89,10 @@ TARGETS += usb-modem-drivers
8389
TARGETS += util-linux-tools
8490
TARGETS += v4l-uvc-drivers
8591
TARGETS += wasmedge
86-
TARGETS += xe-guest-utilities
92+
TARGETS += xen-guest-agent
8793
TARGETS += zfs
8894
NONFREE_TARGETS = nonfree-kmod-nvidia
8995

90-
# extra variables
91-
92-
EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
93-
PKGS ?= v1.7.0-alpha.0-33-g3aacf03
94-
PKGS_PREFIX ?= ghcr.io/siderolabs
95-
9696
# help menu
9797

9898
export define HELP_MENU_HEADER

guest-agents/vars.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ QEMU_VERSION: 8.2.2
44
GLIB_VERSION: 2.80.0
55
# renovate: datasource=github-releases extractVersion=^pcre2-(?<version>.*)$ depName=PCRE2Project/pcre2
66
PCRE2_VERSION: 10.42
7-
# renovate: datasource=github-releases extractVersion=^v(?<version>.*)$ depName=xenserver/xe-guest-utilities
8-
XE_GUEST_UTILITIES_VERSION: 8.4.0
7+
# renovate: datasource=git-tags depName=https://gitlab.com/xen-project/xen-guest-agent.git
8+
XEN_GUEST_AGENT_VERSION: 0.4.0

guest-agents/xe-guest-utilities/README.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

guest-agents/xe-guest-utilities/manifest.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

guest-agents/xe-guest-utilities/pkg.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

guest-agents/xe-guest-utilities/vars.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# xen-guest-agent
2+
3+
Adds [xen-guest-agent](https://gitlab.com/xen-project/xen-guest-agent) as system extension.
4+
5+
## Installation
6+
7+
See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).
8+
9+
## Verification
10+
11+
Confirm extension service is running by executing `talosctl service ext-xen-guest-agent`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1alpha1
2+
metadata:
3+
name: xen-guest-agent
4+
version: "$VERSION"
5+
author: Jerwin NJ
6+
description: |
7+
xen-guest-agent communicates information and metrics with the Xen host.
8+
compatibility:
9+
talos:
10+
version: ">= v1.5.0"

guest-agents/xen-guest-agent/pkg.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: xen-guest-agent
2+
variant: alpine
3+
shell: /bin/sh
4+
install:
5+
- cargo
6+
- xen-dev
7+
- clang-dev
8+
- llvm-dev
9+
- pkgconf
10+
steps:
11+
- env:
12+
PKG_CONFIG_PATH: /usr/lib/pkgconfig
13+
RUSTFLAGS: '-C target-feature=+crt-static'
14+
- sources:
15+
- url: https://gitlab.com/xen-project/xen-guest-agent/-/archive/{{ .XEN_GUEST_AGENT_VERSION }}/xen-guest-agent-{{ .XEN_GUEST_AGENT_VERSION }}.tar.gz
16+
sha256: 492ba2022b4155b38443ddf34a5bdbb0d72966d0936aab8545b4a135fa69c990
17+
sha512: 527611f1d0c4fec81ac44434304f426bb9ebe75ceeaac84a417397ec845da6a225514d6ff8b9dc03b5c27d4fa3b59a47fd1a64276fbf6b492664244796ef483c
18+
destination: xe-guest-agent.tar.gz
19+
prepare:
20+
- |
21+
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
22+
- |
23+
tar -xzvf xe-guest-agent.tar.gz --strip-components=1
24+
build:
25+
- cargo build --release -F static --target {{ .ARCH }}-alpine-linux-musl
26+
install:
27+
- |
28+
containerRoot=/rootfs/usr/local/lib/containers/xen-guest-agent
29+
mkdir -p "$containerRoot"
30+
mv target/{{ .ARCH }}-alpine-linux-musl/release/xen-guest-agent "$containerRoot/xen-guest-agent"
31+
finalize:
32+
- from: /rootfs
33+
to: /rootfs
34+
- from: /pkg/manifest.yaml
35+
to: /
36+
- from: /pkg/xen-guest-agent.yaml
37+
to: /rootfs/usr/local/etc/containers/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION: "{{ .XEN_GUEST_AGENT_VERSION }}"

guest-agents/xe-guest-utilities/xe-guest-utilities.yaml renamed to guest-agents/xen-guest-agent/xen-guest-agent.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
name: xe-guest-utilities
1+
name: xen-guest-agent
22
container:
3-
entrypoint: ./xe-daemon
3+
entrypoint: ./xen-guest-agent
4+
# log to stderr
5+
args:
6+
- -s
47
security:
58
writeableRootfs: false
69
writeableSysfs: true
710
mounts:
8-
# libs
9-
- source: /lib/modules
10-
destination: /lib/modules
11-
type: bind
12-
options:
13-
- bind
14-
- ro
1511
# xenbus
1612
- source: /dev/xen
1713
destination: /dev/xen

hack/release.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ See [Talos Linux documentation](https://www.talos.dev/v1.7/talos-guides/configur
1616

1717
[notes]
1818

19+
[notes.xen]
20+
title = "Xen Guest Agent"
21+
description = """\
22+
Xen guest agent extension is now available. This removes the previous `xe-guest-utilities` extension.
23+
See [this](https://github.com/xenserver/xe-guest-utilities/issues/118) for more info.
24+
"""
25+
1926
[notes.updates]
2027
title = "Component Updates"
2128
description = """\
@@ -27,7 +34,6 @@ See [Talos Linux documentation](https://www.talos.dev/v1.7/talos-guides/configur
2734
* Tailscale: 1.60.1
2835
* nvidia-container-runtime: v1.14.5
2936
* libnvidia-container: v1.14.5
30-
* xe-guest-utilities: 8.4.0
3137
"""
3238

3339

0 commit comments

Comments
 (0)