Skip to content

Commit

Permalink
Switch to Fedora 40 everywhere
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
albertofaria committed Apr 24, 2024
1 parent 7da8345 commit 07bb3c3
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 31 deletions.
25 changes: 11 additions & 14 deletions docs/2-podman-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
```

Expand All @@ -127,7 +126,7 @@ option:
$ podman run \
--runtime crun-vm \
-it --rm \
quay.io/containerdisks/fedora:39 \
quay.io/containerdisks/fedora:40 \
--password pass
```

Expand All @@ -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
```

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
```

Expand All @@ -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
```

Expand All @@ -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
```

Expand All @@ -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
```
Expand Down
4 changes: 1 addition & 3 deletions docs/3-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions examples/quadlet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions tests/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down
5 changes: 2 additions & 3 deletions tests/t/hostname.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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" \
Expand Down
3 changes: 1 addition & 2 deletions tests/t/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions tests/t/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down
2 changes: 1 addition & 1 deletion tests/t/stop-start.sh
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit 07bb3c3

Please sign in to comment.