X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=11723febbe27d4e5c1638a3ef0e52f90a95b90df;hb=021b307297a6ab8dfe9ee3af03154989bcd9e0e8;hp=eb92ba2daa997b70a660c930be0a6f01100e9e24;hpb=920d756bbe87609b2f51d44279b269ff6f8ff746;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index eb92ba2d..11723feb 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -54,6 +54,7 @@ function usage(){ echo -e " -d use docker registry URL instead of dockerhub" echo -e " -p set docker proxy URL as part of docker CE configuration" echo -e " -T specify docker tag for the modules specified with option -m" + echo -e " --nocachelxdimages: do not cache local lxd images, do not create cronjob for that cache (will save installation time, might affect instantiation time)" echo -e " --nolxd: do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)" echo -e " --nodocker: do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)" echo -e " --nojuju: do not juju, assumes already installed" @@ -340,11 +341,11 @@ function install_osmclient(){ sudo -H LC_ALL=C python3 -m pip install -U python-magic pyangbind verboselogs sudo apt-get install -y python3-osm-im python3-osmclient if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then - sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt + python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt fi if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then sudo apt-get install -y libcurl4-openssl-dev libssl-dev - sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt + python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt fi #sed 's,OSM_SOL005=[^$]*,OSM_SOL005=True,' -i ${HOME}/.bashrc #echo 'export OSM_HOSTNAME=localhost' >> ${HOME}/.bashrc @@ -451,7 +452,7 @@ function install_juju() { echo "Installing juju" sudo snap install juju --classic --channel=2.8/stable [[ ":$PATH": != *":/snap/bin:"* ]] && PATH="/snap/bin:${PATH}" - update_juju_images + [ -n "$INSTALL_NOCACHELXDIMAGES" ] || update_juju_images echo "Finished installation of juju" return 0 } @@ -851,6 +852,7 @@ function install_kube() { #initializes kubernetes control plane function init_kubeadm() { sudo swapoff -a + sudo sed -i.bak '/.*none.*swap/s/^\(.*\)$/#\1/g' /etc/fstab sudo kubeadm init --config $1 sleep 5 } @@ -1539,6 +1541,7 @@ function dump_vars(){ echo "INSTALL_LIGHTWEIGHT=$INSTALL_LIGHTWEIGHT" echo "INSTALL_ONLY=$INSTALL_ONLY" echo "INSTALL_ELK=$INSTALL_ELK" + echo "INSTALL_NOCACHELXDIMAGES=$INSTALL_NOCACHELXDIMAGES" #echo "INSTALL_PERFMON=$INSTALL_PERFMON" echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK" echo "OPENSTACK_PUBLIC_NET_NAME=$OPENSTACK_PUBLIC_NET_NAME" @@ -1632,6 +1635,7 @@ KUBERNETES="y" NGUI="y" INSTALL_K8S_MONITOR="" INSTALL_NOHOSTCLIENT="" +INSTALL_NOCACHELXDIMAGES="" SESSION_ID=`date +%s` OSM_DEVOPS= OSM_VCA_HOST= @@ -1826,6 +1830,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:f:F:-: hy" o [ "${OPTARG}" == "registry" ] && continue [ "${OPTARG}" == "pla" ] && INSTALL_PLA="y" && continue [ "${OPTARG}" == "volume" ] && OPENSTACK_ATTACH_VOLUME="true" && continue + [ "${OPTARG}" == "nocachelxdimages" ] && INSTALL_NOCACHELXDIMAGES="y" && continue echo -e "Invalid option: '--$OPTARG'\n" >&2 usage && exit 1 ;;