Merge "Add standardized helm chart for aaf"
authorBorislav Glozman <Borislav.Glozman@amdocs.com>
Wed, 28 Mar 2018 14:29:45 +0000 (14:29 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 28 Mar 2018 14:29:45 +0000 (14:29 +0000)
52 files changed:
kubernetes/aai/charts/champ/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/requirements.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json [new file with mode: 0644]
kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore [new file with mode: 0644]
kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties [new file with mode: 0644]
kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml [new file with mode: 0644]
kubernetes/aai/charts/champ/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/templates/secrets.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/champ/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/gizmo/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/README.txt [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/crud-api.properties [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/log/logback.xml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json [new file with mode: 0644]
kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json [new file with mode: 0644]
kubernetes/aai/charts/gizmo/templates/NOTES.txt [new file with mode: 0644]
kubernetes/aai/charts/gizmo/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/templates/secrets.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/gizmo/values.yaml [new file with mode: 0644]
kubernetes/esr/.helmignore [new file with mode: 0644]
kubernetes/esr/Chart.yaml
kubernetes/esr/charts/esr-gui/.helmignore [new file with mode: 0644]
kubernetes/esr/charts/esr-gui/Chart.yaml [moved from kubernetes/esr/templates/esr-filebeat-configmap.yaml with 71% similarity]
kubernetes/esr/charts/esr-gui/templates/NOTES.txt [new file with mode: 0644]
kubernetes/esr/charts/esr-gui/templates/deployment.yaml [new file with mode: 0644]
kubernetes/esr/charts/esr-gui/templates/service.yaml [new file with mode: 0644]
kubernetes/esr/charts/esr-gui/values.yaml [new file with mode: 0644]
kubernetes/esr/requirements.yaml [moved from kubernetes/esr/templates/esr-server-log-configmap.yaml with 68% similarity]
kubernetes/esr/templates/NOTES.txt [new file with mode: 0644]
kubernetes/esr/templates/configmap.yaml [new file with mode: 0644]
kubernetes/esr/templates/deployment.yaml [new file with mode: 0644]
kubernetes/esr/templates/esr-esrgui-deployment.yaml [deleted file]
kubernetes/esr/templates/esr-esrserver-deployment.yaml [deleted file]
kubernetes/esr/templates/service.yaml [moved from kubernetes/esr/templates/all-services.yaml with 53% similarity]
kubernetes/esr/values.yaml
kubernetes/msb/charts/msb-consul/templates/service.yaml
kubernetes/msb/charts/msb-discovery/templates/service.yaml
kubernetes/msb/charts/msb-eag/templates/service.yaml
kubernetes/msb/charts/msb-iag/templates/service.yaml
kubernetes/onap/requirements.yaml

diff --git a/kubernetes/aai/charts/champ/Chart.yaml b/kubernetes/aai/charts/champ/Chart.yaml
new file mode 100644 (file)
index 0000000..a4ee888
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+description: Champ microservice
+name: champ
+version: 2.0.0
diff --git a/kubernetes/aai/charts/champ/requirements.yaml b/kubernetes/aai/charts/champ/requirements.yaml
new file mode 100644 (file)
index 0000000..9552dfd
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    # local reference to common chart, as it is
+    # a part of this chart's package and will not
+    # be published independently to a repo (at this point)
+    repository: '@local'
diff --git a/kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json b/kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json
new file mode 100644 (file)
index 0000000..ee04a71
--- /dev/null
@@ -0,0 +1,19 @@
+{
+       "roles": [
+               {
+                       "name": "admin",
+                       "functions": [
+                               {
+                                       "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ]
+                               }
+                       ],
+
+                       "users": [
+                               {
+                                       "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"
+                               }
+                       ]
+               }
+       ]
+}
+
diff --git a/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore b/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore
new file mode 100644 (file)
index 0000000..9eec841
Binary files /dev/null and b/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore differ
diff --git a/kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties b/kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties
new file mode 100644 (file)
index 0000000..3b90c55
--- /dev/null
@@ -0,0 +1,6 @@
+keyName=aai-uuid
+sourceOfTruthName=source-of-truth
+createdTsName=aai-created-ts
+lastModTsName=aai-last-mod-ts
+collectionPropertiesKey=properties
+
diff --git a/kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml b/kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml
new file mode 100644 (file)
index 0000000..cdf3aad
--- /dev/null
@@ -0,0 +1,62 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:util="http://www.springframework.org/schema/util"
+xsi:schemaLocation="
+       http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/util
+       http://www.springframework.org/schema/util/spring-util.xsd
+       ">
+
+    <!-- Event publisher to pass to the Champ library for logging raw graph
+         events (Kafka implementation). -->
+    <bean id="champEventPublisher" class="org.onap.aai.event.client.KafkaEventPublisher" >
+        <constructor-arg name="hosts" value="global-kafka.{{.Release.Namespace}}:9092" />
+        <constructor-arg name="topic" value="champRawEvents" />
+    </bean>
+
+    <!-- Graph Implementation Configuration-->
+    <util:map id="props" map-class="java.util.HashMap" key-type="java.lang.String" value-type="java.lang.Object">
+        <entry key="champcore.event.stream.buffer.capacity" value="50" value-type="java.lang.Integer"/>
+        <entry key="champcore.event.stream.publisher-pool-size" value="10" value-type="java.lang.Integer"/>
+        <entry key="champcore.event.stream.publisher" value-ref="champEventPublisher"/>
+
+        <entry key="graph.name" value="aaigraph.dev"/>
+        <entry key="storage.backend" value="hbase"/>
+        <entry key="storage.hostname" value="hbase.{{.Release.Namespace}}"/>
+
+        <!-- Hbase Config -->
+        <entry key="storage.hbase.ext.hbase.zookeeper.property.clientPort" value="2181"/>
+        <entry key="storage.hbase.ext.zookeeper.znode.parent" value="/hbase"/>
+    </util:map>
+
+    <!-- Janus Implementation -->
+    <bean id="graphBuilder" class="org.onap.aai.champjanus.graph.impl.JanusChampGraphImpl$Builder">
+        <constructor-arg value="aaigraph.dev"/>
+        <constructor-arg ref="props" />
+    </bean>
+
+    <bean id="graphImpl" class="org.onap.aai.champjanus.graph.impl.JanusChampGraphImpl">
+        <constructor-arg ref="graphBuilder" />
+    </bean>
+
+    <bean id="champUUIDService" class="org.onap.champ.service.ChampUUIDService" >
+        <constructor-arg name="graphImpl" ref="graphImpl" />
+    </bean>
+
+    <bean id="cache" class="org.onap.champ.service.ChampTransactionCache" >
+        <constructor-arg name="txTimeOutInSec" value="600" />
+        <constructor-arg name="graphImpl" ref="graphImpl" />
+    </bean>
+
+    <bean id="champDataService" class="org.onap.champ.service.ChampDataService" >
+        <constructor-arg name="champUUIDService" ref="champUUIDService" />
+        <constructor-arg name="graphImpl" ref="graphImpl" />
+        <constructor-arg name="cache" ref="cache" />
+    </bean>
+
+    <bean id="champRestService" class="org.onap.champ.ChampRESTAPI" >
+        <constructor-arg name="champDataService" ref="champDataService" />
+        <constructor-arg name="champAsyncRequestProcessor"><null/></constructor-arg>
+    </bean>
+</beans>
diff --git a/kubernetes/aai/charts/champ/templates/configmap.yaml b/kubernetes/aai/charts/champ/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..8f48f19
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appconfig/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dynamic-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/dynamic/conf/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/aai/charts/champ/templates/deployment.yaml b/kubernetes/aai/charts/champ/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..a1a1d0a
--- /dev/null
@@ -0,0 +1,108 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+            - name: CONFIG_HOME
+              value: "/opt/app/champ-service/appconfig"
+            - name: GRAPHIMPL
+              value: "janus-deps"
+            - name: SERVICE_BEANS
+              value: "/opt/app/champ-service/dynamic/conf"
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /opt/app/champ-service/appconfig/champ-api.properties
+            name: {{ include "common.fullname" . }}-config
+            subPath: champ-api.properties
+          - mountPath: /opt/app/champ-service/appconfig/auth
+            name: {{ include "common.fullname" . }}-secrets
+          - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml
+            name: {{ include "common.fullname" . }}-dynamic-config
+            subPath: champ-beans.xml
+          - mountPath: /logs
+            name: {{ include "common.fullname" . }}-logs
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+            readOnly: true
+        - name: {{ include "common.fullname" . }}-config
+          configMap:
+            name: {{ include "common.fullname" . }}-configmap
+            items:
+            - key: champ-api.properties
+              path: champ-api.properties
+        - name: {{ include "common.fullname" . }}-secrets
+          secret:
+            secretName: {{ include "common.fullname" . }}-champ-secrets
+        - name: {{ include "common.fullname" . }}-dynamic-config
+          configMap:
+            name: {{ include "common.fullname" . }}-dynamic-configmap
+            items:
+            - key: champ-beans.xml
+              path: champ-beans.xml
+        - name: {{ include "common.fullname" . }}-logs
+          emptyDir: {}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/champ/templates/secrets.yaml b/kubernetes/aai/charts/champ/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..e939eb9
--- /dev/null
@@ -0,0 +1,22 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-champ-secrets
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/appconfig/auth/*").AsSecrets . | indent 2 }}
diff --git a/kubernetes/aai/charts/champ/templates/service.yaml b/kubernetes/aai/charts/champ/templates/service.yaml
new file mode 100644 (file)
index 0000000..93b0fd1
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.internalPort}}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort}}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/aai/charts/champ/values.yaml b/kubernetes/aai/charts/champ/values.yaml
new file mode 100644 (file)
index 0000000..91a1e52
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  readinessImage: readiness-check:1.0.0
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# application image
+image: onap/champ:1.2.0
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: false
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  name: champ
+  externalPort: 78
+  internalPort: 9522
+  nodePort: 78
+
+ingress:
+  enabled: false
+
+resources: {}
diff --git a/kubernetes/aai/charts/gizmo/.helmignore b/kubernetes/aai/charts/gizmo/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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/kubernetes/aai/charts/gizmo/Chart.yaml b/kubernetes/aai/charts/gizmo/Chart.yaml
new file mode 100644 (file)
index 0000000..4633b06
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+description: Gizmo service
+name: gizmo
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/resources/config/README.txt b/kubernetes/aai/charts/gizmo/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 b/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12
new file mode 100644 (file)
index 0000000..dbf4fca
Binary files /dev/null and b/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 differ
diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json b/kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json
new file mode 100644 (file)
index 0000000..d8b065e
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "roles": [
+    {
+      "name": "admin",
+      "functions": [
+        {
+          "name": "crud", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" }, { "name": "PATCH"} ]
+        }
+      ],
+
+      "users": [
+        {
+          "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 b/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12
new file mode 100644 (file)
index 0000000..dbf4fca
Binary files /dev/null and b/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 differ
diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore
new file mode 100644 (file)
index 0000000..9eec841
Binary files /dev/null and b/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore differ
diff --git a/kubernetes/aai/charts/gizmo/resources/config/crud-api.properties b/kubernetes/aai/charts/gizmo/resources/config/crud-api.properties
new file mode 100644 (file)
index 0000000..a86d472
--- /dev/null
@@ -0,0 +1,5 @@
+# CRUD-API configuration
+
+crud.async.request.timeout=60000
+crud.async.response.process.poll.interval=1000
+crud.collection.properties.key=properties
diff --git a/kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml b/kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml
new file mode 100644 (file)
index 0000000..04f1210
--- /dev/null
@@ -0,0 +1,35 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns:util="http://www.springframework.org/schema/util"
+         xsi:schemaLocation="
+                http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+               http://www.springframework.org/schema/util
+                http://www.springframework.org/schema/util/spring-util.xsd
+                ">
+
+     <bean id="champDao" class="org.onap.crud.dao.champ.ChampDao">
+         <constructor-arg name="champUrl" value="https://{{.Release.Name}}-champ.{{.Release.Namespace}}:9522/services/champ-service/v1/"/>
+         <constructor-arg name="certPassword" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10"/>
+     </bean>
+
+         <bean id="dataRouterDAO" class="org.onap.crud.dao.DataRouterDAO">
+         <constructor-arg name="url" value="https://data-router.{{.Release.Namespace}}:9502/services/champ-service/v1/"/>
+         <constructor-arg name="certPassword" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10"/>
+     </bean>
+
+     <!-- Synchronous Mode -->
+     <bean id="graphDataService" class="org.onap.crud.service.CrudGraphDataService" >
+         <constructor-arg name="dao" ref="champDao" />
+         <constructor-arg name="daoForGet" ref="champDao" /> <!--  Using champ for both types of API for now -->
+     </bean>
+
+     <bean id="crudRestService" class="org.onap.crud.service.CrudRestService" init-method="startup" >
+         <constructor-arg name="graphDataService" ref="graphDataService" />
+     </bean>
+
+     <bean id="aaiResourceService" class="org.onap.crud.service.AaiResourceService" init-method="startup" >
+         <constructor-arg name="graphDataService" ref="graphDataService" />
+     </bean>
+
+</beans>
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml b/kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml
new file mode 100644 (file)
index 0000000..9ad559c
--- /dev/null
@@ -0,0 +1,41 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+  #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+  paths:
+    - /var/log/onap/*/*/*/*.log
+    - /var/log/onap/*/*/*.log
+    - /var/log/onap/*/*.log
+  #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+  ignore_older: 48h
+  # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+  clean_inactive: 96h
+
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+output.logstash:
+  #List of logstash server ip addresses with port number.
+  #But, in our case, this will be the loadbalancer IP address.
+  #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
+  hosts: ["logstash.{{ .Release.Name }}-log:5044"]
+  #If enable will do load balancing among availabe Logstash, automatically.
+  loadbalance: true
+
+  #The list of root certificates for server verifications.
+  #If certificate_authorities is empty or not set, the trusted
+  #certificate authorities of the host system are used.
+  #ssl.certificate_authorities: $ssl.certificate_authorities
+
+  #The path to the certificate for SSL client authentication. If the certificate is not specified,
+  #client authentication is not available.
+  #ssl.certificate: $ssl.certificate
+
+  #The client certificate key used for client authentication.
+  #ssl.key: $ssl.key
+
+  #The passphrase used to decrypt an encrypted key stored in the configured key file
+  #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/aai/charts/gizmo/resources/config/log/logback.xml b/kubernetes/aai/charts/gizmo/resources/config/log/logback.xml
new file mode 100644 (file)
index 0000000..f63afd3
--- /dev/null
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+    <!--<jmxConfigurator /> -->
+    <!-- directory path for all other type logs -->
+    <property name="logDir" value="/var/log/onap" />
+    <property name="componentName" value="aai" />
+    <property name="subComponentName" value="aai-CRUD" />
+    <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+    <!--  default eelf log file names -->
+    <property name="generalLogName" value="application" />
+    <property name="errorLogName" value="error" />
+    <property name="metricsLogName" value="metrics" />
+    <property name="auditLogName" value="audit" />
+    <property name="debugLogName" value="debug" />
+    <property name="queueSize" value="256" />
+    <property name="maxFileSize" value="50MB" />
+    <property name="maxHistory" value="30" />
+    <property name="totalSizeCap" value="10GB" />
+    <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
+    <!-- Example evaluator filter applied against console appender -->
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <!-- ============================================================================ -->
+    <!-- EELF Appenders -->
+    <!-- ============================================================================ -->
+    <!-- The EELFAppender is used to record events to the general application
+       log -->
+    <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDirectory}/${generalLogName}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>${maxFileSize}</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <maxHistory>${maxHistory}</maxHistory>
+            <totalSizeCap>${totalSizeCap}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
+        <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <queueSize>${queueSize}</queueSize>
+        <appender-ref ref="EELF" />
+    </appender>
+    <!-- EELF Audit Appender. This appender is used to record audit engine
+       related logging events. The audit logger and appender are specializations
+       of the EELF application root logger and appender. This can be used to segregate
+       Policy engine events from other components, or it can be eliminated to record
+       these events as part of the application root log. -->
+    <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDirectory}/${auditLogName}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>${maxFileSize}</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <maxHistory>${maxHistory}</maxHistory>
+            <totalSizeCap>${totalSizeCap}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+        <queueSize>${queueSize}</queueSize>
+        <appender-ref ref="EELFAudit" />
+    </appender>
+    <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDirectory}/${metricsLogName}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>${maxFileSize}</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <maxHistory>${maxHistory}</maxHistory>
+            <totalSizeCap>${totalSizeCap}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+        <queueSize>${queueSize}</queueSize>
+        <appender-ref ref="EELFMetrics" />
+    </appender>
+    <appender name="EELFError" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDirectory}/${errorLogName}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>${maxFileSize}</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <maxHistory>${maxHistory}</maxHistory>
+            <totalSizeCap>${totalSizeCap}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+    </appender>
+    <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+        <queueSize>${queueSize}</queueSize>
+        <appender-ref ref="EELFError" />
+    </appender>
+    <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDirectory}/${debugLogName}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>${maxFileSize}</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <maxHistory>${maxHistory}</maxHistory>
+            <totalSizeCap>${totalSizeCap}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+        <queueSize>${queueSize}</queueSize>
+        <appender-ref ref="EELFDebug" />
+        <includeCallerData>true</includeCallerData>
+    </appender>
+    <!-- ============================================================================ -->
+    <!--  EELF loggers -->
+    <!-- ============================================================================ -->
+    <logger name="com.att.eelf" level="info" additivity="false">
+        <appender-ref ref="asyncEELF" />
+    </logger>
+    <logger name="com.att.eelf.security" level="info" additivity="false">
+        <appender-ref ref="asyncEELFSecurity" />
+    </logger>
+    <logger name="com.att.eelf.perf" level="info" additivity="false">
+        <appender-ref ref="asyncEELFPerformance" />
+    </logger>
+    <logger name="com.att.eelf.server" level="info" additivity="false">
+        <appender-ref ref="asyncEELFServer" />
+    </logger>
+    <logger name="com.att.eelf.policy" level="info" additivity="false">
+        <appender-ref ref="asyncEELFPolicy" />
+    </logger>
+    <logger name="com.att.eelf.debug" level="debug" additivity="false">
+        <appender-ref ref="asyncEELFDebug" />
+    </logger>
+    <logger name="com.att.eelf.audit" level="info" additivity="false">
+        <appender-ref ref="asyncEELFAudit" />
+    </logger>
+    <logger name="com.att.eelf.metrics" level="info" additivity="false">
+        <appender-ref ref="asyncEELFMetrics" />
+    </logger>
+    <logger name="com.att.eelf.error" level="info" additivity="false">
+        <appender-ref ref="asyncEELFError" />
+    </logger>
+    <!-- Spring related loggers -->
+    <logger name="org.springframework" level="WARN" />
+    <logger name="org.springframework.beans" level="WARN" />
+    <logger name="org.springframework.web" level="WARN" />
+    <logger name="com.blog.spring.jms" level="WARN" />
+    <!-- AJSC Services (bootstrap services) -->
+    <logger name="ajsc" level="WARN" />
+    <logger name="ajsc.RouteMgmtService" level="WARN" />
+    <logger name="ajsc.ComputeService" level="WARN" />
+    <logger name="ajsc.VandelayService" level="WARN" />
+    <logger name="ajsc.FilePersistenceService" level="WARN" />
+    <logger name="ajsc.UserDefinedJarService" level="WARN" />
+    <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
+    <logger name="ajsc.LoggingConfigurationService" level="WARN" />
+    <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
+       logging) -->
+    <logger name="ajsc.utils" level="WARN" />
+    <logger name="ajsc.utils.DME2Helper" level="WARN" />
+    <logger name="ajsc.filters" level="WARN" />
+    <logger name="ajsc.beans.interceptors" level="WARN" />
+    <logger name="ajsc.restlet" level="WARN" />
+    <logger name="ajsc.servlet" level="WARN" />
+    <logger name="com.att" level="INFO" />
+    <logger name="com.att.ajsc.csi.logging" level="WARN" />
+    <logger name="com.att.ajsc.filemonitor" level="WARN" />
+    <!-- CRUD Service loggers -->
+    <logger name="org.openecomp.crud" level="INFO" />
+    <!-- Other Loggers that may help troubleshoot -->
+    <logger name="net.sf" level="WARN" />
+    <logger name="org.apache" level="WARN" />
+    <logger name="org.apache.commons.httpclient" level="WARN" />
+    <logger name="org.apache.commons" level="WARN" />
+    <logger name="org.apache.coyote" level="WARN" />
+    <logger name="org.apache.jasper" level="WARN" />
+    <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
+       May aid in troubleshooting) -->
+    <logger name="org.apache.camel" level="WARN" />
+    <logger name="org.apache.cxf" level="WARN" />
+    <logger name="org.apache.camel.processor.interceptor" level="WARN" />
+    <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
+    <logger name="org.apache.cxf.service" level="WARN" />
+    <logger name="org.restlet" level="WARN" />
+    <logger name="org.apache.camel.component.restlet" level="WARN" />
+    <!-- logback internals logging -->
+    <logger name="ch.qos.logback.classic" level="WARN" />
+    <logger name="ch.qos.logback.core" level="WARN" />
+    <root level="INFO">
+        <appender-ref ref="asyncEELFDebug" />
+    </root>
+</configuration>
diff --git a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/templates/NOTES.txt b/kubernetes/aai/charts/gizmo/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..24371d0
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/aai/charts/gizmo/templates/configmap.yaml b/kubernetes/aai/charts/gizmo/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..b988d31
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-log-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-filebeat-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/templates/deployment.yaml b/kubernetes/aai/charts/gizmo/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..768c28b
--- /dev/null
@@ -0,0 +1,143 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+            - name: CONFIG_HOME
+              value: /opt/app/crud-service/config/
+            - name: KEY_STORE_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}-pass
+                  key: KEY_STORE_PASSWORD
+            - name: KEY_MANAGER_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}-pass
+                  key: KEY_MANAGER_PASSWORD
+            - name: SERVICE_BEANS
+              value: /opt/app/crud-service/dynamic/conf
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /opt/app/crud-service/config/crud-api.properties
+            subPath: crud-api.properties
+            name: {{ include "common.fullname" . }}-config
+          - mountPath: /opt/app/crud-service/config/model/
+            name: {{ include "common.fullname" . }}-model-config
+          - mountPath: /opt/app/crud-service/config/auth
+            name: {{ include "common.fullname" . }}-auth-secret
+          - mountPath: /opt/app/crud-service/dynamic/conf/crud-beans.xml
+            name: {{ include "common.fullname" . }}-config
+            subPath: crud-beans.xml
+          - mountPath: /var/log/onap
+            name: {{ include "common.fullname" . }}-logs
+          - mountPath: /opt/app/crud-api/bundleconfig/etc/logback.xml
+            name: {{ include "common.fullname" . }}-logback-config
+            subPath: logback.xml
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        - name: filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - mountPath: /usr/share/filebeat/filebeat.yml
+            name: filebeat-conf
+            subPath: filebeat.yml
+          - mountPath: /var/log/onap
+            name: {{ include "common.fullname" . }}-logs
+          - mountPath: /usr/share/filebeat/data
+            name: {{ include "common.fullname" . }}-data-filebeat
+
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+            readOnly: true
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name: filebeat-conf
+          configMap:
+            name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-logs
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-auth-secret
+          secret:
+            secretName: {{ include "common.fullname" . }}-auth
+        - name: {{ include "common.fullname" . }}-config
+          configMap:
+            name: {{ include "common.fullname" . }}-configmap
+            items:
+            - key: crud-api.properties
+              path: crud-api.properties
+            - key: crud-beans.xml
+              path: crud-beans.xml
+        - name: {{ include "common.fullname" . }}-logback-config
+          configMap:
+            name: {{ include "common.fullname" . }}-log-configmap
+            items:
+            - key: logback.xml
+              path: logback.xml
+        - name: {{ include "common.fullname" . }}-model-config
+          configMap:
+            name: {{ include "common.fullname" . }}-model-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/templates/secrets.yaml b/kubernetes/aai/charts/gizmo/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..f5d8ec8
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-auth
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ (.Files.Glob "resources/config/auth/*").AsSecrets | indent 2 }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-pass
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+type: Opaque
+data:
+  KEY_STORE_PASSWORD: {{ .Values.config.keyStorePassword | b64enc | quote }}
+  KEY_MANAGER_PASSWORD: {{ .Values.config.keyManagerPassword | b64enc | quote }}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/templates/service.yaml b/kubernetes/aai/charts/gizmo/templates/service.yaml
new file mode 100644 (file)
index 0000000..f88a4e9
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/aai/charts/gizmo/values.yaml b/kubernetes/aai/charts/gizmo/values.yaml
new file mode 100644 (file)
index 0000000..de84285
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# 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.
+
+#################################################################
+global:
+  nodePortPrefix: 302
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# application image
+image: "onap/gizmo:1.1-STAGING-latest"
+
+# application configuration
+config:
+  keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+  keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  name: crud-service
+  internalPort: 9520
+  nodePort: 66
+
+ingress:
+  enabled: false
+
+resources: {}
\ No newline at end of file
diff --git a/kubernetes/esr/.helmignore b/kubernetes/esr/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
index a80e699..b47761d 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: A Helm chart for Kubernetes
+description: ONAP External System Register
 name: esr
