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:
parent
d2460a9819
commit
13b2d0c84e
@ -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
|
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
list="longhorn-images.txt"
|
list="longhorn-images.txt"
|
||||||
images="longhorn-images.tar.gz"
|
|
||||||
|
|
||||||
POSITIONAL=()
|
POSITIONAL=()
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@ -31,7 +30,7 @@ done
|
|||||||
usage () {
|
usage () {
|
||||||
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz] --registry my.registry.com:5000"
|
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-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 " [-r|--registry registry:port] target private registry:port. By default, registry is Docker Hub"
|
||||||
echo " [-h|--help] Usage message"
|
echo " [-h|--help] Usage message"
|
||||||
}
|
}
|
||||||
@ -47,7 +46,9 @@ fi
|
|||||||
|
|
||||||
set -e -x
|
set -e -x
|
||||||
|
|
||||||
|
if [[ $images ]]; then
|
||||||
docker load --input ${images}
|
docker load --input ${images}
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $(cat ${list}); do
|
for i in $(cat ${list}); do
|
||||||
case $i in
|
case $i in
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
list="longhorn-images.txt"
|
list="longhorn-images.txt"
|
||||||
images="longhorn-images.tar.gz"
|
|
||||||
|
|
||||||
POSITIONAL=()
|
POSITIONAL=()
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@ -26,7 +25,7 @@ done
|
|||||||
usage () {
|
usage () {
|
||||||
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz]"
|
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-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"
|
echo " [-h|--help] Usage message"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,4 +40,6 @@ for i in $(cat ${list}); do
|
|||||||
docker pull ${i}
|
docker pull ${i}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $images ]]; then
|
||||||
docker save $(cat ${list} | tr '\n' ' ') | gzip -c > ${images}
|
docker save $(cat ${list} | tr '\n' ' ') | gzip -c > ${images}
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user