X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=22cba8d36718632e559158081448a91611ab117f;hb=e70a069079f3be7deb08c122250ddd359607b5dd;hp=c7e91197dce0dc56d9637e1f539aa2f1507998b4;hpb=2882e3e1b7f1e710cc1274216290eb3083969966;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index c7e91197..22cba8d3 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -492,21 +492,14 @@ clouds: ssl-hostname-verification: false EOF openssl req -nodes -new -x509 -keyout /tmp/.osm/client.key -out /tmp/.osm/client.crt -days 365 -subj "/C=FR/ST=Nice/L=Nice/O=ETSI/OU=OSM/CN=osm.etsi.org" - local server_cert=`cat /var/snap/lxd/common/lxd/server.crt | sed 's/^/ /'` - local client_cert=`cat /tmp/.osm/client.crt | sed 's/^/ /'` - local client_key=`cat /tmp/.osm/client.key | sed 's/^/ /'` - cat << EOF > $LXD_CREDENTIALS credentials: $OSM_VCA_CLOUDNAME: lxd-cloud: auth-type: certificate - server-cert: | -$server_cert - client-cert: | -$client_cert - client-key: | -$client_key + server-cert: /var/snap/lxd/common/lxd/server.crt + client-cert: /tmp/.osm/client.crt + client-key: /tmp/.osm/client.key EOF lxc config trust add local: /tmp/.osm/client.crt juju add-cloud -c $OSM_STACK_NAME $OSM_VCA_CLOUDNAME $LXD_CLOUD --force @@ -879,6 +872,7 @@ data: #installs metallb from helm function install_helm_metallb() { + METALLB_VERSION="0.11.0" METALLB_IP_RANGE=$DEFAULT_IP/32 echo "configInline: address-pools: @@ -888,7 +882,7 @@ function install_helm_metallb() { - $METALLB_IP_RANGE" | sudo tee -a $OSM_DOCKER_WORK_DIR/metallb-config.yaml helm repo add metallb https://metallb.github.io/metallb helm repo update - helm install --create-namespace --namespace metallb-system metallb metallb/metallb -f $OSM_DOCKER_WORK_DIR/metallb-config.yaml + helm install --create-namespace --namespace metallb-system metallb metallb/metallb --version ${METALLB_VERSION} -f $OSM_DOCKER_WORK_DIR/metallb-config.yaml } #checks openebs and metallb readiness @@ -1635,7 +1629,7 @@ function parse_docker_registry_url() { LXD_VERSION=4.0 JUJU_VERSION=2.9 -JUJU_AGENT_VERSION=2.9.25 +JUJU_AGENT_VERSION=2.9.29 UNINSTALL="" DEVELOP="" UPDATE="" @@ -1889,19 +1883,28 @@ done [ -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" -if [ -n "$SHOWOPTS" ]; then - dump_vars +# Uninstall if "--uninstall" +if [ -n "$UNINSTALL" ]; then + if [ -n "$CHARMED" ]; then + ${OSM_DEVOPS}/installers/charmed_uninstall.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D $OSM_DEVOPS -t $DOCKER_TAG "$@" || \ + FATAL_TRACK charmed_uninstall "charmed_uninstall.sh failed" + else + ${OSM_DEVOPS}/installers/uninstall_osm.sh "$@" || \ + FATAL_TRACK community_uninstall "uninstall_osm.sh failed" + fi + echo -e "\nDONE" exit 0 fi if [ -n "$CHARMED" ]; then - if [ -n "$UNINSTALL" ]; then - ${OSM_DEVOPS}/installers/charmed_uninstall.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t $DOCKER_TAG "$@" - else - ${OSM_DEVOPS}/installers/charmed_install.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t $DOCKER_TAG "$@" - fi - - exit 0 + export OSM_TRACK_INSTALLATION_ID="$(date +%s)-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)" + track start release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none installation_type $OSM_INSTALLATION_TYPE none none + ${OSM_DEVOPS}/installers/charmed_install.sh --tag $OSM_DOCKER_TAG "$@" || \ + FATAL_TRACK charmed_install "charmed_install.sh failed" + wget -q -O- https://osm-download.etsi.org/ftp/osm-11.0-eleven/README2.txt &> /dev/null + track end installation_type $OSM_INSTALLATION_TYPE + echo -e "\nDONE" + exit 0 fi # if develop, we force master