-version: 1.0.0
+version: 2.0.0
diff --git a/kubernetes/esr/charts/esr-gui/.helmignore b/kubernetes/esr/charts/esr-gui/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableAaiAaiResources }}
 apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: esr-filebeat-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
-#{{ end }}
+description: ONAP External System Register GUI
+name: esr-gui
+version: 2.0.0
diff --git a/kubernetes/esr/charts/esr-gui/templates/NOTES.txt b/kubernetes/esr/charts/esr-gui/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..dde49c1
--- /dev/null
@@ -0,0 +1,16 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ .Chart.Name }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/esr/charts/esr-gui/templates/deployment.yaml b/kubernetes/esr/charts/esr-gui/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..747df22
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+            - name: MSB_ADDR
+              value: {{ tpl .Values.msbaddr . }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/esr/charts/esr-gui/templates/service.yaml b/kubernetes/esr/charts/esr-gui/templates/service.yaml
new file mode 100644 (file)
index 0000000..6a274b5
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name }} 
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "aai-esr-gui",
+          "version": "v1",
+          "url": "/esr-gui",
+          "protocol": "UI",
+          "port": "{{ .Values.service.internalPort }}",
+          "visualRange":"1"
+      }
+      ]'
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/esr/charts/esr-gui/values.yaml b/kubernetes/esr/charts/esr-gui/values.yaml
new file mode 100644 (file)
index 0000000..f501399
--- /dev/null
@@ -0,0 +1,74 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/aai/esr-gui:v1.0.0
+pullPolicy: Always
+msbaddr: msb-iag.{{ include "common.namespace" . }}:80
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  name: esr-gui
+  internalPort: 8080
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
similarity index 68%
rename from kubernetes/esr/templates/esr-server-log-configmap.yaml
rename to kubernetes/esr/requirements.yaml
index 5a3ddf2..f639633 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableAaiAaiResources }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: esr-esrserver-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/esrserver/logback.xml").AsConfig . | indent 2 }}
-#{{ end }}
+dependencies:
+  - name: common
+    version: ~2.0.0
+    # local reference to common chart, as it is
+    # a part of this chart's package and will not
+    # be published independently to a repo (at this point)
+    repository: '@local'
diff --git a/kubernetes/esr/templates/NOTES.txt b/kubernetes/esr/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c1c46b1
--- /dev/null
@@ -0,0 +1,13 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ .Chart.Name }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/esr/templates/configmap.yaml b/kubernetes/esr/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..a0c82be
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-esr-filebeat
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-esr-esrserver-log
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/esrserver/logback.xml").AsConfig . | indent 2 }}
+
diff --git a/kubernetes/esr/templates/deployment.yaml b/kubernetes/esr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..c2322d3
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+            - name: MSB_ADDR
+              value: {{ tpl .Values.msbaddr . }}
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /home/esr/works/logs
+            name: esr-server-logs
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+      # side car containers
+        - name: filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - mountPath: /usr/share/filebeat/filebeat.yml
+            name: filebeat-conf
+            subPath: filebeat.yml
+          - mountPath: /home/esr/works/logs
+            name: esr-server-logs
+          - mountPath: /usr/share/filebeat/data
+            name: esr-server-filebeat
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: filebeat-conf
+          configMap:
+            name: {{ include "common.fullname" . }}-esr-filebeat
+        - name: esr-server-logs
+          emptyDir: {}
+        - name: esr-server-filebeat
+          emptyDir: {}
+        - name: esrserver-log
+          configMap:
+            name: {{ include "common.fullname" . }}-esr-esrserver-log
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/esr/templates/esr-esrgui-deployment.yaml b/kubernetes/esr/templates/esr-esrgui-deployment.yaml
deleted file mode 100644 (file)
index 92e26dc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# 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.
-
-#{{ if not .Values.disableesrgui }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: esr-esrgui
-  name: esr-esrgui
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: esr-esrgui
-  template:
-    metadata:
-      labels:
-        app: esr-esrgui
-      name: esr-esrgui
-    spec:
-      containers:
-      - image: {{ .Values.esrgui.image }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: esr-esrgui
-        env:
-        - name: MSB_ADDR
-          value: {{ tpl .Values.msbaddr . }}
-        ports:
-        - containerPort: {{ .Values.esrgui.port }}
-        readinessProbe:
-          tcpSocket:
-            port: 8080
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/esr/templates/esr-esrserver-deployment.yaml b/kubernetes/esr/templates/esr-esrserver-deployment.yaml
deleted file mode 100644 (file)
index 3f00edc..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# 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.
-
-#{{ if not .Values.disableUuiUui }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: esr-esrserver
-  name: esr-esrserver
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: esr-esrserver
-  template:
-    metadata:
-      labels:
-        app: esr-esrserver
-      name: esr-esrserver
-    spec:
-      containers:
-      - name: esr-esrserver
-        image: {{ .Values.esrserver.image }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        env:
-        - name: MSB_ADDR
-          value: {{ tpl .Values.msbaddr . }}
-        volumeMounts:
-        - name: localtime
-          mountPath: /etc/localtime
-          readOnly: true
-        - mountPath: /home/esr/works/logs
-          name: esr-server-logs
-        ports:
-        - containerPort: {{ .Values.esrserver.port }}
-        readinessProbe:
-          tcpSocket:
-            port: {{ .Values.esrserver.port }}
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: filebeat-onap-esr-server
-        image: {{ .Values.filebeat.image }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          subPath: filebeat.yml
-          name: filebeat-conf
-        - mountPath: /home/esr/works/logs
-          name: esr-server-logs
-        - mountPath: /usr/share/filebeat/data
-          name: esr-server-filebeat
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: filebeat-conf
-        configMap:
-          name: esr-filebeat-configmap
-      - name: esr-server-logs
-        emptyDir: {}
-      - name: esr-server-filebeat
-        emptyDir: {}
-#{{ end }}
similarity index 53%
rename from kubernetes/esr/templates/all-services.yaml
rename to kubernetes/esr/templates/service.yaml
index ff6bd95..312a7bd 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableEsrServer }}
 apiVersion: v1
 kind: Service
 metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
   labels:
-    app: esr-esrserver
-  name: esr-esrserver
-  namespace: "{{ .Values.nsPrefix }}"
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
   annotations:
     msb.onap.org/service-info: '[
       {
@@ -27,42 +29,15 @@ metadata:
           "version": "v1",
           "url": "/api/aai-esr-server/v1",
           "protocol": "REST",
-          "port": "{{.Values.esrserver.port}}",
+          "port": "{{.Values.service.internalPort}}",
           "enable_ssl": true,
           "visualRange":"1"
       }
       ]'
 spec:
   ports:
-  - name: esr-esrserver
-    port: {{.Values.esrserver.port}}
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
   selector:
-    app: esr-esrserver
-#{{ end }}
-#{{ if not .Values.disableEsrGui }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: esr-esrgui
-  name: esr-esrgui
-  namespace: "{{ .Values.nsPrefix }}"
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "aai-esr-gui",
-          "version": "v1",
-          "url": "/esr-gui",
-          "protocol": "UI",
-          "port": "{{.Values.esrgui.port}}",
-          "visualRange":"1"
-      }
-      ]'
-spec:
-  ports:
-  - name: esr-esrgui
-    port: {{.Values.esrgui.port}}
-  selector:
-    app: esr-esrgui
-#{{ end }}
\ No newline at end of file
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
index 82aa334..3af4917 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-nsPrefix: onap
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+subChartsOnly:
+  enabled: true
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/aai/esr-server:v1.0.0
 pullPolicy: Always
-nodePortPrefix: 302
-msbaddr: msb-iag.{{ .Values.nsPrefix }}:80
-esrserver:
-  image: nexus3.onap.org:10001/onap/aai/esr-server:v1.0.0
-  port: 9518
-  replicas: 1
-esrgui:
-  image: nexus3.onap.org:10001/onap/aai/esr-gui:v1.0.0
-  port: 8080
-  replicas: 1
-filebeat:
-  image: docker.elastic.co/beats/filebeat:5.5.0
+msbaddr: msb-iag.{{ include "common.namespace" . }}:80
 
+# application configuration
 config:
   logstashServiceName: log-ls
   logstashPort: 5044
 
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  name: esr
+  internalPort: 9518
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
index 841d349..86442a2 100644 (file)
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: {{ .Values.service.name }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
index 841d349..86442a2 100644 (file)
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: {{ .Values.service.name }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
index e438f10..3e4a786 100644 (file)
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: {{ .Values.service.name }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
index e438f10..3e4a786 100644 (file)
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: {{ .Values.service.name }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
index 4b2d46a..d440b68 100644 (file)
@@ -49,7 +49,7 @@ dependencies:
     repository: '@local'
     condition: dcaegen2.enabled
   - name: esr
-    version: ~1.0.0
+    version: ~2.0.0
     repository: '@local'
     condition: esr.enabled
   - name: log