Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO: Add docker-buildx #18487

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/update-iso-image-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
OLD_BUILDKIT=$(DEP=buildkit make get-dependency-version)
OLD_CNI_PLUGINS=$(DEP=cni-plugins make get-dependency-version)
OLD_CONTAINERD=$(DEP=containerd make get-dependency-version)
OLD_CRIO=$(DEP=cri-o make get-dependency-version)
OLD_CRICTL=$(DEP=crictl make get-dependency-version)
OLD_CRIO=$(DEP=cri-o make get-dependency-version)
OLD_CRUN=$(DEP=crun make get-dependency-version)
OLD_DOCKER=$(DEP=docker make get-dependency-version)
OLD_DOCKER_BUILDX=$(DEP=docker-buildx make get-dependency-version)
OLD_GO=$(DEP=go make get-dependency-version)
OLD_NERDCTL=$(DEP=nerdctl make get-dependency-version)
OLD_NERDCTLD=$(DEP=nerdctld make get-dependency-version)
Expand All @@ -37,6 +38,7 @@ jobs:
# make update-crictl-version
make update-crun-version
make update-docker-version
make update-docker-buildx-version
make update-golang-version
make update-nerdctl-version
make update-nerdctld-version
Expand All @@ -45,10 +47,11 @@ jobs:
NEW_BUILDKIT=$(DEP=buildkit make get-dependency-version)
NEW_CNI_PLUGINS=$(DEP=cni-plugins make get-dependency-version)
NEW_CONTAINERD=$(DEP=containerd make get-dependency-version)
NEW_CRIO=$(DEP=cri-o make get-dependency-version)
NEW_CRICTL=$(DEP=crictl make get-dependency-version)
NEW_CRIO=$(DEP=cri-o make get-dependency-version)
NEW_CRUN=$(DEP=crun make get-dependency-version)
NEW_DOCKER=$(DEP=docker make get-dependency-version)
NEW_DOCKER_BUILDX=$(DEP=docker-buildx make get-dependency-version)
NEW_GO=$(DEP=go make get-dependency-version)
NEW_NERDCTL=$(DEP=nerdctl make get-dependency-version)
NEW_NERDCTLD=$(DEP=nerdctld make get-dependency-version)
Expand All @@ -67,14 +70,14 @@ jobs:
echo "### Update containerd from $OLD_CONTAINERD to $NEW_CONTAINERD" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containerd/containerd/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRIO" != "$NEW_CRIO" ]; then
echo "### Update CRI-O from $OLD_CRIO to $NEW_CRIO" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/cri-o/cri-o/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRICTL" != "$NEW_CRICTL" ]; then
echo "### Update crictl from $OLD_CRICTL to $NEW_CRICTL" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/kubernetes-sigs/cri-tools/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRIO" != "$NEW_CRIO" ]; then
echo "### Update CRI-O from $OLD_CRIO to $NEW_CRIO" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/cri-o/cri-o/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRUN" != "$NEW_CRUN" ]; then
echo "### Update crun from $OLD_CRUN to $NEW_CRUN" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containers/crun/releases)" >> "$GITHUB_OUTPUT"
Expand All @@ -83,6 +86,10 @@ jobs:
echo "### Update Docker from $OLD_DOCKER to $NEW_DOCKER" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/moby/moby/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_DOCKER_BUILDX" != "$NEW_DOCKER_BUILDX" ]; then
echo "### Update buildx from $OLD_DOCKER_BUILDX to $NEW_DOCKER_BUILDX" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/docker/buildx/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_GO" != "$NEW_GO" ]; then
echo "### Update Go from $OLD_GO to $NEW_GO" >> "$GITHUB_OUTPUT"
fi
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KIC_VERSION ?= $(shell grep -E "Version =" pkg/drivers/kic/types.go | cut -d \"
HUGO_VERSION ?= $(shell grep -E "HUGO_VERSION = \"" netlify.toml | cut -d \" -f2)

# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
ISO_VERSION ?= v1.33.1-1721324531-19298
ISO_VERSION ?= v1.33.1-1721417592-18487

# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
Expand Down
5 changes: 3 additions & 2 deletions deploy/iso/minikube-iso/arch/aarch64/package/Config.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
menu "System tools aarch64"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/buildkit-bin-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/cni-plugins-latest-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/containerd-bin-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/cri-dockerd-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/crictl-bin-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/docker-bin-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/cni-plugins-latest-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/containerd-bin-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/docker-buildx-aarch64/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/aarch64/package/nerdctl-bin-aarch64/Config.in"
endmenu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BR2_PACKAGE_DOCKER_BUILDX_AARCH64
bool "docker-buildx"
default y
depends on BR2_aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256 8c9dd3fb18ccba399223ba0f623c9fe09fa38fb2a05283131be8e4e139b2d8fa v0.16.1.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
################################################################################
#
# docker-buildx
#
################################################################################

DOCKER_BUILDX_AARCH64_VERSION = v0.16.1
DOCKER_BUILDX_AARCH64_COMMIT = 34c195271a3f6dc64814db71438dc50dd41d7e3e
DOCKER_BUILDX_AARCH64_SITE = https://github.com/docker/buildx/archive
DOCKER_BUILDX_AARCH64_SOURCE = $(DOCKER_BUILDX_AARCH64_VERSION).tar.gz
DOCKER_BUILDX_AARCH64_GOPATH = $(@D)/_output
DOCKER_BUILDX_AARCH64_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GO111MODULE=on \
GOPATH="$(DOCKER_BUILDX_AARCH64_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_AARCH64_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_AARCH64_GOPATH)/bin:$(BR_PATH) \
GOARCH=arm64

DOCKER_BUILDX_AARCH64_COMPILE_SRC = $(DOCKER_BUILDX_AARCH64_GOPATH)/src/github.com/docker/buildx

define DOCKER_BUILDX_AARCH64_POST_EXTRACT_WORKAROUNDS
# Set -buildvcs=false to disable VCS stamping (fails in buildroot)
sed -i 's|go build |go build -buildvcs=false |' -i $(@D)/hack/build
endef

DOCKER_BUILDX_AARCH64_POST_EXTRACT_HOOKS += DOCKER_BUILDX_AARCH64_POST_EXTRACT_WORKAROUNDS

define DOCKER_BUILDX_AARCH64_CONFIGURE_CMDS
mkdir -p $(TARGET_DIR)/usr/libexec/docker/cli-plugins
endef

define DOCKER_BUILDX_AARCH64_BUILD_CMDS
PWD=$(DOCKER_BUILDX_AARCH64_COMPILE_SRC) $(DOCKER_BUILDX_AARCH64_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) VERSION=$(DOCKER_BUILDX_AARCH64_VERSION) REVISION=$(DOCKER_BUILDX_AARCH64_COMMIT) -C $(@D) build
endef

define DOCKER_BUILDX_AARCH64_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 \
$(@D)/bin/build/docker-buildx \
$(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
endef

$(eval $(generic-package))
7 changes: 4 additions & 3 deletions deploy/iso/minikube-iso/arch/x86_64/package/Config.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
menu "System tools x86_64"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/buildkit-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/cni-plugins-latest/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/containerd-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/cri-dockerd/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/crictl-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/docker-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/cni-plugins-latest/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/containerd-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/nerdctl-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/docker-buildx/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/hyperv-daemons/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/nerdctl-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/arch/x86_64/package/vbox-mount-service/Config.in"
endmenu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BR2_PACKAGE_DOCKER_BUILDX
bool "docker-buildx"
default y
depends on BR2_x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256 8c9dd3fb18ccba399223ba0f623c9fe09fa38fb2a05283131be8e4e139b2d8fa v0.16.1.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
################################################################################
#
# docker-buildx
#
################################################################################

DOCKER_BUILDX_VERSION = v0.16.1
DOCKER_BUILDX_COMMIT = 34c195271a3f6dc64814db71438dc50dd41d7e3e
DOCKER_BUILDX_SITE = https://github.com/docker/buildx/archive
DOCKER_BUILDX_SOURCE = $(DOCKER_BUILDX_VERSION).tar.gz
DOCKER_BUILDX_GOPATH = $(@D)/_output
DOCKER_BUILDX_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GO111MODULE=on \
GOPATH="$(DOCKER_BUILDX_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_GOPATH)/bin:$(BR_PATH) \
GOARCH=amd64

DOCKER_BUILDX_COMPILE_SRC = $(DOCKER_BUILDX_GOPATH)/src/github.com/docker/buildx

define DOCKER_BUILDX_POST_EXTRACT_WORKAROUNDS
# Set -buildvcs=false to disable VCS stamping (fails in buildroot)
sed -i 's|go build |go build -buildvcs=false |' -i $(@D)/hack/build
endef

DOCKER_BUILDX_POST_EXTRACT_HOOKS += DOCKER_BUILDX_POST_EXTRACT_WORKAROUNDS

define DOCKER_BUILDX_CONFIGURE_CMDS
mkdir -p $(TARGET_DIR)/usr/libexec/docker/cli-plugins
endef

define DOCKER_BUILDX_BUILD_CMDS
PWD=$(DOCKER_BUILDX_COMPILE_SRC) $(DOCKER_BUILDX_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) VERSION=$(DOCKER_BUILDX_VERSION) REVISION=$(DOCKER_BUILDX_COMMIT) -C $(@D) build
endef

define DOCKER_BUILDX_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 \
$(@D)/bin/build/docker-buildx \
$(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
endef

$(eval $(generic-package))
1 change: 1 addition & 0 deletions hack/update/get_version/get_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var dependencies = map[string]dependency{
"crictl": {"deploy/iso/minikube-iso/arch/x86_64/package/crictl-bin/crictl-bin.mk", `CRICTL_BIN_VERSION = (.*)`},
"crun": {"deploy/iso/minikube-iso/package/crun-latest/crun-latest.mk", `CRUN_LATEST_VERSION = (.*)`},
"docker": {"deploy/iso/minikube-iso/arch/x86_64/package/docker-bin/docker-bin.mk", `DOCKER_BIN_VERSION = (.*)`},
"docker-buildx": {"deploy/iso/minikube-iso/arch/x86_64/package/docker-buildx/docker-buildx.mk", `DOCKER_BUILDX_VERSION = (.*)`},
"flannel": {"pkg/minikube/cni/flannel.yaml", `flannel:(.*)`},
"gcp-auth": {addonsFile, `k8s-minikube/gcp-auth-webhook:(.*)@`},
"gh": {"hack/jenkins/installers/check_install_gh.sh", `GH_VERSION="(.*)"`},
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/download/iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const fileScheme = "file"
// DefaultISOURLs returns a list of ISO URL's to consult by default, in priority order
func DefaultISOURLs() []string {
v := version.GetISOVersion()
isoBucket := "minikube-builds/iso/19298"
isoBucket := "minikube-builds/iso/18487"

return []string{
fmt.Sprintf("https://storage.googleapis.com/%s/minikube-%s-%s.iso", isoBucket, v, runtime.GOARCH),
Expand Down