Skip to content

Commit

Permalink
Merge pull request #1118 from marquiz/release-0.9
Browse files Browse the repository at this point in the history
Support Debian 11 and 12
  • Loading branch information
klihub authored Sep 6, 2024
2 parents baad21a + e869cdb commit a9e445f
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 10 deletions.
17 changes: 11 additions & 6 deletions demo/lib/distro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ 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"
debian-11-image-url() {
echo "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
}

debian-11-image-url() {
echo "https://cloud.debian.org/images/cloud/bullseye/daily/latest/debian-11-generic-amd64-daily.qcow2"
debian-12-image-url() {
echo "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
}

debian-sid-image-url() {
Expand Down Expand Up @@ -257,10 +257,15 @@ debian-install-kernel-dev() {
echo "install: dpkg -i linux-*.deb"
}

debian-10-install-containerd-pre() {
debian-11-install-containerd-pre() {
debian-install-repo-key https://download.docker.com/linux/debian/gpg
debian-install-repo "deb https://download.docker.com/linux/debian buster stable"
debian-install-repo "deb https://download.docker.com/linux/debian bullseye stable"
}

debian-11-install-containerd() {
vm-command-q "[ -f /usr/bin/containerd ]" || {
distro-install-pkg containerd.io
}
}

debian-sid-install-containerd-post() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pull in base + a minimal set of useful packages
FROM debian:buster as debian-10-build
FROM debian:bullseye as debian-11-build

ARG GO_VERSION=x.yz
ARG GOLICENSES_VERSION
Expand Down
25 changes: 25 additions & 0 deletions dockerfiles/cross-build/Dockerfile.debian-12
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# pull in base + a minimal set of useful packages
FROM debian:bookworm as debian-11-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

# pull in stuff for cgo
RUN apt-get update && \
apt-get install -y --no-install-recommends \
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 [ -n "$CREATE_USER" -a "$CREATE_USER" != "root" ] && \
useradd -m -s /bin/bash $CREATE_USER -u $USER_UID
1 change: 0 additions & 1 deletion test/e2e/packages.test-suite/debian-10/binsrc.var

This file was deleted.

1 change: 0 additions & 1 deletion test/e2e/packages.test-suite/debian-10/distro.var

This file was deleted.

1 change: 1 addition & 0 deletions test/e2e/packages.test-suite/debian-11/binsrc.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/debian-11
1 change: 1 addition & 0 deletions test/e2e/packages.test-suite/debian-11/distro.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian-11
1 change: 1 addition & 0 deletions test/e2e/packages.test-suite/debian-12/binsrc.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/debian-12
6 changes: 6 additions & 0 deletions test/e2e/packages.test-suite/debian-12/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/debian-12/distro.var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian-12
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 @@ -99,7 +99,7 @@ usage() {
echo " topology: JSON to override NUMA node list used in tests."
echo " See: python3 ${DEMO_LIB_DIR}/topology2qemuopts.py --help"
echo " distro: Linux distribution to be / already installed on vm."
echo " Supported values: debian-10, debian-sid"
echo " Supported values: debian-11, debian-12, debian-sid"
echo " fedora, opensuse-tumbleweed,"
echo " opensuse-15.5 (same as opensuse), sles,"
echo " ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04"
Expand Down

0 comments on commit a9e445f

Please sign in to comment.