deploy, scripts: change the save-images.sh and load-images.sh so by default they don't create/load a tar file

This option will make it faster for user who don't need the exported tar file

Longhorn #1419

Signed-off-by: Phan Le <phan.le@rancher.com>
This commit is contained in:
Phan Le 2020-07-15 17:21:33 -07:00 committed by Sheng Yang
parent d2460a9819
commit 13b2d0c84e
3 changed files with 8 additions and 16 deletions

View File

@ -1,10 +0,0 @@
longhornio/longhorn-engine:master
longhornio/longhorn-instance-manager:v1_20200514
longhornio/longhorn-manager:master
longhornio/longhorn-manager-test:master
longhornio/longhorn-test:upgrade-test.3-3.3-3.1-1
longhornio/longhorn-ui:master
longhornio/csi-attacher:v2.0.0
longhornio/csi-node-driver-registrar:v1.2.0
longhornio/csi-provisioner:v1.4.0
longhornio/csi-resizer:v0.3.0

View File

@ -1,6 +1,5 @@
#!/bin/bash
list="longhorn-images.txt"
images="longhorn-images.tar.gz"
POSITIONAL=()
while [[ $# -gt 0 ]]; do
@ -31,7 +30,7 @@ done
usage () {
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz] --registry my.registry.com:5000"
echo " [-l|--images-list path] text file with list of images. 1 per line."
echo " [-l|--images path] tar.gz generated by docker save."
echo " [-i|--images path] tar.gz generated by docker save. If empty, the script will try to find images in local docker images"
echo " [-r|--registry registry:port] target private registry:port. By default, registry is Docker Hub"
echo " [-h|--help] Usage message"
}
@ -47,7 +46,9 @@ fi
set -e -x
docker load --input ${images}
if [[ $images ]]; then
docker load --input ${images}
fi
for i in $(cat ${list}); do
case $i in

View File

@ -1,6 +1,5 @@
#!/bin/bash
list="longhorn-images.txt"
images="longhorn-images.tar.gz"
POSITIONAL=()
while [[ $# -gt 0 ]]; do
@ -26,7 +25,7 @@ done
usage () {
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz]"
echo " [-l|--images-list path] text file with list of images. 1 per line."
echo " [-l|--images path] tar.gz generated by docker save."
echo " [-i|--images path] tar.gz generated by docker save. If this flag is empty, the script does not export images to a tar.gz file"
echo " [-h|--help] Usage message"
}
@ -41,4 +40,6 @@ for i in $(cat ${list}); do
docker pull ${i}
done
docker save $(cat ${list} | tr '\n' ' ') | gzip -c > ${images}
if [[ $images ]]; then
docker save $(cat ${list} | tr '\n' ' ') | gzip -c > ${images}
fi