-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add container runtime archive configuration
This change adds container runtime archive configuration as a tracked dependency with weekly update automation against upstream nerdctl full archives. Signed-off-by: Austin Vazquez <[email protected]>
- Loading branch information
1 parent
fff21c1
commit 0fc8594
Showing
8 changed files
with
158 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,12 @@ endif | |
FINCH_IMAGE_LOCATION := $(OS_OUTDIR)/$(FINCH_OS_BASENAME) | ||
FINCH_IMAGE_DIGEST := "sha512:$(FINCH_OS_DIGEST)" | ||
|
||
include $(CURDIR)/deps/container-runtime-full-archive.conf | ||
CONTAINER_RUNTIME_ARCHIVE_AARCH64_LOCATION ?= "$(ARTIFACT_BASE_URL)/$(AARCH64_ARTIFACT)" | ||
CONTAINER_RUNTIME_ARCHIVE_AARCH64_DIGEST ?= "sha256:$(AARCH64_256_DIGEST)" | ||
CONTAINER_RUNTIME_ARCHIVE_X86_64_LOCATION ?= "$(ARTIFACT_BASE_URL)/$(X86_64_ARTIFACT)" | ||
CONTAINER_RUNTIME_ARCHIVE_X86_64_DIGEST ?= "sha256:$(X86_64_256_DIGEST)" | ||
|
||
# Virtualization framework is the default virtual machine type on Finch on macOS | ||
# This is only used for testing of Finch core bundles. | ||
FINCH_VM_TYPE ?= vz | ||
|
@@ -55,6 +61,10 @@ $(LIMA_TEMPLATE_OUTDIR)/fedora.yaml: $(LIMA_TEMPLATE_OUTDIR) | |
sed -i.bak -e "s|<image_location>|$(FINCH_IMAGE_LOCATION)|g" [email protected] | ||
sed -i.bak -e "s/<image_arch>/$(LIMA_ARCH)/g" [email protected] | ||
sed -i.bak -e "s/<image_digest>/$(FINCH_IMAGE_DIGEST)/g" [email protected] | ||
sed -i.bak -e "s|<container_runtime_archive_aarch64_location>|$(CONTAINER_RUNTIME_ARCHIVE_AARCH64_LOCATION)|g" [email protected] | ||
sed -i.bak -e "s/<container_runtime_archive_aarch64_digest>/$(CONTAINER_RUNTIME_ARCHIVE_AARCH64_DIGEST)/g" [email protected] | ||
sed -i.bak -e "s|<container_runtime_archive_x86_64_location>|$(CONTAINER_RUNTIME_ARCHIVE_X86_64_LOCATION)|g" [email protected] | ||
sed -i.bak -e "s/<container_runtime_archive_x86_64_digest>/$(CONTAINER_RUNTIME_ARCHIVE_X86_64_DIGEST)/g" [email protected] | ||
|
||
# Replace was successful, so cleanup .bak files | ||
rm $(LIMA_TEMPLATE_OUTDIR)/*.yaml.template.bak | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# A script to update the container runtime full archive used for Finch on macOS and Windows. | ||
# | ||
# Usage: bash update-container-runtime-full-archive.sh -t <Git tag> | ||
|
||
set -euxo pipefail | ||
|
||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
PROJECT_ROOT="$(cd -- "${CURRENT_DIR}/.." && pwd)" | ||
|
||
while getopts t: flag | ||
do | ||
case "${flag}" in | ||
t) tag=${OPTARG};; | ||
*) echo "Error: unknown flag" && exit 1;; | ||
esac | ||
done | ||
[[ -z "$tag" ]] && { echo "Error: Git tag not set"; exit 1; } | ||
|
||
DEPENDENCY_DOWNLOAD_BASE_URL="https://github.com/containerd/nerdctl/releases/download" | ||
dependency_download_url="${DEPENDENCY_DOWNLOAD_BASE_URL}/${tag}" | ||
|
||
# Pull upstream's published release shasums and save for later artifact verification. | ||
mkdir -p "${PROJECT_ROOT}/downloads" | ||
downloaded_shasums="${PROJECT_ROOT}/downloads/nerdctl-${tag}.sha256sums" | ||
curl -L --fail "${dependency_download_url}/SHA256SUMS" > "${downloaded_shasums}" | ||
|
||
version=${tag#v} | ||
aarch64_deps="nerdctl-full-${version}-linux-arm64.tar.gz" | ||
aarch64_deps_shasum=$(grep "${aarch64_deps}" "${downloaded_shasums}" | cut -d ' ' -f 1) | ||
amd64_deps="nerdctl-full-${version}-linux-amd64.tar.gz" | ||
amd64_deps_shasum=$(grep "${amd64_deps}" "${downloaded_shasums}" | cut -d ' ' -f 1) | ||
|
||
# Update archive file with latest artifacts and digests. | ||
ARCHIVE_FILE="${PROJECT_ROOT}/deps/container-runtime-full-archive.conf" | ||
truncate -s 0 "${ARCHIVE_FILE}" | ||
{ | ||
echo "ARTIFACT_BASE_URL=${dependency_download_url}" | ||
echo "" | ||
echo "AARCH64_ARTIFACT=${aarch64_deps}" | ||
echo "AARCH64_256_DIGEST=${aarch64_deps_shasum}" | ||
echo "" | ||
echo "X86_64_ARTIFACT=${amd64_deps}" | ||
echo "X86_64_256_DIGEST=${amd64_deps_shasum}" | ||
} >> "${ARCHIVE_FILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ARTIFACT_BASE_URL=https://github.com/containerd/nerdctl/releases/download/v1.7.7 | ||
|
||
AARCH64_ARTIFACT=nerdctl-full-1.7.7-linux-arm64.tar.gz | ||
AARCH64_256_DIGEST=b161a20c0e41f9ad999e8411e23c58ece4b3e584ae90b4252b76a39eee4a0c31 | ||
|
||
X86_64_ARTIFACT=nerdctl-full-1.7.7-linux-amd64.tar.gz | ||
X86_64_256_DIGEST=a731eac93e8e9dda1a0d76dc1606438deb0668ea7d6bd5c5af436353ed9f65c5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule socket_vmnet
updated
16 files
+0 β30 | .github/workflows/build.yaml | |
+0 β46 | .github/workflows/qemu.yaml | |
+4 β24 | .github/workflows/release.yml | |
+33 β32 | .github/workflows/test.yml | |
+5 β20 | Makefile | |
+65 β159 | README.md | |
+76 β58 | cli.c | |
+2 β1 | client/main.c | |
+0 β34 | hack/brew-install-version.sh | |
+0 β3 | launchd/io.github.lima-vm.socket_vmnet.bridged.en0.plist | |
+0 β3 | launchd/io.github.lima-vm.socket_vmnet.plist | |
+0 β20 | log.h | |
+124 β144 | main.c | |
+0 β30 | test/lima.yaml | |
+0 β76 | test/perf.sh | |
+0 β20 | test/vmnet.yaml |