-
-# Community_installer
-[ -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"
-
-# if develop, we force master
-[ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
-
-check_packages "git wget curl tar"
-
-sudo snap install jq
-if [ -z "$OSM_DEVOPS" ]; then
- if [ -n "$TEST_INSTALLER" ]; then
- echo -e "\nUsing local devops repo for OSM installation"
- OSM_DEVOPS="$(dirname $(realpath $(dirname $0)))"
- else
- echo -e "\nCreating temporary dir for OSM installation"
- OSM_DEVOPS="$(mktemp -d -q --tmpdir "installosm.XXXXXX")"
- trap 'rm -rf "$OSM_DEVOPS"' EXIT
-
- git clone https://osm.etsi.org/gerrit/osm/devops.git $OSM_DEVOPS
-
- if [ -z "$COMMIT_ID" ]; then
- echo -e "\nGuessing the current stable release"
- LATEST_STABLE_DEVOPS=`git -C $OSM_DEVOPS tag -l v[0-9].* | sort -V | tail -n1`
- [ -z "$LATEST_STABLE_DEVOPS" ] && echo "Could not find the current latest stable release" && exit 0
-
- echo "Latest tag in devops repo: $LATEST_STABLE_DEVOPS"
- COMMIT_ID="tags/$LATEST_STABLE_DEVOPS"
- else
- echo -e "\nDEVOPS Using commit $COMMIT_ID"
- fi
- git -C $OSM_DEVOPS checkout $COMMIT_ID
- fi
-fi
-
-[ "${OSM_STACK_NAME}" == "osm" ] || OSM_DOCKER_WORK_DIR="$OSM_WORK_DIR/stack/$OSM_STACK_NAME"
-OSM_K8S_WORK_DIR="$OSM_DOCKER_WORK_DIR/osm_pods" && OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}"
-[ -n "$INSTALL_ONLY" ] && [ -n "$INSTALL_K8S_MONITOR" ] && install_k8s_monitoring
-[ -n "$INSTALL_ONLY" ] && echo -e "\nDONE" && exit 0
-
-#Installation starts here
-wget -q -O- https://osm-download.etsi.org/ftp/osm-11.0-eleven/README.txt &> /dev/null
-export OSM_TRACK_INSTALLATION_ID="$(date +%s)-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)"
-install_osm
-echo -e "\nDONE"
-exit 0