Initial commit for chronos-umbrella
Change-Id: Ice4173f994e049c5ef333046438b27a1a396e234
diff --git a/chronos-exporter/.helmignore b/chronos-exporter/.helmignore
new file mode 100644
index 0000000..afb7893
--- /dev/null
+++ b/chronos-exporter/.helmignore
@@ -0,0 +1,25 @@
+# SPDX-FileCopyrightText: 2021 Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/chronos-exporter/Chart.yaml b/chronos-exporter/Chart.yaml
new file mode 100644
index 0000000..070ed85
--- /dev/null
+++ b/chronos-exporter/Chart.yaml
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: v2
+name: chronos-exporter
+description: Chronos Exporter
+kubeVersion: ">=1.15.0"
+type: application
+version: 0.0.1
+appVersion: v0.0.0
+keywords:
+ - aether
+ - exporter
+home: https://www.opennetworking.org/aether/
+maintainers:
+ - name: Aether Ops team
+ email: support@opennetworking.org
diff --git a/chronos-exporter/README.md b/chronos-exporter/README.md
new file mode 100644
index 0000000..01259c0
--- /dev/null
+++ b/chronos-exporter/README.md
@@ -0,0 +1,9 @@
+<!--
+SPDX-FileCopyrightText: 2021 Open Networking Foundation
+
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+-->
+
+## Chronos Exporter
+
+Provides a [Helm] chart for deploying Chronos Exporter on [Kubernetes].
diff --git a/chronos-exporter/files/certs/README.md b/chronos-exporter/files/certs/README.md
new file mode 100644
index 0000000..65c5a42
--- /dev/null
+++ b/chronos-exporter/files/certs/README.md
@@ -0,0 +1,32 @@
+<!--
+SPDX-FileCopyrightText: 2021 Open Networking Foundation
+
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+-->
+
+This folder contains self-signed certificates for use in testing. _DO NOT USE THESE
+CERTIFICATES IN PRODUCTION!_
+
+The certificates were generated with the
+https://github.com/onosproject/simulators/blob/master/pkg/certs/generate_certs.sh
+script as
+```bash
+generate_certs.sh sdcore-adapter
+```
+
+In this folder they **must** be (re)named
+* tls.cacrt
+* tls.crt
+* tls.key
+
+Use
+```bash
+openssl x509 -in deployments/helm/onos-config/files/certs/tls.crt -text -noout
+```
+to verify the contents (especially the subject).
+
+There is another Cert for onos-config in test/certs but these were created with:
+```
+generate-certs.sh onos-config
+```
+and are left named onf.cacrt, onos-config.key and onos-config.crt
\ No newline at end of file
diff --git a/chronos-exporter/files/certs/tls.cacert b/chronos-exporter/files/certs/tls.cacert
new file mode 100644
index 0000000..3dcb76b
--- /dev/null
+++ b/chronos-exporter/files/certs/tls.cacert
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDYDCCAkgCCQDe99fSN9qxSTANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJV
+UzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCU1lbmxvUGFyazEMMAoGA1UECgwDT05G
+MRQwEgYDVQQLDAtFbmdpbmVlcmluZzEeMBwGA1UEAwwVY2Eub3Blbm5ldHdvcmtp
+bmcub3JnMB4XDTE5MDQxMTA5MDYxM1oXDTI5MDQwODA5MDYxM1owcjELMAkGA1UE
+BhMCVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlNZW5sb1BhcmsxDDAKBgNVBAoM
+A09ORjEUMBIGA1UECwwLRW5naW5lZXJpbmcxHjAcBgNVBAMMFWNhLm9wZW5uZXR3
+b3JraW5nLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEg7CZR
+X8Y+syKHaQCh6mNIL1D065trwX8RnuKM2kBwSu034zefQAPloWugSoJgJnf5fe0j
+nUD8gN3Sm8XRhCkvf67pzfabgw4n8eJmHScyL/ugyExB6Kahwzn37bt3oT3gSqhr
+6PUznWJ8fvfVuCHZZkv/HPRp4eyAcGzbJ4TuB0go4s6VE0WU5OCxCSlAiK3lvpVr
+3DOLdYLVoCa5q8Ctl3wXDrfTLw5/Bpfrg9fF9ED2/YKIdV8KZ2ki/gwEOQqWcKp8
+0LkTlfOWsdGjp4opPuPT7njMBGXMJzJ8/J1e1aJvIsoB7n8XrfvkNiWL5U3fM4N7
+UZN9jfcl7ULmm7cCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAIh6FjkQuTfXddmZY
+FYpoTen/VD5iu2Xxc1TexwmKeH+YtaKp1Zk8PTgbCtMEwEiyslfeHTMtODfnpUIk
+DwvtB4W0PAnreRsqh9MBzdU6YZmzGyZ92vSUB3yukkHaYzyjeKM0AwgVl9yRNEZw
+Y/OM070hJXXzJh3eJpLl9dlUbMKzaoAh2bZx6y3ZJIZFs/zrpGfg4lvBAvfO/59i
+mxJ9bQBSN3U2Hwp6ioOQzP0LpllfXtx9N5LanWpB0cu/HN9vAgtp3kRTBZD0M1XI
+Ctit8bXV7Mz+1iGqoyUhfCYcCSjuWTgAxzir+hrdn7uO67Hv4ndCoSj4SQaGka3W
+eEfVeA==
+-----END CERTIFICATE-----
diff --git a/chronos-exporter/files/certs/tls.crt b/chronos-exporter/files/certs/tls.crt
new file mode 100644
index 0000000..a634ab0
--- /dev/null
+++ b/chronos-exporter/files/certs/tls.crt
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDYzCCAksCFErBGzsXHo1l8bmZRmDkF+h2bsdWMA0GCSqGSIb3DQEBCwUAMHIx
+CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTESMBAGA1UEBwwJTWVubG9QYXJrMQww
+CgYDVQQKDANPTkYxFDASBgNVBAsMC0VuZ2luZWVyaW5nMR4wHAYDVQQDDBVjYS5v
+cGVubmV0d29ya2luZy5vcmcwHhcNMjExMTA1MTQyNzU0WhcNMzExMTAzMTQyNzU0
+WjBqMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCU1lbmxvUGFy
+azEMMAoGA1UECgwDT05GMRQwEgYDVQQLDAtFbmdpbmVlcmluZzEWMBQGA1UEAwwN
+ZGVtby1leHBvcnRlcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPUf
+jSlFz8wQBeUid4hUq8gL9Tggoe38QX26j/XuLsbM0dxzJMD2k2nDXOz0caMlUYqX
+sOSn5GRtoZsVa9lKbNTxF9HkEPLV7CWv+gqRXYOOPI9Wjr5lDKufxeKKXrW+zJvu
+gUWRQ+l9bZLb7KHbhQ+mmLQC1/r+PgS1CIMc1PQ560FPpI9w+cl3IeY8XvEvKDGE
+cxroDfPqrv0gTtOekuGBVQj1ivUg+SdfyP8j5RX/RyCUfuWJoNJEDWKioKKBjrhK
+rP17yILr0RZst8tAuwxJXruMzNDribYgJn3bXHUQjX1tiFr48ProjfQCr77Elvd9
+DSd4XxtPwomJPXcQKN0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAXFs7WVelZ+6X
+ASTmhLZtzoWtBOjPCGEnBrK2SHVRHbaVLBBaZp/sW2+XkPMQrHwWVpFP+7ttrJ0V
+fsfGlRrZ6uxB9MDK9D2RS6Zo8HKUXCQWs4VRcw7Zzy1NPa4MLBAXRxLv83t4UfAj
+cUFkZ0UhKlFJNUZ74AcMBzK121BzxmDCDwnZWyeqzB8SKexdk8I+sEoc5/KIM/QP
+LdTKe3vw/WGH7p45M693BXWc5lyAcwB8iSmecjlPB5peN71sY3OeSJGUvS+Qbdla
+FBPC5tNbp4byRVciyLKnwxg4HmOfNhCZbRVYG2WHBaT7oMtx+4DaNs8ePwWIwvko
+ga0pInZUNg==
+-----END CERTIFICATE-----
diff --git a/chronos-exporter/files/certs/tls.key b/chronos-exporter/files/certs/tls.key
new file mode 100644
index 0000000..bc89538
--- /dev/null
+++ b/chronos-exporter/files/certs/tls.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQD1H40pRc/MEAXl
+IneIVKvIC/U4IKHt/EF9uo/17i7GzNHccyTA9pNpw1zs9HGjJVGKl7Dkp+RkbaGb
+FWvZSmzU8RfR5BDy1ewlr/oKkV2DjjyPVo6+ZQyrn8Xiil61vsyb7oFFkUPpfW2S
+2+yh24UPppi0Atf6/j4EtQiDHNT0OetBT6SPcPnJdyHmPF7xLygxhHMa6A3z6q79
+IE7TnpLhgVUI9Yr1IPknX8j/I+UV/0cglH7liaDSRA1ioqCigY64Sqz9e8iC69EW
+bLfLQLsMSV67jMzQ64m2ICZ921x1EI19bYha+PD66I30Aq++xJb3fQ0neF8bT8KJ
+iT13ECjdAgMBAAECggEAHFfroKwb3QK1S8tyeucffeA0GKtdTgFvKTSbVNqXuhEQ
+6ya9Rzq7zOz0H8ocIbs89IOZxrbLJ/mtSBtv/w4mC3FdSb3PX+Twi2MPzI0GfSHD
+Sue9VbKlhmrRHOLXFLjdO+KWPA8SBTuloeegMw8JEcg3vAjgJHulfDHarB53WU3n
+QXm34u759a4xGFFGtHW7wzDjsnt6Cm78Moi3IIbs40cE7EbUkGoHYstaQH8Kl2CI
+TIFcT2KuzJ057dxcS6KsBNbbyG0vbcBjV+221EGIcjuj7p53XhhLIE1p4tdv+9TG
+SZDPpgKLjMkIqeeq7It2XAG3sCkirwzEF7n+rVCeAQKBgQD6rnUX8Xr0r5lgPNIO
+Nsgop/aRQ/bfYNZfMP7kNLooq9efMPoxqaaCysMa+IjkCaCowladoQRtaWGp/iVM
+hjwE/l/oEASe8NDUUqk2w2SdNos6Cm9sj00TfCBqMhOKkAxbEZWMJxJ73hXYbkTt
+I/5rVj2dqE7YVCO2umExe91enQKBgQD6Uue+7iFdp77aghScEic109pEXoDfdcoa
+6ThDuroSb+f/YIl5na8IrXYQve40ycf2O9z3M2Sg9GczYqfSL1wMaVnkGUgkihJN
+W5yhDpqfkNMVJLQLTzX3dNQ3y10+XAneSuclY5gH0RBp4vfnn1r7vrP+ZhFx9khi
+aNyQbhS/QQKBgAz6dUN9FBGQ+c7at0FXIrvAHmrc6u4btF2PStMDy9OJOgua3Ikv
+sFg7KSi/T08HFJNIJHXavUDw4MaNSt8QYBEeHlcEZUjZTOaBNROJwC7HgSPLIIOt
+U587oO3+k7ZryMf6PBTafQF+uQDQjK7+WxCxkVUVPqfCi2rNcXS/ZfGdAoGAH9zp
+rr309Uzi2EFyiiMtZoae49D7qnX90csZ5FUiVjJ0X2dUWGyf2QTrYFostf9xOoCI
+MdcS2gICGOJX5kMs/k9yp7woGK6SgdJFb6LCP8lZdPmFCWN9xQ/T634xUjy47Niv
+72xr76LG6hN/5rW8CQtPMfSgB9eHgy9B1AiPD4ECgYBOyipIZ9YJG/gcOmWqgRdv
+22lD8nl0hU7El4gHhWYzABApglpCwwcE+GLK9h/9KZbOEIQs7itzZFEQCX1VbuUo
+8+JWR8ZsimMSmLb5ySF3hMbevaA6iYNjjpvDy1syFNW+WVefp7nf1zQB4qRMW1vb
+p0dF88DF/NJK1kAC2RBZew==
+-----END PRIVATE KEY-----
diff --git a/chronos-exporter/templates/_helpers.tpl b/chronos-exporter/templates/_helpers.tpl
new file mode 100644
index 0000000..190001f
--- /dev/null
+++ b/chronos-exporter/templates/_helpers.tpl
@@ -0,0 +1,56 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+Expand the name of the chart.
+*/}}
+{{- define "chronos-exporter.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "chronos-exporter.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "chronos-exporter.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{/*
+Common labels
+*/}}
+{{- define "chronos-exporter.labels" -}}
+helm.sh/chart: {{ include "chronos-exporter.chart" . }}
+{{ include "chronos-exporter.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "chronos-exporter.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "chronos-exporter.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
diff --git a/chronos-exporter/templates/deployment.yaml b/chronos-exporter/templates/deployment.yaml
new file mode 100644
index 0000000..0ad83eb
--- /dev/null
+++ b/chronos-exporter/templates/deployment.yaml
@@ -0,0 +1,66 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ name: {{ template "chronos-exporter.fullname" . }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ {{- include "chronos-exporter.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ name: {{ template "chronos-exporter.fullname" . }}
+ {{- include "chronos-exporter.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ args:
+ - "/usr/local/bin/chronos-exporter"
+ ports:
+ - name: metrics
+ containerPort: 2112
+ readinessProbe:
+ httpGet:
+ path: /metrics
+ port: 2112
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ livenessProbe:
+ httpGet:
+ path: /metrics
+ port: 2112
+ initialDelaySeconds: 15
+ periodSeconds: 20
+ volumes:
+ - name: secret
+ secret:
+ secretName: {{ template "chronos-exporter.fullname" . }}-secret
\ No newline at end of file
diff --git a/chronos-exporter/templates/secret.yaml b/chronos-exporter/templates/secret.yaml
new file mode 100644
index 0000000..be9e3f9
--- /dev/null
+++ b/chronos-exporter/templates/secret.yaml
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}-secret
+ labels:
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+data:
+ {{ $root := . }}
+ {{ range $path, $bytes := .Files.Glob "files/certs/tls.*" }}
+ {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}'
+ {{ end }}
+type: Opaque
diff --git a/chronos-exporter/templates/service.yaml b/chronos-exporter/templates/service.yaml
new file mode 100644
index 0000000..0bc44d0
--- /dev/null
+++ b/chronos-exporter/templates/service.yaml
@@ -0,0 +1,22 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}
+ labels:
+ app: {{ template "chronos-exporter.fullname" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+ {{- include "chronos-exporter.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ selector:
+ name: {{ template "chronos-exporter.fullname" . }}
+ ports:
+ - name: metrics
+ port: 2112
+ - name: exporterui
+ port: 8081
diff --git a/chronos-exporter/values.yaml b/chronos-exporter/values.yaml
new file mode 100644
index 0000000..b73cc4e
--- /dev/null
+++ b/chronos-exporter/values.yaml
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+nameOverride: ""
+fullnameOverride: "chronos-exporter"
+
+replicaCount: 1
+annotations: {}
+
+image:
+ repository: onosproject/chronos-exporter
+ tag: latest
+ pullPolicy: IfNotPresent
+ pullSecrets: []
+
+service:
+ type: ClusterIP
diff --git a/chronos-umbrella/Chart.yaml b/chronos-umbrella/Chart.yaml
new file mode 100644
index 0000000..7cf0cfc
--- /dev/null
+++ b/chronos-umbrella/Chart.yaml
@@ -0,0 +1,32 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: v2
+name: chronos-umbrella
+description: Chronos Umbrella chart to deploy all Aether ROC
+kubeVersion: ">=1.18.0"
+type: application
+version: 0.0.1
+appVersion: v0.0.0
+keywords:
+ - aether
+ - exporter
+home: https://www.opennetworking.org/aether/
+maintainers:
+ - name: Aether Ops team
+ email: support@opennetworking.org
+dependencies:
+ - name: grafana
+ condition: import.grafana.enabled
+ repository: https://grafana.github.io/helm-charts
+ version: 6.16.6
+ - name: prometheus
+ condition: import.prometheus.chronos.enabled
+ repository: https://prometheus-community.github.io/helm-charts
+ version: 14.6.1
+ alias: prometheus-chronos
+ - name: chronos-exporter
+ condition: import.chronos-exporter.enabled
+ repository: "file://../chronos-exporter"
+ version: 0.0.1
diff --git a/chronos-umbrella/README.md b/chronos-umbrella/README.md
new file mode 100644
index 0000000..78366db
--- /dev/null
+++ b/chronos-umbrella/README.md
@@ -0,0 +1,20 @@
+<!--
+SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
+
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+-->
+
+## Chronos Umbrella chart
+
+Provides a [Helm] chart for deploying
+
+* chronos-exporter
+* grafana
+* prometheus
+
+to [Kubernetes].
+> See the [documentation] for more info.
+
+[Kubernetes]: https://kubernetes.io/
+[Helm]: https://helm.sh/
+[documentation]: https://docs.onosproject.org/developers/deploy_with_helm/
diff --git a/chronos-umbrella/files/dashboards/site/site-availability.json b/chronos-umbrella/files/dashboards/site/site-availability.json
new file mode 100644
index 0000000..4a1f028
--- /dev/null
+++ b/chronos-umbrella/files/dashboards/site/site-availability.json
@@ -0,0 +1,135 @@
+{
+
+ "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": "$ds",
+ "description": "Cluster Availability",
+ "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": "sum by (node) (kube_node_status_condition{condition=~\"Ready\",status=~\"true\"})",
+ "interval": "",
+ "legendFormat": "{{node}}",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Cluster Nodes Status",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 30,
+ "style": "light",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "label" : "Datasource",
+ "multi" : false,
+ "name" : "ds",
+ "type" : "datasource",
+ "query": "prometheus",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": ""
+ }
+ ]
+ },
+ "time": {
+ "from": "now-15m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "Cluster Health",
+ "uid": "site-availability",
+ "version": 1
+ }
+
+
diff --git a/chronos-umbrella/files/dashboards/site/site-monitoring.json b/chronos-umbrella/files/dashboards/site/site-monitoring.json
new file mode 100644
index 0000000..65535d6
--- /dev/null
+++ b/chronos-umbrella/files/dashboards/site/site-monitoring.json
@@ -0,0 +1,149 @@
+{
+
+ "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": "$ds",
+ "description": "E2E Tests",
+ "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 by (name) (aetheredge_e2e_tests_ok{name=~\"$agents\"})",
+ "interval": "",
+ "legendFormat": "{{name}}",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Monitoring agents E2E Test",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 30,
+ "style": "light",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "label" : "Agents",
+ "multi" : true,
+ "name" : "agents",
+ "type" : "query",
+ "datasource": "$ds",
+ "definition": "label_values(aetheredge_e2e_tests_ok, name)",
+ "query": {
+ "query": "label_values(aetheredge_e2e_tests_ok, name)",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "sort" : 1
+ },
+ {
+ "label" : "Datasource",
+ "multi" : false,
+ "name" : "ds",
+ "type" : "datasource",
+ "query": "prometheus",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": ""
+ }
+ ]
+ },
+ "time": {
+ "from": "now-15m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "E2E Tests",
+ "uid": "site-monitoring",
+ "version": 1
+ }
+
+
diff --git a/chronos-umbrella/files/dashboards/site/site-small-cells.json b/chronos-umbrella/files/dashboards/site/site-small-cells.json
new file mode 100644
index 0000000..910e8d3
--- /dev/null
+++ b/chronos-umbrella/files/dashboards/site/site-small-cells.json
@@ -0,0 +1,149 @@
+{
+
+ "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": "$ds",
+ "description": "Small Cells connectivity on MME",
+ "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 by (enbname) (mme_number_of_enb_attached{enb_state=\"Active\", enbname=~\"$enb\"})",
+ "interval": "",
+ "legendFormat": "{{enbname}}",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Site Small Cells connectivity status",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 30,
+ "style": "light",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "label" : "ENB",
+ "multi" : true,
+ "name" : "enb",
+ "type" : "query",
+ "datasource": "$ds",
+ "definition": "label_values(mme_number_of_enb_attached, enbname)",
+ "query": {
+ "query": "label_values(mme_number_of_enb_attached, enbname)",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "sort" : 1
+ },
+ {
+ "label" : "Datasource",
+ "multi" : false,
+ "name" : "ds",
+ "type" : "datasource",
+ "query": "prometheus",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": ""
+ }
+ ]
+ },
+ "time": {
+ "from": "now-15m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "ENB Status",
+ "uid": "site-small-cell",
+ "version": 1
+ }
+
+
diff --git a/chronos-umbrella/files/dashboards/ue/ue-connectivity.json b/chronos-umbrella/files/dashboards/ue/ue-connectivity.json
new file mode 100644
index 0000000..c9f0423
--- /dev/null
+++ b/chronos-umbrella/files/dashboards/ue/ue-connectivity.json
@@ -0,0 +1,147 @@
+{
+
+ "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": "$ds",
+ "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": "subscribers_info{imsi=\"$imsi\"}",
+ "interval": "",
+ "legendFormat": "Connectivity",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "UE $imsi Connectivity",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 30,
+ "style": "light",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "label" : "IMSI",
+ "multi" : false,
+ "name" : "imsi",
+ "type" : "query",
+ "datasource": "$ds",
+ "definition": "label_values(subscribers_info, imsi)",
+ "query": {
+ "query": "label_values(subscribers_info, imsi)",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "sort" : 1
+ },
+ {
+ "label" : "Datasource",
+ "multi" : false,
+ "name" : "ds",
+ "type" : "datasource",
+ "query": "prometheus",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": ""
+ }
+ ]
+ },
+ "time": {
+ "from": "now-15m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "UE Connectivity",
+ "uid": "ue-conn",
+ "version": 1
+ }
+
diff --git a/chronos-umbrella/templates/NOTES.txt b/chronos-umbrella/templates/NOTES.txt
new file mode 100644
index 0000000..6bbb75c
--- /dev/null
+++ b/chronos-umbrella/templates/NOTES.txt
@@ -0,0 +1,25 @@
+# SPDX-FileCopyrightText: 2021 Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+Thank you for installing {{ .Chart.Name }} Helm chart.
+
+Your release is named {{ .Release.Name }} in namespace {{.Release.Namespace}}.
+See https://docs.onosproject.org/developers/deploy_with_helm/
+
+To learn more about the release, try:
+ $ helm -n {{.Release.Namespace}} status {{ .Release.Name }}
+ $ helm -n {{.Release.Namespace}} get all {{ .Release.Name }}
+ $ watch kubectl -n {{.Release.Namespace}} get pods
+
+You can attach to:
+* Aether CLI pod with
+$ kubectl -n {{.Release.Namespace}} exec -it $(kubectl -n {{.Release.Namespace}} get pods -l type=cli -o name) -- /bin/sh
+* Aether Portal at http://<server_IP>:31190
+
+If you are using KinD as a Kubernetes server, you will have to use a "port-forward" to access the Aether ROC GUI e.g.
+$ kubectl -n {{.Release.Namespace}} port-forward service/aether-roc-gui 8183:80
+and then access the GUI at
+* http://localhost:8183
+
+The aether-roc-api is then available at http://localhost:8183/aether-roc-api
diff --git a/chronos-umbrella/templates/_helpers.tpl b/chronos-umbrella/templates/_helpers.tpl
new file mode 100644
index 0000000..6e413de
--- /dev/null
+++ b/chronos-umbrella/templates/_helpers.tpl
@@ -0,0 +1,81 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+Expand the name of the chart.
+*/}}
+{{- define "global.name" -}}
+{{- default .Chart.Name .Values.global.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "global.fullname" -}}
+{{- if .Values.global.fullnameOverride -}}
+{{- .Values.global.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.global.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "global.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "global.labels" -}}
+helm.sh/chart: {{ include "global.chart" . }}
+{{ include "global.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "global.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "global.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+global consensus image name
+*/}}
+{{- define "global.store.consensus.imagename" -}}
+{{- if .Values.global.store.consensus.image.tag -}}
+{{- if .Values.global.store.consensus.image.registry -}}
+{{- printf "%s/" .Values.global.store.consensus.image.registry -}}
+{{- end -}}
+{{- printf "%s:" .Values.global.store.consensus.image.repository -}}
+{{- .Values.global.store.consensus.image.tag -}}
+{{- else -}}
+""
+{{- end -}}
+{{- end -}}
+
+{{/*
+global consensus store name
+*/}}
+{{- define "global.store.consensus.name" -}}
+{{- if .Values.global.store.consensus.name -}}
+{{- printf "%s" .Values.global.store.consensus.name -}}
+{{- else -}}
+{{- printf "%s-consensus-store" ( include "global.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/chronos-umbrella/tests/chronos-umbrella.go b/chronos-umbrella/tests/chronos-umbrella.go
new file mode 100644
index 0000000..9e70d56
--- /dev/null
+++ b/chronos-umbrella/tests/chronos-umbrella.go
@@ -0,0 +1,63 @@
+// SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+//
+// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+package tests
+
+import (
+ "context"
+ "testing"
+ "time"
+
+ "github.com/onosproject/helmit/pkg/helm"
+ "github.com/onosproject/helmit/pkg/input"
+ "github.com/onosproject/helmit/pkg/kubernetes"
+ "github.com/onosproject/helmit/pkg/test"
+ "github.com/onosproject/onos-test/pkg/onostest"
+ "github.com/stretchr/testify/assert"
+)
+
+const aetherCharts = "https://charts.aetherproject.org/"
+
+// ChronosUmbrellaSuite is the chronos-umbrella chart test suite
+type ChronosUmbrellaSuite struct {
+ test.Suite
+ c *input.Context
+}
+
+// SetupTestSuite sets up the chronos umbrella test suite
+func (s *ChronosUmbrellaSuite) SetupTestSuite(c *input.Context) error {
+ s.c = c
+ return nil
+}
+
+func getCredentials() (string, string, error) {
+ kubClient, err := kubernetes.New()
+ if err != nil {
+ return "", "", err
+ }
+ secrets, err := kubClient.CoreV1().Secrets().Get(context.Background(), onostest.SecretsName)
+ if err != nil {
+ return "", "", err
+ }
+ username := string(secrets.Object.Data["sd-ran-username"])
+ password := string(secrets.Object.Data["sd-ran-password"])
+
+ return username, password, nil
+}
+
+// TestInstall tests installing the chronos-umbrella chart
+func (s *ChronosUmbrellaSuite) TestInstall(t *testing.T) {
+ username, password, err := getCredentials()
+ assert.NoError(t, err)
+ registry := s.c.GetArg("registry").String("")
+
+ onos := helm.Chart("chronos-umbrella", aetherCharts).
+ Release("chronos-umbrella").
+ SetUsername(username).
+ SetPassword(password).
+ WithTimeout(15*time.Minute).
+ Set("import.prometheus.chronos.enabled", false).
+ Set("global.image.registry", registry)
+ assert.NoError(t, onos.Install(true))
+}
diff --git a/chronos-umbrella/values.yaml b/chronos-umbrella/values.yaml
new file mode 100644
index 0000000..efb69bd
--- /dev/null
+++ b/chronos-umbrella/values.yaml
@@ -0,0 +1,108 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+# Default values for all Aether Helm charts.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+global:
+ fullnameOverride: "onos"
+ nameOverride: ""
+
+import:
+ grafana:
+ enabled: true
+ prometheus:
+ chronos:
+ enabled: true
+ chronos-exporter:
+ enabled: true
+
+#chronos-exporter:
+ #image:
+ #repository: onosproject/chronos-exporter
+ #tag: v0.0.1
+ #pullPolicy: IfNotPresent
+ #pullSecrets: []
+
+grafana:
+ sidecar:
+ dashboards:
+ enabled: true
+ label: chronos_dashboard
+ labelValue: chronos-exporter-gui
+ datasources:
+ enabled: true
+ label: chronos_datasource
+ labelValue: chronos-exporter-gui
+ source:
+ - name: chronos
+ protocol: http
+ service: chronos-umbrella-prometheus-chronos-server
+ port: 80
+ grafana.ini:
+ log:
+ level: debug
+ server:
+ domain: aether-roc-gui:8183
+ root_url: "%(protocol)s://%(domain)s/grafana/"
+ serve_from_sub_path: true
+ security:
+ allow_embedding: true
+ auth:
+ disable_login_form: false
+ oauth_auto_login: false
+ auth.anonymous:
+ enabled: true
+ hide_version: false
+# Disabled other auth types for the moment - see aether-roc-gui/docs/grafana.md
+ auth.proxy:
+ enabled: false
+ header_name: X-WEBAUTH-USER
+ header_property: username
+ auto_sign_up: true
+ enable_login_token: true
+ auth.jwt:
+ enabled: false
+ header_name: X-JWT-Assertion
+ username_claim: name
+ email_claim: email
+ jwk_set_url: "https://keycloak.opennetworking.org/auth/realms/master/protocol/openid-connect/certs"
+ cache_ttl: 60m
+ auth.generic_oauth:
+ enabled: false
+ client_id: aether-roc-gui
+# client_secret: YWV0aGVyLXJvYy1ndWkK
+ scopes: "openid profile email groups"
+ empty_scopes: false
+ auth_url: "http://k3u-keycloak:5557/auth/realms/master/protocol/openid-connect/auth"
+ token_url: "http://k3u-keycloak:5557/auth/realms/master/protocol/openid-connect/token"
+ api_url: "http://k3u-keycloak:5557/auth/realms/master/protocol/openid-connect/userinfo"
+ allowed_domains: opennetworking.org
+ allow_sign_up: true
+ name: KeyCloak
+
+prometheus-chronos:
+ alertmanager:
+ persistentVolume:
+ enabled: false
+ server:
+ persistentVolume:
+ enabled: false
+ pushgateway:
+ enabled: false
+ nodeExporter:
+ enabled: false
+ kubeStateMetrics:
+ enabled: false
+ alertmanager:
+ enabled: false
+ serverFiles:
+ prometheus.yml:
+ scrape_configs:
+ - job_name: chronos-exporter
+ scrape_interval: 2s
+ static_configs:
+ - targets:
+ - chronos-exporter:2112