X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=39d2850f6927e31e568a68f2ba1d82cdd26eea1a;hb=1850e4abd7b58d749443ddc5ca5c2cdbb2d067ca;hp=a76aa5713e7add51f79766aefb6ba14c091f5750;hpb=9425dd2d4a3a0ac8c0bb6dd8d71b0c4b71045f62;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index a76aa571..39d2850f 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -183,6 +183,10 @@ function remove_helm() { fi } +function remove_crontab_job() { + crontab -l | grep -v '${OSM_DEVOPS}/installers/update-juju-lxc-images' | crontab - +} + #Uninstall osmclient function uninstall_osmclient() { sudo apt-get remove --purge -y python-osmclient @@ -239,6 +243,7 @@ EONG $WORKDIR_SUDO rm -rf $OSM_DOCKER_WORK_DIR [ -z "$CONTROLLER_NAME" ] && sg lxd -c "juju destroy-controller --destroy-all-models --yes $OSM_STACK_NAME" fi + remove_crontab_job [ -z "$INSTALL_NOHOSTCLIENT" ] && uninstall_osmclient echo "Some docker images will be kept in case they are used by other docker stacks" echo "To remove them, just run 'docker image prune' in a terminal" @@ -270,6 +275,11 @@ function FATAL(){ exit 1 } +function update_juju_images(){ + crontab -l | grep update-juju-lxc-images || (crontab -l 2>/dev/null; echo "0 4 * * 6 $USER ${OSM_DEVOPS}/installers/update-juju-lxc-images --xenial --bionic") | crontab - + ${OSM_DEVOPS}/installers/update-juju-lxc-images --xenial --bionic +} + function install_lxd() { # Apply sysctl production values for optimal performance sudo cp ${OSM_DEVOPS}/installers/60-lxd-production.conf /etc/sysctl.d/60-lxd-production.conf @@ -408,6 +418,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 echo "Finished installation of juju" return 0 } @@ -416,7 +427,7 @@ function juju_createcontroller() { if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then # Not found created, create the controller sudo usermod -a -G lxd ${USER} - sg lxd -c "juju bootstrap --bootstrap-series=xenial $OSM_VCA_CLOUDNAME $OSM_STACK_NAME" + sg lxd -c "juju bootstrap --bootstrap-series=xenial --agent-version=2.8.1 $OSM_VCA_CLOUDNAME $OSM_STACK_NAME" fi [ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed" juju controller-config features=[k8s-operators] @@ -1601,6 +1612,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:-: hy" o; do [ "${OPTARG}" == "lxd" ] && continue [ "${OPTARG}" == "lxd-cred" ] && continue [ "${OPTARG}" == "microstack" ] && continue + [ "${OPTARG}" == "vca" ] && continue [ "${OPTARG}" == "ha" ] && continue [ "${OPTARG}" == "tag" ] && continue [ "${OPTARG}" == "pla" ] && INSTALL_PLA="y" && continue