diff --git a/deploy/longhorn-images-dev.txt b/deploy/longhorn-images-dev.txt deleted file mode 100644 index 59369f5..0000000 --- a/deploy/longhorn-images-dev.txt +++ /dev/null @@ -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 \ No newline at end of file diff --git a/scripts/load-images.sh b/scripts/load-images.sh index ea659f1..3ce1d0f 100755 --- a/scripts/load-images.sh +++ b/scripts/load-images.sh @@ -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 diff --git a/scripts/save-images.sh b/scripts/save-images.sh index 8094916..71ffe87 100755 --- a/scripts/save-images.sh +++ b/scripts/save-images.sh @@ -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