# Generate helm values to be passed with --set
OSM_HELM_OPTS=""
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set nbi.useOsmSecret=false"
- OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.repositoryBase=${DOCKER_REGISTRY_URL}${DOCKER_USER}"
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set mysql.dbHostPath=${OSM_NAMESPACE_VOL}" # not needed as mysql is now bitnami helm chart
+
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.repositoryBase=${DOCKER_REGISTRY_URL}${DOCKER_USER}"
+ [ ! "$OSM_DOCKER_TAG" == "testing-daily" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set-string global.image.tag=${OSM_DOCKER_TAG}"
+ [ ! "$OSM_DOCKER_TAG" == "testing-daily" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set prometheus.server.sidecarContainers.prometheus-config-sidecar.image=${DOCKER_REGISTRY_URL}${DOCKER_USER}/prometheus:${OSM_DOCKER_TAG}"
+
if [ -n "${INSTALL_JUJU}" ]; then
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.enabled=true"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.host=${OSM_VCA_HOST}"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.cacert=${OSM_VCA_CACERT}"
fi
[ -n "$OSM_VCA_APIPROXY" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set lcm.config.OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}"
- [ ! "$OSM_DOCKER_TAG" == "testing-daily" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set-string global.image.tag=${OSM_DOCKER_TAG}"
[ -n "${INSTALL_NGSA}" ] || OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.oldServiceAssurance=true"
if [ -n "${OSM_BEHIND_PROXY}" ]; then
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.behindHttpProxy=true"
if [ -n "${INSTALL_JUJU}" ]; then
OSM_HELM_OPTS="-f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}"
fi
- echo "helm install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}"
- helm install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}
+ echo "helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}"
+ helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}
# Override existing values.yaml with the final values.yaml used to install OSM
helm -n $OSM_NAMESPACE get values $OSM_NAMESPACE | sudo tee -a ${OSM_HELM_WORK_DIR}/osm-values.yaml
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
{{ define "osm.keystone.image" -}}
{{ printf "%s:%s" (.Values.keystone.image.repository | default (printf "%s/keystone" (.Values.global.image.repositoryBase))) (.Values.keystone.image.tag | default .Values.global.image.tag) }}
{{- end }}
-{{ define "osm.prometheus.image" -}}
-{{ printf "%s:%s" (.Values.prometheus.sidecarImage.repository | default (printf "%s/prometheus" (.Values.global.image.repositoryBase))) (.Values.prometheus.sidecarImage.tag | default .Values.global.image.tag) }}
-{{- end }}
folder: "/tmp/dashboards/"
resource: both
searchNamespace: osm
- extraMounts:
+ extraMounts:
- name: sc-dashboard-volume-k8s
mountPath: "/tmp/dashboards/Kubernetes Cluster"
- name: sc-dashboard-volume-osm
# readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
# runAsNonRoot: true
- image: opensourcemano/prometheus
+ image: opensourcemano/prometheus:testing-daily
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c"]
args: ["sleep 50; python -u ./app.py"]
+++ /dev/null
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
----
-extraArgs:
- log.level: debug
-service:
- type: NodePort
- nodePort: 9093
- port: 9093
-config:
- receivers:
- - name: default-receiver
- - name: vdu-webhook
- webhook_configs:
- - url: http://webhook-translator:9998/vdu_down
- - name: scaleout-webhook
- webhook_configs:
- - url: http://webhook-translator:9998/scaleout_vdu
- - name: scalein-webhook
- webhook_configs:
- - url: http://webhook-translator:9998/scalein_vdu
- - name: alarm-webhook
- webhook_configs:
- - url: http://webhook-translator:9998/vdu_alarm
- route:
- group_wait: 10s
- group_interval: 2m
- receiver: default-receiver
- routes:
- - receiver: vdu-webhook
- repeat_interval: 15m
- matchers:
- - alertname = "vdu_down"
- - receiver: 'scaleout-webhook'
- repeat_interval: 5m
- matchers:
- - alertname =~ "^scaleout_.*"
- - receiver: 'scalein-webhook'
- repeat_interval: 5m
- matchers:
- - alertname =~ "^scalein_.*"
- - receiver: 'alarm-webhook'
- repeat_interval: 5m
- matchers:
- - alertname =~ "^vdu_alarm_.*"
# 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() {
[ -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=
install_airflow
track deploy_osm airflow_ok
-#install_prometheus_pushgateway
-#track deploy_osm pushgateway_ok
-#install_prometheus_alertmanager
-#track deploy_osm alertmanager_ok
-