X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=installers%2Finstall_ngsa.sh;h=b90c3dc07f63e7e7f7855346db4d0564ba64fdf7;hb=bae51f695443abcd0e410a92161af05b497ddc7a;hp=5d7ad683fcb187fa325a276b137fa6830a613538;hpb=9ab64a953b0a46d6e09c16387c851a56c8c809cd;p=osm%2Fdevops.git diff --git a/installers/install_ngsa.sh b/installers/install_ngsa.sh index 5d7ad683..b90c3dc0 100755 --- a/installers/install_ngsa.sh +++ b/installers/install_ngsa.sh @@ -18,6 +18,7 @@ set +eux # Helm chart 1.6.0 correspondes to Airflow 2.3.0 AIRFLOW_HELM_VERSION=1.6.0 PROMPUSHGW_HELM_VERSION=1.18.2 +ALERTMANAGER_HELM_VERSION=0.22.0 # Install Airflow helm chart function install_airflow() { @@ -58,6 +59,22 @@ function install_prometheus_pushgateway() { [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } +# Install Prometheus AlertManager helm chart +function install_prometheus_alertmanager() { + [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function + 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} + 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} + fi + [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function +} + # main OSM_DEVOPS="/usr/share/osm-devops" @@ -106,4 +123,6 @@ install_airflow track deploy_osm airflow_ok install_prometheus_pushgateway track deploy_osm pushgateway_ok +install_prometheus_alertmanager +track deploy_osm alertmanager_ok