Skip to content

Commit

Permalink
Merge pull request #130 from jandubois/remove-rd-edition
Browse files Browse the repository at this point in the history
Remove RD edition; bump Alpine to 3.20.3
  • Loading branch information
AkihiroSuda authored Oct 26, 2024
2 parents 99d3e0a + e6cd8bb commit 69f649b
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 142 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

env:
ALPINE_VERSION: 3.20.0
ALPINE_VERSION: 3.20.3
DOCKER_BUILDKIT: 1

jobs:
Expand Down Expand Up @@ -37,11 +37,6 @@ jobs:
make iso EDITION=std ARCH=x86_64
make iso EDITION=std ARCH=aarch64
- name: Build the rd edition
run: |
make iso EDITION=rd ARCH=x86_64
make iso EDITION=rd ARCH=aarch64
- name: Create release
if: github.event_name != 'pull_request'
env:
Expand Down
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ALPINE_VERSION ?= 3.20.0
ALPINE_VERSION ?= 3.20.3
REPO_VERSION ?= $(shell echo "$(ALPINE_VERSION)" | sed -E 's/^([0-9]+\.[0-9]+).*/v\1/')
GIT_TAG ?= $(shell echo "v$(ALPINE_VERSION)" | sed 's/^vedge$$/origin\/master/')
BUILD_ID ?= $(shell git describe --tags)
Expand All @@ -21,10 +21,7 @@ ARCH_ALIAS_x86_64 = amd64
ARCH_ALIAS_aarch64 = arm64
ARCH_ALIAS = $(shell echo "$(ARCH_ALIAS_$(ARCH))")

NERDCTL_VERSION=1.1.0
QEMU_VERSION=v8.1.5
CRI_DOCKERD_VERSION=0.2.3
CRI_DOCKERD_ORG=Mirantis
BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)

.PHONY: mkimage
Expand All @@ -39,20 +36,13 @@ mkimage:
.

.PHONY: iso
iso: nerdctl-full-$(NERDCTL_VERSION)-$(ARCH) qemu-$(QEMU_VERSION)-copying cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH)
ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ./build.sh
iso: qemu-$(QEMU_VERSION)-copying
ALPINE_VERSION=$(ALPINE_VERSION) QEMU_VERSION=$(QEMU_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ./build.sh


nerdctl-full-$(NERDCTL_VERSION)-$(ARCH):
curl -o $@ -Ls https://github.com/containerd/nerdctl/releases/download/v$(NERDCTL_VERSION)/nerdctl-full-$(NERDCTL_VERSION)-linux-$(ARCH_ALIAS).tar.gz

qemu-$(QEMU_VERSION)-copying:
curl -o $@ -Ls https://raw.githubusercontent.com/qemu/qemu/$(QEMU_VERSION)/COPYING

cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH):
curl -o $@ -Ls https://github.com/$(CRI_DOCKERD_ORG)/cri-dockerd/releases/download/v$(CRI_DOCKERD_VERSION)/cri-dockerd-$(CRI_DOCKERD_VERSION).$(ARCH_ALIAS).tgz
curl -o $@.LICENSE -Ls https://raw.githubusercontent.com/$(CRI_DOCKERD_ORG)/cri-dockerd/v$(CRI_DOCKERD_VERSION)/LICENSE

.PHONY: lima
lima:
ALPINE_VERSION=$(ALPINE_VERSION) EDITION=$(EDITION) ARCH=$(ARCH) ./lima.sh
Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Right now the "std" edition also installs `qemu-aarch64` and configures it via `

The "k3s" edition is the same as "ci" plus `k3s` pre-installed. This is still subject to change.

### Rancher Desktop: rd

The "rd" edition includes additional components for Rancher Desktop. These can change randomly to match particular RD releases (or just experiments) and should not be relied on by other applications.

## Architecture

This repo supports the generation of images for different architectures.
Expand All @@ -51,33 +47,33 @@ Note that this repo includes the [Alpine aports](https://github.com/alpinelinux/
git submodule update --init
```

The examples show the default values for `ALPINE_VERSION=3.14.3 EDITION=std`, `ARCH` defaults to the OS architecture `uname -m`.
The examples show the default values for `ALPINE_VERSION=3.20.3 EDITION=std`, `ARCH` defaults to the OS architecture `uname -m`.
The options need to be specified only to select non-default setting.

### Build the builder

The ISO builder will be created inside a docker image. You can specify the Alpine version used to create it:

```
make mkimage ALPINE_VERSION=3.14.3
make mkimage ALPINE_VERSION=3.20.3
```

### Build the ISO

This docker image can then be used to create ISO images that will be stored under `./iso`:

```
make iso ALPINE_VERSION=3.14.3 EDITION=std
make iso ALPINE_VERSION=3.20.3 EDITION=std
```

### Run the ISO with qemu

```
make run ALPINE_VERSION=3.14.3 EDITION=std
make run ALPINE_VERSION=3.20.3 EDITION=std
```

