removal of orgs dashboards
Change-Id: I6aa29b0aad2ab664a52636a33688b12ff88200cd
diff --git a/aether-roc-umbrella/Chart.yaml b/aether-roc-umbrella/Chart.yaml
index 5b92d48..c84cc05 100644
--- a/aether-roc-umbrella/Chart.yaml
+++ b/aether-roc-umbrella/Chart.yaml
@@ -7,7 +7,7 @@
description: Aether ROC Umbrella chart to deploy all Aether ROC
kubeVersion: ">=1.18.0"
type: application
-version: 1.4.22
+version: 1.4.23
appVersion: v0.0.0
keywords:
- aether
diff --git a/aether-roc-umbrella/files/dashboards/ue/ue-connectivity.json b/aether-roc-umbrella/files/dashboards/ue/ue-connectivity.json
deleted file mode 100644
index 8bb0a7d..0000000
--- a/aether-roc-umbrella/files/dashboards/ue/ue-connectivity.json
+++ /dev/null
@@ -1,230 +0,0 @@
-{
- "dashboard": {
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "links": [],
- "panels": [
- {
- "datasource": "datasource-$ORG",
- "description": "UE Connectivity",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 0
- },
- "id": 1,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "targets": [
- {
- "exemplar": true,
- "expr": "ue_throughput{id=\"$IMSI\"}",
- "interval": "",
- "legendFormat": "Throughput {{slice}} {{direction}} kb/s",
- "queryType": "randomWalk",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "ue_latency{id=\"$IMSI\"} * 1000",
- "hide": false,
- "interval": "",
- "legendFormat": "Latency {{slice}} {{direction}} µs",
- "refId": "B"
- }
- ],
- "title": "UE $IMSI Throughput and Latency",
- "type": "timeseries"
- },
- {
- "datasource": "datasource-$ORG",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "hidden",
- "barAlignment": 0,
- "drawStyle": "bars",
- "fillOpacity": 57,
- "gradientMode": "hue",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 12,
- "x": 0,
- "y": 8
- },
- "id": 2,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "targets": [
- {
- "exemplar": true,
- "expr": "smf_pdu_session_profile{id=\"$IMSI\",state=\"active\"}*2",
- "interval": "",
- "legendFormat": "Active",
- "queryType": "randomWalk",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "smf_pdu_session_profile{id=\"$IMSI\",state=\"idle\"}*1",
- "hide": false,
- "interval": "",
- "legendFormat": "Idle",
- "refId": "B"
- },
- {
- "exemplar": true,
- "expr": "smf_pdu_session_profile{id=\"$IMSI\",state=\"inactive\"}*-1",
- "hide": false,
- "interval": "",
- "legendFormat": "Inactive",
- "refId": "C"
- }
- ],
- "title": "UE $IMSI Connectivity",
- "type": "timeseries"
- }
- ],
- "refresh": "",
- "schemaVersion": 30,
- "style": "light",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "UE $IMSI Connectivity and Throughput",
- "uid": "ue-$IMSI",
- "version": 1
- },
- "folderUid": "$ORG",
- "message": "Made changes to $ORG"
-}
\ No newline at end of file
diff --git a/aether-roc-umbrella/files/dashboards/vcs/vcs-performance-all.json b/aether-roc-umbrella/files/dashboards/vcs/vcs-performance-all.json
deleted file mode 100644
index 7d0b484..0000000
--- a/aether-roc-umbrella/files/dashboards/vcs/vcs-performance-all.json
+++ /dev/null
@@ -1,140 +0,0 @@
-{
- "dashboard": {
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "links": [],
- "panels": [
- {
- "datasource": "datasource-$ORG",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 12,
- "x": 0,
- "y": 0
- },
- "id": 1,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "targets": [
- {
- "exemplar": true,
- "expr": "sum(vcs_jitter{vcs_id=~\"$ORG.*\"})/count(vcs_jitter{vcs_id=~\"$ORG.*\"})*1000",
- "format": "time_series",
- "interval": "",
- "legendFormat": "Jitter (µs)",
- "queryType": "randomWalk",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "sum(vcs_latency{vcs_id=~\"$ORG.*\"})/count(vcs_latency{vcs_id=~\"$ORG.*\"})*1000",
- "hide": false,
- "interval": "",
- "legendFormat": "Latency (µs)",
- "refId": "B"
- },
- {
- "exemplar": true,
- "expr": "sum(vcs_throughput{vcs_id=~\"$ORG.*\"})/count(vcs_throughput{vcs_id=~\"$ORG.*\"})",
- "hide": false,
- "interval": "",
- "legendFormat": "Throughput (kb/s)",
- "refId": "C"
- }
- ],
- "title": "VCS $ORG All",
- "type": "timeseries"
- }
- ],
- "schemaVersion": 30,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {
- },
- "timezone": "",
- "title": "VCS $ORG All",
- "uid": "vcs-$ORG-all",
- "version": 2
- },
- "folderUid": "$ORG",
- "message": "Made changes to $ORG"
-}
\ No newline at end of file
diff --git a/aether-roc-umbrella/files/dashboards/vcs/vcs-performance.json b/aether-roc-umbrella/files/dashboards/vcs/vcs-performance.json
deleted file mode 100644
index 8a84890..0000000
--- a/aether-roc-umbrella/files/dashboards/vcs/vcs-performance.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "dashboard": {
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "description": "",
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "links": [],
- "panels": [
- {
- "datasource": "datasource-$ORG",
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 0
- },
- "id": 1,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "targets": [
- {
- "exemplar": true,
- "expr": "vcs_jitter{vcs_id=\"$VCS\"}*1000",
- "interval": "",
- "legendFormat": "Jitter (µs)",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "vcs_latency{vcs_id=\"$VCS\"}*1000",
- "hide": false,
- "interval": "",
- "legendFormat": "Latency (µs)",
- "refId": "B"
- },
- {
- "exemplar": true,
- "expr": "vcs_throughput{vcs_id=\"$VCS\"}",
- "hide": false,
- "interval": "",
- "legendFormat": "Throughput (kb/s)",
- "refId": "C"
- }
- ],
- "title": "VCS $VCS Performance",
- "type": "timeseries"
- }
- ],
- "refresh": "",
- "schemaVersion": 30,
- "style": "light",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "VCS $VCS Performance",
- "uid": "vcs-$VCS",
- "version": 1
- },
- "folderUid": "$ORG",
- "message": "Made changes to $ORG"
-}
diff --git a/aether-roc-umbrella/files/dashboards/vcs/vcs-ue-connectivity.json b/aether-roc-umbrella/files/dashboards/vcs/vcs-ue-connectivity.json
deleted file mode 100644
index 7185d4a..0000000
--- a/aether-roc-umbrella/files/dashboards/vcs/vcs-ue-connectivity.json
+++ /dev/null
@@ -1,139 +0,0 @@
-{
- "dashboard": {
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "links": [],
- "panels": [
- {
- "datasource": "datasource-$ORG",
- "description": "Stacked time-series of UE's connected to slice by active, inactive and idle",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "bars",
- "fillOpacity": 56,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "normal"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 12,
- "x": 0,
- "y": 0
- },
- "id": 1,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "targets": [
- {
- "exemplar": true,
- "expr": "sum(smf_pdu_session_profile{slice=\"$VCS\",state=\"active\"})",
- "interval": "",
- "legendFormat": "Active",
- "queryType": "randomWalk",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "sum(smf_pdu_session_profile{slice=\"$VCS\",state=\"inactive\"})",
- "hide": false,
- "interval": "",
- "legendFormat": "Inactive",
- "refId": "B"
- },
- {
- "exemplar": true,
- "expr": "sum(smf_pdu_session_profile{slice=\"$VCS\",state=\"idle\"})",
- "hide": false,
- "interval": "",
- "legendFormat": "Idle",
- "refId": "C"
- }
- ],
- "title": "VCS $VCS UE Connectivity Stacked",
- "type": "timeseries"
- }
- ],
- "schemaVersion": 30,
- "style": "light",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "VCS $VCS UE Connectivity",
- "uid": "$VCS-ue-conn",
- "version": 1
- },
- "folderUid": "$ORG",
- "message": "Made changes to $ORG"
-}
\ No newline at end of file
diff --git a/aether-roc-umbrella/files/scripts/README.md b/aether-roc-umbrella/files/scripts/README.md
deleted file mode 100644
index a576835..0000000
--- a/aether-roc-umbrella/files/scripts/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-SPDX-FileCopyrightText: 2020 Open Networking Foundation <info@opennetworking.org>
-
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
--->
-
-# Creating new Org with VCS
-To create a new Organization and VCS, call the grafana-create-orgs.sh script
-
-> If you want to add at startup, instead add them to the `values.yaml` under `grafana.orgs`.
-
-Call the script like:
-
-`grafana-create-orgs.sh <ADMINUSER> <ADMINPASS> <umbrella-chart-name> <grafana-server> <dashboard-folder> orgs...`
-
-e.g.
-```bash
-PATH=$PATH:. grafana-create-orgs.sh admin Ts8k0hvsZZD058JsqOl8w332YUNs8GAAEpYWCmJu aether-roc-umbrella localhost:8183/grafana \
- ../dashboards/vcs "siemens[siemens-munich-cameras siemens-mannheim-cameras siemens-mannheim-labs]"
-```
-
-1) cd in to this `scripts` directory
-
-1) specify the Org and VCS's like `"org1[vcs1 vcs2]" "org2[vcs1 vcs2]"`
-
-1) To get the Grafana password use
- 1) `kubectl get secret --namespace micro-onos aether-roc-umbrella-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo`
-
-1) Port forward `aether-roc-gui` to get grafana on `localhost:8183/grafana`
- 1) `kubectl -n micro-onos port-forward $(kubectl -n micro-onos get pods -l type=arg -o name) 8183:80`
diff --git a/aether-roc-umbrella/files/scripts/grafana-create-device-group.sh b/aether-roc-umbrella/files/scripts/grafana-create-device-group.sh
deleted file mode 100755
index 7a136e6..0000000
--- a/aether-roc-umbrella/files/scripts/grafana-create-device-group.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-# script to create Grafana VCS dashboards
-# Usage:
-# grafana-create-vcs.sh <ADMINUSER> <ADMINPASS> <grafana-server> <dashboards-folder> <org> <list of vcs>...
-set -e
-#set -x
-set -o pipefail
-set -u
-
-if [ "$#" -lt 6 ]; then
- echo "At least 6 args are needed. Got $#"
- exit 1
-fi
-ADMINUSER=$1
-ADMINPASS=$2
-SERVICE=$3
-FOLDER=$4
-export ORG=$5
-shift
-shift
-shift
-shift
-shift
-for dg in "$@"; do
- DG=${dg%:map\[*\]} # Remove DG details from end
- DG=${DG#map[} # Remove "map[" from the front
- DGASCII=${DG//[^a-zA-Z0-9]/_} # Convert to underscore
- IMSIS=${dg#map[${DG}:map\[} # Remove DG name from start
- IMSIS=${IMSIS%\]\]} # Remove ] from the end
- IMSIS=${IMSIS//;/ }
- echo "Creating Device Group $DG ($DGASCII) in $ORG"
- for imsirange in $IMSIS; do
- echo "Creating Imsi Range $imsirange in $DG"
- RANGENAME=${imsirange%:*} # Remove range from end
- RANGEVALUE=${imsirange#*:}
- declare -i RANGESTART=${RANGEVALUE%-*} # Remove the finish
- declare -i RANGEFINISH=${RANGEVALUE#*-} # Remove the start
- COUNTER=$RANGESTART
- f=$FOLDER/ue-connectivity.json
- while [ $COUNTER -le $RANGEFINISH ]; do
- echo "Creating Dashboard from $f for $COUNTER"
- export IMSI=$COUNTER
- DASHBOARD=$(envsubst < $f)
- /usr/bin/curl -s -o /tmp/curlout -H "Content-Type: application/json" -d "$DASHBOARD" http://$ADMINUSER:$ADMINPASS@$SERVICE/api/dashboards/db
- SUCCESS=`echo $?`
- echo "SUCCESS $SUCCESS"
- cat /tmp/curlout
- let COUNTER=COUNTER+1
- done
- done
- SUCCESS=-1
- ORGID=-1
-
-done
diff --git a/aether-roc-umbrella/files/scripts/grafana-create-orgs.sh b/aether-roc-umbrella/files/scripts/grafana-create-orgs.sh
deleted file mode 100755
index a6e14e1..0000000
--- a/aether-roc-umbrella/files/scripts/grafana-create-orgs.sh
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-# script to create Grafana Orgs
-# Usage:
-# grafana-create-orgs.sh <ADMINUSER> <ADMINPASS> <umbrella-chart-name> <grafana-server> <dashboard-folder> orgs...
-# where org is a quoted string containing org name and then in square brackets a list of vcs
-# e.g. "acme[acme-chicago-robots acme-chicago-cameras]"
-set -e
-#set -x
-set -o pipefail
-set -u
-
-if [ "$#" -lt 6 ]; then
- echo "At least 6 args are needed. Got $#"
- exit 1
-fi
-ADMINUSER=$1
-ADMINPASS=$2
-BASE=$3
-SOURCE=$BASE-prometheus-server
-SERVICE=$4
-DASHBOARDS=$5
-shift
-shift
-shift
-shift
-shift
-for orgWithVcs in "$@"
-do
- ORGASCII=${orgWithVcs%%map\[*\]} # Drop the [*] off the end
- echo "Creating $orgWithVcs as $ORGASCII"
- VCSLIST=${orgWithVcs##${ORGASCII}map\[*\]\ vcs:\[} # Drop everything off the front until "] vcs:["
- VCSLIST=${VCSLIST%\]\]} # Drop the ]] off the end
- DGLIST=${orgWithVcs##${ORGASCII}map\[devicegroup:\[} # Drop everything off the front until "devicegroup:[map["
- DGLIST=${DGLIST%\]\ vcs:*\]\]}
- DGLIST1=${DGLIST//" map["/";map["} # Replace all occurrence of " map["
- IFS=';' read -r -a DGARRAY <<< $DGLIST1
- for idx in ${!DGARRAY[@]}; do
- DGARRAY[$idx]=${DGARRAY[$idx]// /;} # Replace all instances of space with ;
- done
- SUCCESS=-1
- ORGID=-1
- # Commented out for the moment - keeping everything in the Main Org. - see aether-roc-gui/docs/grafana.md
- # echo "Calling /usr/bin/curl -H "Content-Type: application/json" -d '{"name":"$ORGASCII"}' http://$ADMINUSER:####@$SERVICE/api/orgs"
- # while [ $SUCCESS -ne 0 ];
- # do
- # DATA={\"name\":\"$ORGASCII\"}
- # echo "Creating Org $ORGASCII"
- # /usr/bin/curl -o /tmp/curlout -H "Content-Type: application/json" -d "$DATA" http://$ADMINUSER:$ADMINPASS@$SERVICE/api/orgs
- # SUCCESS=`echo $?`
- # echo "SUCCESS $SUCCESS"
- # if [ $SUCCESS -ne 0 ]
- # then
- # sleep $SLEEP
- # echo "Waiting $SLEEP seconds for Grafana to start"
- # else
- # ORGID=$(grep -o "[0-9]*" /tmp/curlout)
- # echo "Successful! Result $ORGID"
- # fi
- # done
-
- # echo "Calling /api/user/using/$ORGID"
- # /usr/bin/curl -s -X POST http://$ADMINUSER:$ADMINPASS@$SERVICE/api/user/using/$ORGID
- # SUCCESS=`echo $?`
- # echo "SUCCESS $SUCCESS"
-
- echo "Creating folder in $ORGASCII"
- FOLDER={\"uid\":\"$ORGASCII\",\"title\":\"$ORGASCII\"}
- /usr/bin/curl -o /tmp/curlout -H "Content-Type: application/json" -d "$FOLDER" http://$ADMINUSER:$ADMINPASS@$SERVICE/api/folders
- SUCCESS="$?"
- echo "SUCCESS $SUCCESS"
- cat /tmp/curlout
-
- echo "Creating datasource in $ORGASCII"
- DATASOURCE={\"name\":\"datasource-$ORGASCII\",\"type\":\"prometheus\",\"url\":\"http://$SOURCE\",\"access\":\"proxy\",\"basicAuth\":false}
- /usr/bin/curl -s -o /tmp/curlout -H "Content-Type: application/json" -d "$DATASOURCE" http://$ADMINUSER:$ADMINPASS@$SERVICE/api/datasources
- SUCCESS=`echo $?`
- echo "SUCCESS $SUCCESS"
- cat /tmp/curlout
-
- echo "now create Dashboards with "$VCSLIST
- grafana-create-vcs.sh $ADMINUSER $ADMINPASS $SERVICE $DASHBOARDS $ORGASCII $VCSLIST
- grafana-create-device-group.sh $ADMINUSER $ADMINPASS $SERVICE $DASHBOARDS $ORGASCII $DGARRAY
-
-done
-
diff --git a/aether-roc-umbrella/files/scripts/grafana-create-vcs.sh b/aether-roc-umbrella/files/scripts/grafana-create-vcs.sh
deleted file mode 100755
index 2d09aab..0000000
--- a/aether-roc-umbrella/files/scripts/grafana-create-vcs.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-# script to create Grafana VCS dashboards
-# Usage:
-# grafana-create-vcs.sh <ADMINUSER> <ADMINPASS> <grafana-server> <dashboards-folder> <org> <list of vcs>...
-set -e
-#set -x
-set -o pipefail
-set -u
-
-if [ "$#" -lt 6 ]; then
- echo "At least 6 args are needed. Got $#"
- exit 1
-fi
-ADMINUSER=$1
-ADMINPASS=$2
-SERVICE=$3
-FOLDER=$4
-export ORG=$5
-shift
-shift
-shift
-shift
-shift
-for vcs in "$@"; do
- VCSASCII=${vcs//[^a-zA-Z0-9]/_}
- SUCCESS=-1
- ORGID=-1
-
- echo "Creating vcs $vcs ($VCSASCII) in $ORG"
- for f in $FOLDER/*.json; do
- if [ -f "$f" ]; then
- echo "Creating Dashboard from $f"
- export VCS=$vcs
- DASHBOARD=$(envsubst < $f)
- /usr/bin/curl -s -o /tmp/curlout -H "Content-Type: application/json" -d "$DASHBOARD" http://$ADMINUSER:$ADMINPASS@$SERVICE/api/dashboards/db
- SUCCESS=`echo $?`
- echo "SUCCESS $SUCCESS"
- cat /tmp/curlout
- else
- echo "No dashboards found"
- fi
- done
-
-done
diff --git a/aether-roc-umbrella/templates/dashboards-templated.yaml b/aether-roc-umbrella/templates/dashboards-templated.yaml
deleted file mode 100644
index 01cadbb..0000000
--- a/aether-roc-umbrella/templates/dashboards-templated.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ .Release.Name }}-dashboards-templated
- namespace: {{ .Release.Namespace }}
-data:
-{{ (.Files.Glob "files/dashboards/**/*.json").AsConfig | indent 2 }}
diff --git a/aether-roc-umbrella/templates/post-install-job-grafana.yaml b/aether-roc-umbrella/templates/post-install-job-grafana.yaml
deleted file mode 100644
index d31e3c6..0000000
--- a/aether-roc-umbrella/templates/post-install-job-grafana.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
-# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-{{ if .Values.import.grafana.enabled }}
-apiVersion: batch/v1
-kind: Job
-metadata:
- name: "{{ .Release.Name }}"
- labels:
- app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
- app.kubernetes.io/instance: {{ .Release.Name | quote }}
- app.kubernetes.io/version: {{ .Chart.AppVersion }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- annotations:
- # This is what defines this resource as a hook. Without this line, the
- # job is considered part of the release.
- "helm.sh/hook": post-install
- "helm.sh/hook-weight": "-5"
- {{- if .Values.grafana.tidyUpPostInstall }}
- "helm.sh/hook-delete-policy": hook-succeeded
- {{- end}}
-spec:
- template:
- metadata:
- name: "{{ .Release.Name }}"
- labels:
- app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
- app.kubernetes.io/instance: {{ .Release.Name | quote }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- spec:
- restartPolicy: Never
- containers:
- - name: post-install-job
- image: "onosproject/onos-cli:v0.7.32"
- env:
- - name: GF_SECURITY_ADMIN_USER
- valueFrom:
- secretKeyRef:
- name: {{ .Release.Name }}-grafana
- key: admin-user
- - name: GF_SECURITY_ADMIN_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ .Release.Name }}-grafana
- key: admin-password
- command: ["/usr/local/bin/grafana-create-orgs.sh"]
- args:
- - "$(GF_SECURITY_ADMIN_USER)"
- - "$(GF_SECURITY_ADMIN_PASSWORD)"
- - "{{ .Release.Name }}"
- - "{{ .Release.Name }}-grafana"
- - "/usr/local/dashboards/templated"
- {{- range $org, $vcs := .Values.grafana.orgs }}
- - {{ printf "%s%s" $org $vcs | quote }}
- {{- end}}
- volumeMounts:
- - name: post-install
- mountPath: /usr/local/bin
- readOnly: true
- - name: dashboards-templated
- mountPath: /usr/local/dashboards/templated
- readOnly: true
- volumes:
- - name: post-install
- configMap:
- name: {{ .Release.Name }}-grafana-post-install
- defaultMode: 0555
- - name: dashboards-templated
- configMap:
- name: {{ .Release.Name }}-dashboards-templated
-
- {{end}}
diff --git a/aether-roc-umbrella/values.yaml b/aether-roc-umbrella/values.yaml
index 2a4afcc..96a6d3e 100644
--- a/aether-roc-umbrella/values.yaml
+++ b/aether-roc-umbrella/values.yaml
@@ -121,31 +121,7 @@
fullnameOverride: prom-label-proxy-v1
prometheusEnabled: false
-grafana:
- orgs:
- acme:
- vcs:
- - acme-chicago-robots
- devicegroup:
- - acme-chicago-robots:
- production: "0-3"
- warehouse: "10-12"
- starbucks:
- vcs:
- - starbucks-newyork-cameras
- - starbucks-seattle-cameras
- devicegroup:
- - starbucks-newyork-cameras:
- front: "40-41"
- store: "50-55"
- - starbucks-seattle-pos:
- tills: "20-22"
- store: "30-34"
- - starbucks-seattle-cameras:
- counter: "0-3"
- store: "10-14"
-
- tidyUpPostInstall: true
+grafana:
grafana.ini:
log:
level: debug
@@ -240,7 +216,6 @@
static_configs:
- targets:
- sdcore-adapter-v3-exporter:2112
-
# SD-Core Test Dummy
# proxy_pass has to be added or nginx will not log the $request_body
sdcore-test-dummy: