Skip to content

Commit

Permalink
Support for Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
marquiz committed Sep 5, 2024
1 parent 6c4bc4b commit 8fac584
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 2 deletions.
6 changes: 5 additions & 1 deletion demo/lib/distro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ distro-unresolved() {
###########################################################################

#
# Ubuntu 18.04, 20.04, Debian 10, generic debian
# Ubuntu, Debian
#

ubuntu-18_04-image-url() {
Expand All @@ -128,6 +128,10 @@ ubuntu-22_04-image-url() {
echo "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img"
}

ubuntu-24_04-image-url() {
echo "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img"
}

debian-10-image-url() {
echo "https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-amd64.qcow2"
}
Expand Down
30 changes: 30 additions & 0 deletions dockerfiles/cross-build/Dockerfile.ubuntu-24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# pull in base + a minimal set of useful packages
FROM ubuntu:24.04 as ubuntu-24.04-build

ARG GO_VERSION=x.yz
ARG GOLICENSES_VERSION
ARG CREATE_USER="test"
ARG USER_UID=""
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV DEBIAN_FRONTEND noninteractive

# pull in stuff for building
RUN apt-get update && \
apt-get install -y --no-install-recommends \
tzdata build-essential fakeroot devscripts \
bash git make sed debhelper ca-certificates && \
rm -rf /var/lib/apt/lists/*

ADD http://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz /

RUN tar xf /go${GO_VERSION}.linux-amd64.tar.gz -C "/usr/local" && \
rm /go${GO_VERSION}.linux-amd64.tar.gz

RUN GOBIN=/go/bin go install github.com/google/go-licenses@${GOLICENSES_VERSION}

RUN if [ -n "$CREATE_USER" -a "$CREATE_USER" != "root" ]; then \
if getent passwd $USER_UID; then \
userdel `id -un $USER_UID`; \
fi; \
useradd -m -s /bin/bash $CREATE_USER -u $USER_UID; \
fi
1 change: 1 addition & 0 deletions test/e2e/packages.test-suite/ubuntu-24.04/binsrc.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/ubuntu-24.04
6 changes: 6 additions & 0 deletions test/e2e/packages.test-suite/ubuntu-24.04/cri-resmgr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
policy:
Active: topology-aware
ReservedResources:
CPU: 750m
logger:
Debug: cri-resmgr,resource-manager,cache,policy
1 change: 1 addition & 0 deletions test/e2e/packages.test-suite/ubuntu-24.04/distro.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ubuntu-24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Clear cri-resmgr output from previous runs.
vm-command "journalctl --vacuum-time=1s"

# Create a pod.
create besteffort

# Verify that new pod was created by systemd-managed cri-resource-manager.
vm-command "journalctl -xeu cri-resource-manager | grep 'StartContainer: starting container pod0:pod0c0'" || {
command-error "failed to verify that systemd-managed cri-resource-manager launched the pod"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
{"mem": "2G", "cores": 2, "nodes": 2, "packages": 2}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
2 changes: 1 addition & 1 deletion test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ usage() {
echo " Supported values: debian-10, debian-sid"
echo " fedora, fedora-33, opensuse-tumbleweed,"
echo " opensuse-15.5 (same as opensuse), sles,"
echo " ubuntu-18.04, ubuntu-20.04, ubuntu-22.04"
echo " ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04"
echo " If sles: set VM_SLES_REGCODE=<CODE> to use official packages."
echo " cgroups: cgroups version in the VM, v1 or v2. The default is v1."
echo " cgroups=v2 is supported only on distro=fedora"
Expand Down

0 comments on commit 8fac584

Please sign in to comment.