### Run the ISO with Lima

```
make lima ALPINE_VERSION=3.14.3 EDITION=std
make lima ALPINE_VERSION=3.20.3 EDITION=std
```
3 changes: 0 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ ${DOCKER} run --rm \
-v "${PWD}/lima-init.openrc:/home/build/lima-init.openrc:ro" \
-v "${PWD}/lima-init-local.openrc:/home/build/lima-init-local.openrc:ro" \
-v "${PWD}/lima-network.awk:/home/build/lima-network.awk:ro" \
-v "${PWD}/nerdctl-full-${NERDCTL_VERSION}-${ARCH}:/home/build/nerdctl-full.tar.gz:ro" \
-v "${PWD}/qemu-${QEMU_VERSION}-copying:/home/build/qemu-copying:ro" \
-v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}:/home/build/cri-dockerd.tar.gz:ro" \
-v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}.LICENSE:/home/build/cri-dockerd.license:ro" \
$(env | grep ^LIMA_ | xargs -n 1 printf -- '-e %s ') \
-e "LIMA_REPO_VERSION=${REPO_VERSION}" \
-e "LIMA_BUILD_ID=${BUILD_ID}" \
Expand Down
9 changes: 1 addition & 8 deletions edition/min
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@ export LIMA_INSTALL_BINFMT_MISC=false
export LIMA_INSTALL_CA_CERTIFICATES=false
export LIMA_INSTALL_CLOUD_INIT=false
export LIMA_INSTALL_CLOUD_UTILS_GROWPART=false
export LIMA_INSTALL_CNI_PLUGINS=false
export LIMA_INSTALL_CNI_PLUGIN_FLANNEL=false
export LIMA_INSTALL_CURL=false
export LIMA_INSTALL_DOCKER=false
export LIMA_INSTALL_E2FSPROGS_EXTRA=false
export LIMA_INSTALL_GIT=false
export LIMA_INSTALL_K3S=false
export LIMA_INSTALL_CRI_DOCKERD=false
export LIMA_INSTALL_IPTABLES=false
export LIMA_INSTALL_K3S=false
export LIMA_INSTALL_LIMA_INIT=false
export LIMA_INSTALL_LOGROTATE=false
export LIMA_INSTALL_NERDCTL_FULL=false
export LIMA_INSTALL_OPENSSH_SFTP_SERVER=false
export LIMA_INSTALL_SSHFS=false
export LIMA_INSTALL_TINI=false
export LIMA_INSTALL_TZDATA=false
export LIMA_INSTALL_ZSTD=false
18 changes: 0 additions & 18 deletions edition/rd

This file was deleted.

2 changes: 1 addition & 1 deletion edition/std
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
source edition/min
LIMA_INSTALL_LIMA_INIT=true
LIMA_INSTALL_BINFMT_MISC=true
LIMA_INSTALL_CA_CERTIFICATES=true
LIMA_INSTALL_CLOUD_UTILS_GROWPART=true
LIMA_INSTALL_E2FSPROGS_EXTRA=true
LIMA_INSTALL_GIT=true
LIMA_INSTALL_IPTABLES=true
LIMA_INSTALL_LIMA_INIT=true
LIMA_INSTALL_LOGROTATE=true
LIMA_INSTALL_OPENSSH_SFTP_SERVER=true
LIMA_INSTALL_SSHFS=true
Expand Down
62 changes: 1 addition & 61 deletions genapkovl-lima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,6 @@ if [ "${LIMA_INSTALL_CLOUD_UTILS_GROWPART}" == "true" ]; then
echo partx >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then
echo libseccomp >> "$tmp"/etc/apk/world
echo runc >> "$tmp"/etc/apk/world
echo containerd >> "$tmp"/etc/apk/world
echo tini-static >> "$tmp"/etc/apk/world
echo device-mapper-libs >> "$tmp"/etc/apk/world
echo docker-engine >> "$tmp"/etc/apk/world
echo docker-openrc >> "$tmp"/etc/apk/world
echo docker-cli >> "$tmp"/etc/apk/world
echo docker >> "$tmp"/etc/apk/world

# kubectl port-forward requires `socat` when using docker-shim
echo socat >> "$tmp"/etc/apk/world

# So `docker buildx` can unpack tar.xz files
echo xz >> "$tmp"/etc/apk/world
fi

# /proc/sys/fs/binfmt_misc must exist for /etc/init.d/procfs to load
# the binfmt-misc kernel module, which will then mount the filesystem.
# This is needed for Rosetta to register.
Expand Down Expand Up @@ -218,22 +200,6 @@ if [ "${LIMA_INSTALL_CA_CERTIFICATES}" == "true" ]; then
echo "ca-certificates" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then
echo "cni-plugins" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_CNI_PLUGIN_FLANNEL}" == "true" ]; then
echo "cni-plugin-flannel" >> "$tmp"/etc/apk/world
ARCH=amd64
if [ "$(uname -m)" == "aarch64" ]; then
ARCH=arm64
fi
fi

if [ "${LIMA_INSTALL_CURL}" == "true" ]; then
echo "curl" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_E2FSPROGS_EXTRA}" == "true" ]; then
echo "e2fsprogs-extra" >> "$tmp"/etc/apk/world
fi
Expand All @@ -251,21 +217,10 @@ if [ "${LIMA_INSTALL_LOGROTATE}" == "true" ]; then
echo "logrotate" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_IPTABLES}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then
if [ "${LIMA_INSTALL_IPTABLES}" == "true" ]; then
echo "iptables ip6tables" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then
mkdir -p "${tmp}/nerdctl"
tar xz -C "${tmp}/nerdctl" -f /home/build/nerdctl-full.tar.gz

mkdir -p "${tmp}/usr/local/bin/"
for bin in buildctl buildkitd nerdctl; do
cp "${tmp}/nerdctl/bin/${bin}" "${tmp}/usr/local/bin/${bin}"
chmod u+s "${tmp}/usr/local/bin/${bin}"
done
fi

if [ "${LIMA_INSTALL_OPENSSH_SFTP_SERVER}" == "true" ]; then
echo "openssh-sftp-server" >> "$tmp"/etc/apk/world
fi
Expand All @@ -274,10 +229,6 @@ if [ "${LIMA_INSTALL_SSHFS}" == "true" ]; then
echo "sshfs" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_ZSTD}" == "true" ]; then
echo "zstd" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_TINI}" == "true" ]; then
echo tini-static >> "$tmp"/etc/apk/world
ln -sf /sbin/tini-static "$tmp"/usr/bin/tini
Expand All @@ -287,17 +238,6 @@ if [ "${LIMA_INSTALL_TZDATA}" == "true" ]; then
echo tzdata >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_CRI_DOCKERD}" == "true" ]; then
mkdir -p "${tmp}/cri-dockerd"
tar xz -C "${tmp}/cri-dockerd" -f /home/build/cri-dockerd.tar.gz
mkdir -p "${tmp}/usr/local/bin/"
cp "${tmp}/cri-dockerd/cri-dockerd/cri-dockerd" "${tmp}/usr/local/bin/"

#Copy the LICENSE file for cri-dockerd
mkdir -p "${tmp}/usr/share/doc/cri-dockerd/"
cp /home/build/cri-dockerd.license "${tmp}/usr/share/doc/cri-dockerd/LICENSE"
fi

mkdir -p "${tmp}/etc"
mkdir -p "${tmp}/proc"
mkdir -p "${tmp}/usr"
Expand Down
27 changes: 5 additions & 22 deletions mkimg.lima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,21 @@ profile_lima() {
if [ "${LIMA_INSTALL_CLOUD_UTILS_GROWPART}" == "true" ]; then
apks="$apks cloud-utils-growpart partx"
fi
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then
apks="$apks cni-plugins"
fi
if [ "${LIMA_INSTALL_CNI_PLUGIN_FLANNEL}" == "true" ]; then
apks="$apks cni-plugin-flannel"
fi
if [ "${LIMA_INSTALL_CURL}" == "true" ]; then
apks="$apks curl"
fi
if [ "${LIMA_INSTALL_E2FSPROGS_EXTRA}" == "true" ]; then
apks="$apks e2fsprogs-extra"
fi
if [ "${LIMA_INSTALL_GIT}" == "true" ]; then
apks="$apks git"
fi
if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then
apks="$apks libseccomp runc containerd tini-static device-mapper-libs"
apks="$apks docker-engine docker-openrc docker-cli docker"
apks="$apks socat xz"
fi
if [ "${LIMA_INSTALL_LIMA_INIT}" == "true" ]; then
apks="$apks e2fsprogs lsblk sfdisk shadow sudo udev"
if [ "${LIMA_INSTALL_IPTABLES}" == "true" ]; then
apks="$apks iptables ip6tables"
fi
if [ "${LIMA_INSTALL_K3S}" == "true" ]; then
apks="$apks k3s"
fi
if [ "${LIMA_INSTALL_LIMA_INIT}" == "true" ]; then
apks="$apks e2fsprogs lsblk sfdisk shadow sudo udev"
fi
if [ "${LIMA_INSTALL_LOGROTATE}" == "true" ]; then
apks="$apks logrotate"
fi
Expand All @@ -61,13 +50,7 @@ profile_lima() {
if [ "${LIMA_INSTALL_TINI}" == "true" ]; then
apks="$apks tini-static"
fi
if [ "${LIMA_INSTALL_IPTABLES}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then
apks="$apks iptables ip6tables"
fi
if [ "${LIMA_INSTALL_TZDATA}" == "true" ]; then
apks="$apks tzdata"
fi
if [ "${LIMA_INSTALL_ZSTD}" == "true" ]; then
apks="$apks zstd"
fi
}
2 changes: 1 addition & 1 deletion src/aports
Submodule aports updated 725 files

0 comments on commit 69f649b

Please sign in to comment.