From 07bb3c3e209666b5841bc249d1aa437c7063cb1a Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Wed, 24 Apr 2024 10:59:46 +0100 Subject: [PATCH] Switch to Fedora 40 everywhere Containerdisks now also set their entrypoint to "no-entrypoint", so we can drop the empty "" argument to podman-run and the like in most cases. Signed-off-by: Alberto Faria --- docs/2-podman-docker.md | 25 +++++++++++-------------- docs/3-kubernetes.md | 4 +--- examples/quadlet/README.md | 4 ++-- tests/env.sh | 8 ++++---- tests/t/hostname.sh | 5 ++--- tests/t/mount.sh | 3 +-- tests/t/publish.sh | 3 +-- tests/t/stop-start.sh | 2 +- 8 files changed, 23 insertions(+), 31 deletions(-) diff --git a/docs/2-podman-docker.md b/docs/2-podman-docker.md index 33edc6f..6092743 100644 --- a/docs/2-podman-docker.md +++ b/docs/2-podman-docker.md @@ -12,7 +12,7 @@ First, obtain a QEMU-compatible VM image and place it in a directory by itself: ```console $ mkdir my-vm-image -$ curl -LO --output-dir my-vm-image https://download.fedoraproject.org/pub/fedora/linux/releases/39/Cloud/x86_64/images/Fedora-Cloud-Base-39-1.5.x86_64.qcow2 +$ curl -LO --output-dir my-vm-image https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2 ``` Then run: @@ -86,8 +86,7 @@ convention, so you can use those here: $ podman run \ --runtime crun-vm \ -it --rm \ - quay.io/containerdisks/fedora:39 \ - "" # unused, but must specify command because container image does not + quay.io/containerdisks/fedora:40 ``` You can also use `util/package-vm-image.sh` to easily package a VM image into a @@ -113,7 +112,7 @@ meta-data user-data vendor-data $ podman run \ --runtime crun-vm \ -it --rm \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --cloud-init ~/examples/cloud-init/config # path must be absolute ``` @@ -127,7 +126,7 @@ option: $ podman run \ --runtime crun-vm \ -it --rm \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --password pass ``` @@ -140,7 +139,7 @@ the `--ignition` option: $ podman run \ --runtime crun-vm \ -it --rm \ - quay.io/crun-vm/example-fedora-coreos:39 \ + quay.io/crun-vm/example-fedora-coreos:40 \ --ignition ~/examples/ignition/config.ign # path must be absolute ``` @@ -162,8 +161,7 @@ port 22, you can `ssh` into it as root using podman-exec: $ podman run \ --runtime crun-vm \ --detach --rm \ - quay.io/containerdisks/fedora:39 \ - "" + quay.io/containerdisks/fedora:40 8068a2c180e0f4bf494f5e0baa37d9f13a9810f76b361c0771b73666e47ec383 $ podman exec --latest whoami @@ -214,8 +212,7 @@ $ podman run \ --runtime crun-vm \ --detach --rm \ -p 8000:80 \ - quay.io/crun-vm/example-http-server:latest \ - "" + quay.io/crun-vm/example-http-server:latest 36c8705482589cfc4336a03d3802e7699f5fb228123d18e693488ac7b80116d1 $ curl localhost:8000 @@ -251,7 +248,7 @@ $ podman run \ --runtime crun-vm \ -it --rm \ -v ./util:/home/fedora/util:z \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --password pass ``` @@ -277,7 +274,7 @@ $ podman run \ --runtime crun-vm \ -it --rm \ -v ./README.md:/home/fedora/README.md:z \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --password pass ``` @@ -296,7 +293,7 @@ $ podman run \ --runtime crun-vm \ -it --rm \ --device /dev/ram0:/home/fedora/my-disk \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --password pass ``` @@ -310,7 +307,7 @@ raw format is assumed): $ podman run \ --runtime crun-vm \ -it --rm \ - quay.io/containerdisks/fedora:39 \ + quay.io/containerdisks/fedora:40 \ --password pass \ --blockdev source=~/my-disk.qcow2,target=/home/fedora/my-disk,format=qcow2 # paths must be absolute ``` diff --git a/docs/3-kubernetes.md b/docs/3-kubernetes.md index 83439d7..7c17b57 100644 --- a/docs/3-kubernetes.md +++ b/docs/3-kubernetes.md @@ -49,8 +49,6 @@ spec: containers: - name: my-vm image: quay.io/crun-vm/example-http-server:latest - args: - - "" # unused, but must specify command because container image does not ports: - containerPort: 80 runtimeClassName: crun-vm @@ -133,7 +131,7 @@ metadata: spec: containers: - name: my-other-vm - image: quay.io/containerdisks/fedora:39 + image: quay.io/containerdisks/fedora:40 args: - --cloud-init=/etc/cloud-init volumeMounts: diff --git a/examples/quadlet/README.md b/examples/quadlet/README.md index c01bc81..fb2798a 100644 --- a/examples/quadlet/README.md +++ b/examples/quadlet/README.md @@ -16,7 +16,7 @@ launch and manage your VMs through systemd. Here's an example of how to do so: [Container] PodmanArgs=--runtime crun-vm # make Podman use crun-vm as the runtime - Image=quay.io/containerdisks/fedora:39 # the container image containing our VM image + Image=quay.io/containerdisks/fedora:40 # the container image containing our VM image Exec=--password pass # optional crun-vm arguments [Install] @@ -27,7 +27,7 @@ launch and manage your VMs through systemd. Here's an example of how to do so: into the following podman invocation: ```console - $ podman run --runtime crun-vm quay.io/containerdisks/fedora:39 --password pass + $ podman run --runtime crun-vm quay.io/containerdisks/fedora:40 --password pass ``` 2. Inform systemd of the new unit file: diff --git a/tests/env.sh b/tests/env.sh index e4e2264..19c26e7 100755 --- a/tests/env.sh +++ b/tests/env.sh @@ -5,14 +5,14 @@ set -o errexit -o pipefail -o nounset start_time="$( date +%s%N )" -env_image_base=quay.io/containerdisks/fedora:39 +env_image_base=quay.io/containerdisks/fedora:40 env_image=quay.io/crun-vm/test-env:latest container_name=crun-vm-test-env declare -A TEST_IMAGES TEST_IMAGES=( - [fedora]=quay.io/containerdisks/fedora:39 # uses cloud-init - [coreos]=quay.io/crun-vm/example-fedora-coreos:39 # uses Ignition + [fedora]=quay.io/containerdisks/fedora:40 # uses cloud-init + [coreos]=quay.io/crun-vm/example-fedora-coreos:40 # uses Ignition ) declare -A TEST_IMAGES_DEFAULT_USER @@ -143,7 +143,7 @@ build) __log_and_run qemu-img create -f qcow2 "$temp_dir/resized-image.qcow2" 20G __log_and_run virt-resize \ --quiet \ - --expand /dev/sda5 \ + --expand /dev/sda4 \ "$temp_dir/image" \ "$temp_dir/resized-image.qcow2" diff --git a/tests/t/hostname.sh b/tests/t/hostname.sh index fd6e1ae..2111747 100644 --- a/tests/t/hostname.sh +++ b/tests/t/hostname.sh @@ -7,7 +7,7 @@ for os in fedora coreos; do # default hostname - id=$( __engine run --detach --name "hostname-$os-default" "$image" "" ) + id=$( __engine run --detach --name "hostname-$os-default" "$image" ) __test() { __engine exec "hostname-$os-default" --as "$user" \ @@ -27,8 +27,7 @@ for os in fedora coreos; do --detach \ --name "hostname-$os-custom" \ --hostname my-test-vm \ - "$image" \ - "" + "$image" __test() { __engine exec "hostname-$os-custom" --as "$user" \ diff --git a/tests/t/mount.sh b/tests/t/mount.sh index a1497d2..1c3055b 100644 --- a/tests/t/mount.sh +++ b/tests/t/mount.sh @@ -14,8 +14,7 @@ for os in fedora coreos; do --volume "$TEMP_DIR/file:$home/file:z" \ --volume "$TEMP_DIR:$home/dir:z" \ --mount "type=tmpfs,dst=$home/tmp" \ - "$image" \ - "" + "$image" __test() { __engine exec "mount-$os" --as "$user" diff --git a/tests/t/publish.sh b/tests/t/publish.sh index 34f04c6..a2748dc 100644 --- a/tests/t/publish.sh +++ b/tests/t/publish.sh @@ -7,8 +7,7 @@ __engine run \ --rm --detach \ --name publish \ --publish 127.0.0.1::8000 \ - "$image" \ - "" + "$image" endpoint=$( __engine port publish | tee /dev/stderr | cut -d' ' -f3 ) diff --git a/tests/t/stop-start.sh b/tests/t/stop-start.sh index b4787b1..bdce535 100644 --- a/tests/t/stop-start.sh +++ b/tests/t/stop-start.sh @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -__engine run --detach --name stop-start "${TEST_IMAGES[fedora]}" "" +__engine run --detach --name stop-start "${TEST_IMAGES[fedora]}" __engine exec stop-start --as fedora '[[ ! -e i-was-here ]] && touch i-was-here'