X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=56ebcc1e3c701f981569457092b96f42f7511cb6;hb=654f2d488e063575c56e37591f6c793197c4b9c4;hp=875ee2509bff2eeecfa1128ccc40cbd8b1eed7c5;hpb=7f1e1043fc4a21f67f76ae8293caaf9c33cfb928;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 875ee250..56ebcc1e 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -288,7 +288,6 @@ function install_lxd() { # Install LXD snap sudo apt-get remove --purge -y liblxc1 lxc-common lxcfs lxd lxd-client sudo snap install lxd - sudo apt-get install zfsutils-linux -y # Configure LXD sudo usermod -a -G lxd `whoami` @@ -514,8 +513,14 @@ function juju_createproxy() { fi } +function docker_login() { + echo "Docker login" + sg docker -c "docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASSWORD}" +} + function generate_docker_images() { echo "Pulling and generating docker images" + [ -n "${DOCKER_REGISTRY_URL}" ] && docker_login echo "Pulling docker images" @@ -1533,6 +1538,12 @@ function track(){ wget -q -O /dev/null $url } +function parse_docker_registry_url() { + DOCKER_REGISTRY_USER=$(echo "$DOCKER_REGISTRY_URL" | awk '{split($1,a,"@"); split(a[1],b,":"); print b[1]}') + DOCKER_REGISTRY_PASSWORD=$(echo "$DOCKER_REGISTRY_URL" | awk '{split($1,a,"@"); split(a[1],b,":"); print b[2]}') + DOCKER_REGISTRY_URL=$(echo "$DOCKER_REGISTRY_URL" | awk '{split($1,a,"@"); print a[2]}') +} + JUJU_AGENT_VERSION=2.8.6 UNINSTALL="" DEVELOP="" @@ -1776,6 +1787,7 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:-: hy" o; do esac done +[ -n "$DOCKER_REGISTRY_URL" ] && parse_docker_registry_url [ -n "$TO_REBUILD" ] && [ "$TO_REBUILD" != " NONE" ] && echo $TO_REBUILD | grep -q NONE && FATAL "Incompatible option: -m NONE cannot be used with other -m options" [ -n "$TO_REBUILD" ] && [ "$TO_REBUILD" == " PLA" ] && [ -z "$INSTALL_PLA" ] && FATAL "Incompatible option: -m PLA cannot be used without --pla option"