X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=22cba8d36718632e559158081448a91611ab117f;hb=4e7b2a2cb74cc27e9582226cd6d402a8bf528947;hp=31a79afa6d86079d3fcd9ae99a9941d7b7b1f50d;hpb=2bfdd74dc93577334df848579600c2d3e330192c;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 31a79afa..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 @@ -554,6 +547,7 @@ function generate_docker_images() { if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q GRAFANA ; then sg docker -c "docker pull grafana/grafana:${GRAFANA_TAG}" || FATAL "cannot get grafana docker image" + sg docker -c "docker pull kiwigrid/k8s-sidecar:${KIWIGRID_K8S_SIDECAR_TAG}" || FATAL "cannot get kiwigrid k8s-sidecar docker image" fi if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q NBI || echo $TO_REBUILD | grep -q KEYSTONE-DB ; then @@ -878,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: @@ -887,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 @@ -1634,7 +1629,7 @@ function parse_docker_registry_url() { LXD_VERSION=4.0 JUJU_VERSION=2.9 -JUJU_AGENT_VERSION=2.9.22 +JUJU_AGENT_VERSION=2.9.29 UNINSTALL="" DEVELOP="" UPDATE="" @@ -1692,8 +1687,9 @@ OSM_DOCKER_TAG=latest DOCKER_USER=opensourcemano PULL_IMAGES="y" KAFKA_TAG=2.11-1.0.2 -PROMETHEUS_TAG=v2.4.3 -GRAFANA_TAG=latest +KIWIGRID_K8S_SIDECAR_TAG="1.15.6" +PROMETHEUS_TAG=v2.28.1 +GRAFANA_TAG=8.1.1 PROMETHEUS_NODE_EXPORTER_TAG=0.18.1 PROMETHEUS_CADVISOR_TAG=latest KEYSTONEDB_TAG=10 @@ -1887,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