X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Finstall_ngsa.sh;h=0a4f03ab6b49099b8f1f499664904c486c9bc3e8;hb=09bc8096f82146667d8c4078771691adc6df81fb;hp=65c9f89f289e1549166cb969e46d24aebc2d8e55;hpb=34824fcfc823c7446ed5708a0a8e02950c369209;p=osm%2Fdevops.git diff --git a/installers/install_ngsa.sh b/installers/install_ngsa.sh index 65c9f89f..0a4f03ab 100755 --- a/installers/install_ngsa.sh +++ b/installers/install_ngsa.sh @@ -17,8 +17,6 @@ set +eux # Helm chart 1.6.0 correspondes to Airflow 2.3.0 AIRFLOW_HELM_VERSION=1.9.0 -PROMPUSHGW_HELM_VERSION=1.18.2 -ALERTMANAGER_HELM_VERSION=0.22.0 # Install Airflow helm chart function install_airflow() { @@ -31,6 +29,8 @@ function install_airflow() { sudo sed -i "s#defaultAirflowTag:.*#defaultAirflowTag: \"${OSM_DOCKER_TAG}\"#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml echo "Updating Helm values file helm/values/airflow-values.yaml to use defaultAirflowRepository: ${DOCKER_REGISTRY_URL}${DOCKER_USER}/airflow" sudo sed -i "s#defaultAirflowRepository:.*#defaultAirflowRepository: ${DOCKER_REGISTRY_URL}${DOCKER_USER}/airflow#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml + echo "Updating Helm values file helm/values/airflow-values.yaml to set ingress.web.hosts with host \"airflow.${DEFAULT_IP}.nip.io\"" + sudo sed -i "s#name: \"localhost\"#name: \"airflow.${DEFAULT_IP}.nip.io\"#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml helm repo add apache-airflow https://airflow.apache.org helm repo update @@ -38,27 +38,6 @@ function install_airflow() { [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } -# Install Prometheus Pushgateway helm chart -function install_prometheus_pushgateway() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function - helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo update - helm upgrade pushgateway prometheus-community/prometheus-pushgateway -n osm --create-namespace --install --version ${PROMPUSHGW_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing pushgateway helm chart" - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - -# Install Prometheus AlertManager helm chart -function install_prometheus_alertmanager() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function - # copy alertmanager-values.yaml to the destination folder - sudo mkdir -p ${OSM_HELM_WORK_DIR} - sudo cp ${OSM_DEVOPS}/installers/helm/values/alertmanager-values.yaml ${OSM_HELM_WORK_DIR} - helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo update - helm upgrade alertmanager prometheus-community/alertmanager -n osm --create-namespace --install -f ${OSM_HELM_WORK_DIR}/alertmanager-values.yaml --version ${ALERTMANAGER_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing alertmanager helm chart" - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - # main DOCKER_REGISTRY_URL= @@ -66,9 +45,13 @@ DOCKER_USER="opensourcemano" OSM_DEVOPS="/usr/share/osm-devops" OSM_DOCKER_TAG="testing-daily" OSM_HELM_WORK_DIR="/etc/osm/helm" +DEFAULT_IP="127.0.0.1" -while getopts ":D:d:t:r:U:-: " o; do +while getopts ":D:d:i:t:r:U:-: " o; do case "${o}" in + i) + DEFAULT_IP="${OPTARG}" + ;; D) OSM_DEVOPS="${OPTARG}" ;; @@ -106,6 +89,7 @@ done source $OSM_DEVOPS/common/logging source $OSM_DEVOPS/common/track +echo "DEFAULT_IP=$DEFAULT_IP" echo "DEBUG_INSTALL=$DEBUG_INSTALL" echo "OSM_DEVOPS=$OSM_DEVOPS" echo "OSM_DOCKER_TAG=$OSM_DOCKER_TAG" @@ -113,8 +97,3 @@ echo "OSM_HELM_WORK_DIR=$OSM_HELM_WORK_DIR" install_airflow track deploy_osm airflow_ok -install_prometheus_pushgateway -track deploy_osm pushgateway_ok -install_prometheus_alertmanager -track deploy_osm alertmanager_ok -