From 40172dc508a7ad060b98c398c5c9cba24a3ce751 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Fri, 22 Mar 2019 00:11:42 +0000 Subject: [PATCH] Package airgap image files Generate airgap artifacts from an images list for each architecture. --- scripts/airgap/generate-list.sh | 8 ++++++++ scripts/airgap/image-list.txt | 5 +++++ scripts/package | 1 + scripts/package-airgap | 10 ++++++++++ 4 files changed, 24 insertions(+) create mode 100755 scripts/airgap/generate-list.sh create mode 100644 scripts/airgap/image-list.txt create mode 100755 scripts/package-airgap diff --git a/scripts/airgap/generate-list.sh b/scripts/airgap/generate-list.sh new file mode 100755 index 0000000000..813513aca3 --- /dev/null +++ b/scripts/airgap/generate-list.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e -x + +cd $(dirname $0) + +k3s crictl images -o json \ + | jq -r '.images[].repoTags[0] | select(. != null)' \ + | tee image-list.txt diff --git a/scripts/airgap/image-list.txt b/scripts/airgap/image-list.txt new file mode 100644 index 0000000000..b2d7fcbf5a --- /dev/null +++ b/scripts/airgap/image-list.txt @@ -0,0 +1,5 @@ +docker.io/coredns/coredns:1.3.0 +docker.io/library/traefik:1.7.9 +docker.io/rancher/klipper-helm:v0.1.5 +docker.io/rancher/klipper-lb:v0.1.1 +k8s.gcr.io/pause:3.1 diff --git a/scripts/package b/scripts/package index 2e953e40f6..e7b6dd2d02 100755 --- a/scripts/package +++ b/scripts/package @@ -9,3 +9,4 @@ fi ./package-cli ./package-image +./package-airgap diff --git a/scripts/package-airgap b/scripts/package-airgap new file mode 100755 index 0000000000..adc242fa2e --- /dev/null +++ b/scripts/package-airgap @@ -0,0 +1,10 @@ +#!/bin/bash +set -e -x + +source $(dirname $0)/version.sh + +cd $(dirname $0)/.. + +images=$(cat scripts/airgap/image-list.txt) +xargs -n1 docker pull <<< "${images}" +docker save ${images} -o dist/artifacts/k3s-airgap-images-${ARCH}.tar