X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Finstall_ngsa.sh;h=dbfbac55475a1ace47aba70b8a412941bdda321c;hb=e6d458836e661204cbe652e24404184a3dc49421;hp=c3208567ebefe071dba70bca5ce83340c5bea647;hpb=37d5a5f1213b462f065ef44229681c801ca7efe9;p=osm%2Fdevops.git diff --git a/installers/install_ngsa.sh b/installers/install_ngsa.sh index c3208567..dbfbac55 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() { @@ -32,51 +30,9 @@ function install_airflow() { 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 - if ! helm -n osm status airflow 2> /dev/null ; then - # if it does not exist, create secrets and install - helm repo add apache-airflow https://airflow.apache.org - helm repo update - helm -n osm install airflow apache-airflow/airflow -f ${OSM_HELM_WORK_DIR}/airflow-values.yaml --version ${AIRFLOW_HELM_VERSION} --timeout 10m || FATAL_TRACK ngsa "Failed installing airflow helm chart" - else - # if it exists, upgrade - helm repo update - helm -n osm upgrade airflow apache-airflow/airflow -f ${OSM_HELM_WORK_DIR}/airflow-values.yaml --version ${AIRFLOW_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing airflow helm chart" - fi - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - -# Install Prometheus Pushgateway helm chart -function install_prometheus_pushgateway() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function - if ! helm -n osm status pushgateway 2> /dev/null ; then - # if it does not exist, install - helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo update - helm -n osm install pushgateway prometheus-community/prometheus-pushgateway --version ${PROMPUSHGW_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing pushgateway helm chart" - else - # if it exists, upgrade - helm repo update - helm -n osm upgrade pushgateway prometheus-community/prometheus-pushgateway --version ${PROMPUSHGW_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing pushgateway helm chart" - fi - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - -# Install Prometheus AlertManager helm chart -function install_prometheus_alertmanager() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG end 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} - if ! helm -n osm status alertmanager 2> /dev/null ; then - # if it does not exist, install - helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo update - helm -n osm install alertmanager prometheus-community/alertmanager -f ${OSM_HELM_WORK_DIR}/alertmanager-values.yaml --version ${ALERTMANAGER_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing alertmanager helm chart" - else - # if it exists, upgrade - helm repo update - helm -n osm upgrade alertmanager prometheus-community/alertmanager -f ${OSM_HELM_WORK_DIR}/alertmanager-values.yaml --version ${ALERTMANAGER_HELM_VERSION} || FATAL_TRACK ngsa "Failed installing alertmanager helm chart" - fi + helm repo add apache-airflow https://airflow.apache.org + helm repo update + helm upgrade airflow apache-airflow/airflow -n osm --create-namespace --install -f ${OSM_HELM_WORK_DIR}/airflow-values.yaml --version ${AIRFLOW_HELM_VERSION} --timeout 10m || FATAL_TRACK ngsa "Failed installing airflow helm chart" [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } @@ -134,8 +90,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 -