From 7a3db5078eec5957137e2d5d22898669ca7a4f52 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Wed, 22 Apr 2020 14:41:49 -0700 Subject: [PATCH 1/9] Update crio and podman in docker driver base image The dockerfile currently doesn't build because it can't find the specified versions of crio and podman to install. --- hack/images/kicbase.Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hack/images/kicbase.Dockerfile b/hack/images/kicbase.Dockerfile index 97a29b73710b..be6ebb2bce04 100644 --- a/hack/images/kicbase.Dockerfile +++ b/hack/images/kicbase.Dockerfile @@ -16,12 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libglib2.0-0=2.62.1-1 \ && rm /etc/crictl.yaml # install cri-o based on https://github.com/cri-o/cri-o/commit/96b0c34b31a9fc181e46d7d8e34fb8ee6c4dc4e1#diff-04c6e90faac2675aa89e2176d2eec7d8R128 +ENV CRIO_VERSION="1.17=1.17.3~2" RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_19.10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_19.10/Release.key && \ apt-key add - < Release.key && apt-get update && \ - apt-get install -y --no-install-recommends cri-o-1.17=1.17.2~1 + apt-get install -y --no-install-recommends cri-o-${CRIO_VERSION} + # install podman -RUN apt-get install -y --no-install-recommends podman=1.8.2~144 +ENV PODMAN_VERSION=1.9.0~2 +RUN apt-get install -y --no-install-recommends podman=${PODMAN_VERSION} + # disable non-docker runtimes by default RUN systemctl disable containerd && systemctl disable crio && rm /etc/crictl.yaml # enable docker which is default From d39b822a3c8d685ca59b08f4b8f0c1479eec9249 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Wed, 22 Apr 2020 14:44:24 -0700 Subject: [PATCH 2/9] upgrade to v0.0.10 --- pkg/drivers/kic/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/drivers/kic/types.go b/pkg/drivers/kic/types.go index 2b01019b2ed8..f441f0f8b668 100644 --- a/pkg/drivers/kic/types.go +++ b/pkg/drivers/kic/types.go @@ -30,9 +30,9 @@ const ( DefaultPodCIDR = "10.244.0.0/16" // Version is the current version of kic - Version = "v0.0.9" + Version = "v0.0.10" // SHA of the kic base image - baseImageSHA = "82a826cc03c3e59ead5969b8020ca138de98f366c1907293df91fc57205dbb53" + baseImageSHA = "0c3666c7dacb3c7170a86b237d0d15d37afb5a6d2f0c45046546b5c09f40378c" // OverlayImage is the cni plugin used for overlay image, created by kind. // CNI plugin image used for kic drivers created by kind. OverlayImage = "kindest/kindnetd:0.5.4" From b90a28cc52c754dbf8e1e8b9425347a492c21cd0 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Thu, 23 Apr 2020 11:05:47 -0700 Subject: [PATCH 3/9] Download crio from GCS bucket --- hack/images/kicbase.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/images/kicbase.Dockerfile b/hack/images/kicbase.Dockerfile index be6ebb2bce04..4676f874373f 100644 --- a/hack/images/kicbase.Dockerfile +++ b/hack/images/kicbase.Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # libglib2.0-0 is required for conmon, which is required for podman libglib2.0-0=2.62.1-1 \ && rm /etc/crictl.yaml + # install cri-o based on https://github.com/cri-o/cri-o/commit/96b0c34b31a9fc181e46d7d8e34fb8ee6c4dc4e1#diff-04c6e90faac2675aa89e2176d2eec7d8R128 ENV CRIO_VERSION="1.17=1.17.3~2" RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_19.10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ From e4731f1793bc869ef7cff9767b5e2d8d7116b1e0 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Thu, 23 Apr 2020 12:08:40 -0700 Subject: [PATCH 4/9] Add --cache-from to kic base image so that we reuse layers from previous images --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 061d62039d8a..bc525005a81f 100755 --- a/Makefile +++ b/Makefile @@ -529,7 +529,7 @@ storage-provisioner-image: out/storage-provisioner-$(GOARCH) ## Build storage-pr .PHONY: kic-base-image kic-base-image: ## builds the base image used for kic. docker rmi -f $(REGISTRY)/kicbase:$(KIC_VERSION)-snapshot || true - docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:$(KIC_VERSION)-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) --target base . + docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:$(KIC_VERSION)-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) --cache-from $(REGISTRY)/kicbase:$(KIC_VERSION) --target base . .PHONY: upload-preloaded-images-tar upload-preloaded-images-tar: out/minikube # Upload the preloaded images for oldest supported, newest supported, and default kubernetes versions to GCS. From 82886dff440c38e380b7e5354b842b41340b97cd Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Thu, 23 Apr 2020 12:09:58 -0700 Subject: [PATCH 5/9] change env to arg --- hack/images/kicbase.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/images/kicbase.Dockerfile b/hack/images/kicbase.Dockerfile index 4676f874373f..86224d676e9b 100644 --- a/hack/images/kicbase.Dockerfile +++ b/hack/images/kicbase.Dockerfile @@ -17,14 +17,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm /etc/crictl.yaml # install cri-o based on https://github.com/cri-o/cri-o/commit/96b0c34b31a9fc181e46d7d8e34fb8ee6c4dc4e1#diff-04c6e90faac2675aa89e2176d2eec7d8R128 -ENV CRIO_VERSION="1.17=1.17.3~2" +ARG CRIO_VERSION="1.17=1.17.3~2" RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_19.10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_19.10/Release.key && \ apt-key add - < Release.key && apt-get update && \ apt-get install -y --no-install-recommends cri-o-${CRIO_VERSION} # install podman -ENV PODMAN_VERSION=1.9.0~2 +ARG PODMAN_VERSION=1.9.0~2 RUN apt-get install -y --no-install-recommends podman=${PODMAN_VERSION} # disable non-docker runtimes by default From da8253d879706770f6ee0109ec8d58a3f8603c43 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Thu, 23 Apr 2020 12:46:37 -0700 Subject: [PATCH 6/9] update docs --- site/content/en/docs/commands/start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index ce3df92ee9da..eb5bb649d298 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -27,7 +27,7 @@ minikube start [flags] --apiserver-names stringArray A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine --apiserver-port int The apiserver listening port (default 8443) --auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true) - --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.9@sha256:82a826cc03c3e59ead5969b8020ca138de98f366c1907293df91fc57205dbb53") + --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:0c3666c7dacb3c7170a86b237d0d15d37afb5a6d2f0c45046546b5c09f40378c") --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true) --container-runtime string The container runtime to be used (docker, crio, containerd). (default "docker") --cpus int Number of CPUs allocated to Kubernetes. (default 2) From 90b029e359d874802ce700745629f9b7a890b84d Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 27 Apr 2020 10:45:34 -0700 Subject: [PATCH 7/9] Add varlink for podman-env ' --- hack/images/kicbase.Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hack/images/kicbase.Dockerfile b/hack/images/kicbase.Dockerfile index 86224d676e9b..35be4fde1d47 100644 --- a/hack/images/kicbase.Dockerfile +++ b/hack/images/kicbase.Dockerfile @@ -17,15 +17,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm /etc/crictl.yaml # install cri-o based on https://github.com/cri-o/cri-o/commit/96b0c34b31a9fc181e46d7d8e34fb8ee6c4dc4e1#diff-04c6e90faac2675aa89e2176d2eec7d8R128 -ARG CRIO_VERSION="1.17=1.17.3~2" RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_19.10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_19.10/Release.key && \ apt-key add - < Release.key && apt-get update && \ - apt-get install -y --no-install-recommends cri-o-${CRIO_VERSION} + apt-get install -y --no-install-recommends cri-o-1.17 # install podman -ARG PODMAN_VERSION=1.9.0~2 -RUN apt-get install -y --no-install-recommends podman=${PODMAN_VERSION} +RUN apt-get install -y --no-install-recommends podman + +# install varlink +RUN apt-get install -y --no-install-recommends varlink + # disable non-docker runtimes by default RUN systemctl disable containerd && systemctl disable crio && rm /etc/crictl.yaml From 2459caea75433ef0abfa13d5a8e2eafef21463d3 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 27 Apr 2020 10:47:10 -0700 Subject: [PATCH 8/9] update SHA --- pkg/drivers/kic/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/drivers/kic/types.go b/pkg/drivers/kic/types.go index f441f0f8b668..020ae1ed8e8b 100644 --- a/pkg/drivers/kic/types.go +++ b/pkg/drivers/kic/types.go @@ -32,7 +32,7 @@ const ( // Version is the current version of kic Version = "v0.0.10" // SHA of the kic base image - baseImageSHA = "0c3666c7dacb3c7170a86b237d0d15d37afb5a6d2f0c45046546b5c09f40378c" + baseImageSHA = "f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438" // OverlayImage is the cni plugin used for overlay image, created by kind. // CNI plugin image used for kic drivers created by kind. OverlayImage = "kindest/kindnetd:0.5.4" From 67efd1120e1a36f840b545d987f299d38f3a7535 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 27 Apr 2020 10:47:43 -0700 Subject: [PATCH 9/9] update docs --- site/content/en/docs/commands/start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index b5ca983541a4..2a381ef790da 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -27,7 +27,7 @@ minikube start [flags] --apiserver-names stringArray A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine --apiserver-port int The apiserver listening port (default 8443) --auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true) - --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:0c3666c7dacb3c7170a86b237d0d15d37afb5a6d2f0c45046546b5c09f40378c") + --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438") --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true) --container-runtime string The container runtime to be used (docker, crio, containerd). (default "docker") --cpus int Number of CPUs allocated to Kubernetes. (default 2)