Skip to content

Commit

Permalink
templates: replace alpine with alpine-image
Browse files Browse the repository at this point in the history
The old ISO9660-based `alpine` template is still available as
`deprecated/alpine-iso`.

Fix issue 2366
Fix issue 2386

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Oct 9, 2024
1 parent cae9bf2 commit 2e48e7d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
- experimental/net-user-v2.yaml
- experimental/9p.yaml
- docker.yaml
- ../hack/test-templates/alpine-9p-writable.yaml
- ../hack/test-templates/alpine-iso-9p-writable.yaml # Covers deprecated/alpine-iso.yaml
- ../hack/test-templates/test-misc.yaml
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 4 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Default: [`default`](./default.yaml) (⭐Ubuntu, with containerd/nerdctl)
Distro:
- [`almalinux-8`](./almalinux-8.yaml): AlmaLinux 8
- [`almalinux-9`](./almalinux-9.yaml), `almalinux.yaml`: AlmaLinux 9
- [`alpine`](./alpine.yaml): ☆Alpine Linux
- [`alpine`](./alpine.yaml): ☆Alpine Linux. See also `deprecated/alpine-iso` for compatibility with Lima prior to v1.0.
- [`archlinux`](./archlinux.yaml): ⭐Arch Linux
- [`centos-stream-9`](./centos-stream-9.yaml), `centos-stream.yaml`: CentOS Stream 9
- [`debian-11`](./debian-11.yaml): Debian GNU/Linux 11(bullseye)
Expand Down Expand Up @@ -58,6 +58,9 @@ Optional feature enablers:
- [`experimental/vnc`](./experimental/vnc.yaml): [experimental] use vnc display and xorg server
- [`experimental/alsa`](./experimental/alsa.yaml): [experimental] use alsa and default audio device

Deprecated:
- [`deprecated/alpine-iso`](./deprecated/alpine-iso.yaml): ☆Alpine Linux (ISO9660 image). Compatible with the `alpine` template used in Lima prior to v1.0.

Lost+found:
- ~`centos`~: Removed in Lima v0.8.0, as CentOS 8 reached [EOL](https://www.centos.org/centos-linux-eol/).
Replaced by [`almalinux`](./almalinux.yaml), [`centos-stream`](./centos-stream.yaml), [`oraclelinux`](./oraclelinux.yaml),
Expand Down
17 changes: 0 additions & 17 deletions examples/alpine-image.yaml

This file was deleted.

12 changes: 4 additions & 8 deletions examples/alpine.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# This template requires Lima v0.7.0 or later.
# Using the Alpine 3.20 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.

images:
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-x86_64.iso"
- location: "https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-uefi-cloudinit-r0.qcow2"
arch: "x86_64"
digest: "sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67"
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-aarch64.iso"
digest: "sha512:5828254c27c948824c4c6d4fb88c4d96ee9b5b58ae455036b1571bb037a5b5de124e1d55f00386b9e711cef7771146278bd5eb1036a2f8db6fa34611393ebec1"
- location: "https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-aarch64-uefi-cloudinit-r0.qcow2"
arch: "aarch64"
digest: "sha512:7ff023e354bbf78eaf44f32a5417bec3ca2af853691e4c64ee4aa819674acd22720897ce9f23e3e959679a72e8300a31f5c6aa12be1c3d8ae7eff3c25b8b5e36"
digest: "sha512:76eeef3cb1b38b3a0c2e745d8108558645220355cd870cba3a88198bcd0036485a0a683d8469f8405251918e972d24c461d418a30112e92efe44b460e4cba7ba"

mounts:
- location: "~"
- location: "/tmp/lima"
writable: true

# The built-in containerd installer does not support Alpine currently.
# Hint: use the "rd" ISO instead of the "std" ISO to enable containerd: https://github.com/lima-vm/alpine-lima/releases/
containerd:
system: false
user: false
21 changes: 21 additions & 0 deletions examples/deprecated/alpine-iso.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This template requires Lima v0.7.0 or later.
# Using the Alpine 3.20 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.

images:
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-x86_64.iso"
arch: "x86_64"
digest: "sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67"
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.39/alpine-lima-std-3.20.0-aarch64.iso"
arch: "aarch64"
digest: "sha512:7ff023e354bbf78eaf44f32a5417bec3ca2af853691e4c64ee4aa819674acd22720897ce9f23e3e959679a72e8300a31f5c6aa12be1c3d8ae7eff3c25b8b5e36"

mounts:
- location: "~"
- location: "/tmp/lima"
writable: true

# The built-in containerd installer does not support Alpine currently.
# Hint: use the "rd" ISO instead of the "std" ISO to enable containerd: https://github.com/lima-vm/alpine-lima/releases/
containerd:
system: false
user: false
2 changes: 1 addition & 1 deletion hack/calculate-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export LIMA_HOME
# ubuntu-24.04 templates/experimental/net-user-v2.yaml
# ubuntu-24.04 templates/experimental/9p.yaml
# ubuntu-24.04 templates/docker.yaml
# ubuntu-24.04 templates/../hack/test-templates/alpine-9p-writable.yaml
# ubuntu-24.04 templates/../hack/test-templates/alpine-iso-9p-writable.yaml
# ubuntu-24.04 templates/../hack/test-templates/test-misc.yaml
# macos-12 templates/vmnet.yaml
# macos-12 https://raw.githubusercontent.com/lima-vm/lima/v0.15.1/examples/ubuntu-lts.yaml
Expand Down
6 changes: 3 additions & 3 deletions hack/test-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ case "$NAME" in
WARNING "Alpine does not support systemd"
CHECKS["systemd"]=
CHECKS["container-engine"]=
[ "$NAME" = "alpine-9p-writable" ] && CHECKS["mount-path-with-spaces"]="1"
[ "$NAME" = "alpine-iso-9p-writable" ] && CHECKS["mount-path-with-spaces"]="1"
;;
"k3s")
ERROR "File \"$FILE\" is not testable with this script"
Expand Down Expand Up @@ -269,7 +269,7 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
fi
"${scriptdir}/test-port-forwarding.pl" "${NAME}"

if [[ -n ${CHECKS["container-engine"]} || ${NAME} == "alpine" ]]; then
if [[ -n ${CHECKS["container-engine"]} || ${NAME} == "alpine"* ]]; then
INFO "Testing that \"${CONTAINER_ENGINE} run\" binds to 0.0.0.0 by default and is forwarded to the host"
if [ "$(uname)" = "Darwin" ]; then
# macOS runners seem to use `localhost` as the hostname, so the perl lookup just returns `127.0.0.1`
Expand All @@ -279,7 +279,7 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
fi
if [ -n "${hostip}" ]; then
sudo=""
if [ "${NAME}" = "alpine" ]; then
if [[ ${NAME} == "alpine"* ]]; then
arch=$(limactl info | jq -r .defaultTemplate.arch)
nerdctl=$(limactl info | jq -r ".defaultTemplate.containerd.archives[] | select(.arch==\"$arch\").location")
curl -Lso nerdctl-full.tgz "${nerdctl}"
Expand Down
File renamed without changes.

0 comments on commit 2e48e7d

Please sign in to comment.