Merge "health check of log elastic search"
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Tue, 6 Feb 2018 13:33:47 +0000 (13:33 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 6 Feb 2018 13:33:47 +0000 (13:33 +0000)
kubernetes/aai/resources/config/haproxy/haproxy.cfg [moved from kubernetes/config/docker/init/src/config/aai/haproxy/haproxy.cfg with 100% similarity]
kubernetes/aai/templates/aai-deployment-configmap.yaml [new file with mode: 0644]
kubernetes/aai/templates/aai-deployment.yaml
kubernetes/aai/templates/hbase-deployment.yaml
kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json [new file with mode: 0644]
kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json [new file with mode: 0644]
kubernetes/oneclick/createAll.bash

diff --git a/kubernetes/aai/templates/aai-deployment-configmap.yaml b/kubernetes/aai/templates/aai-deployment-configmap.yaml
new file mode 100644 (file)
index 0000000..40d4909
--- /dev/null
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAaiAaiService }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-deployment-configmap
+  namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }}
+#{{ end }}
index a65cf44..e0e422b 100644 (file)
@@ -42,6 +42,7 @@ spec:
         - mountPath: /dev/log
           name: aai-service-log
         - mountPath: /usr/local/etc/haproxy/haproxy.cfg
+          subPath: haproxy.cfg
           name: haproxy-cfg
         ports:
         - containerPort: 8080
@@ -59,8 +60,8 @@ spec:
           hostPath:
             path: "/dev/log"
         - name: haproxy-cfg
-          hostPath:
-            path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/haproxy.cfg"
+          configMap:
+            name: aai-deployment-configmap
       restartPolicy: Always
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
index acb29da..3c1949c 100644 (file)
@@ -41,7 +41,7 @@ spec:
       volumes:
       - name: hbase-data
         hostPath:
-          path: /dockerdata-nfs/onap/aai/hbase
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aai/hbase
       - name: localtime
         hostPath:
           path: /etc/localtime
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json
new file mode 100644 (file)
index 0000000..794fb4b
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "service": {
+    "name": "Health Check: Log - Kibana",
+    "checks": [
+      {
+        "id": "log-kibana-server",
+        "name": "Log kibana Health Check",
+        "http": "http://kibana.onap-log:5601/status",
+        "method": "HEAD",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      }
+    ]
+  }
+}
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json
new file mode 100644 (file)
index 0000000..3c0f450
--- /dev/null
@@ -0,0 +1,95 @@
+{
+  "service": {
+    "name": "Health Check: Log - Log Stash",
+    "checks": [
+      {
+        "id": "log-logstash-internal-server-gi",
+        "name": "Log Stash Health Check - General Information",
+        "http": "http://logstashinternal.onap-log:9600/?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-node-info",
+        "name": "Log Stash Health Check - Node Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-os-info",
+        "name": "Log Stash Health Check - OS Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/os?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-jvm-info",
+        "name": "Log Stash Health Check - JVM Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/jvm?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-plugin-info",
+        "name": "Log Stash Health Check - Plugin Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/plugins?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-node-stat",
+        "name": "Log Stash Health Check - Node Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-jvm-stat",
+        "name": "Log Stash Health Check - JVM Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/jvm?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-process-stat",
+        "name": "Log Stash Health Check - Process Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/process?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-os-stat",
+        "name": "Log Stash Health Check - OS Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/os?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-tcp",
+        "name": "Log Stash File Beat TCP Health Check",
+        "tcp": "logstash.onap-log:5044",
+        "interval": "15s",
+        "timeout": "1s"
+      }
+    ]
+  }
+}
index 0240c83..5a99b19 100755 (executable)
@@ -86,8 +86,8 @@ create_onap_helm() {
 
   # assign default auth token
   if [[ -z $ONAP_DEFAULT_AUTH_TOKEN ]]; then
-    DEFAULT_SECRET=`kubectl get secrets -n kube-system | grep default-token |  awk '{ print $1}'`
-    ONAP_DEFAULT_AUTH_TOKEN=`kubectl get secrets $DEFAULT_SECRET -n kube-system -o yaml | grep  'token:'  | awk '{ print $2}' | base64 --decode`
+    DEFAULT_SECRET=`kubectl get secrets -n $1-$2 | grep default-token |  awk '{ print $1}'`
+    ONAP_DEFAULT_AUTH_TOKEN=`kubectl get secrets $DEFAULT_SECRET -n $1-$2 -o yaml | grep  'token:'  | awk '{ print $2}' | base64 --decode`
   fi
 
   cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3,kubeMasterAuthToken=$ONAP_DEFAULT_AUTH_TOKEN ${HELM_VALUES_ADDITION}`