From: Mandeep Khinda Date: Fri, 22 Sep 2017 17:59:30 +0000 (+0000) Subject: Merge "synching up SO 1.1" X-Git-Tag: 2.0.0-ONAP~635 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=dbadfd8db0b7d1da74bda67f968d3d1393d3e23e;hp=c6dba8f5d2f7aef6b2a876b05b8c12301dd71f93;p=oom.git Merge "synching up SO 1.1" --- diff --git a/kubernetes/aai/templates/aai-resources-deployment.yaml b/kubernetes/aai/templates/aai-resources-deployment.yaml index c61bc6f0a6..c874e39995 100644 --- a/kubernetes/aai/templates/aai-resources-deployment.yaml +++ b/kubernetes/aai/templates/aai-resources-deployment.yaml @@ -37,7 +37,7 @@ spec: "imagePullPolicy": "{{ .Values.pullPolicy }}", "name": "aai-resources-readiness" } - ]' + ]' spec: containers: - name: aai-resources @@ -62,8 +62,6 @@ spec: name: aai-resources-logs - mountPath: /var/chef/aai-data/ name: aai-data - - mountPath: /docker-entrypoint.sh - name: entrypoint-override ports: - containerPort: 8447 readinessProbe: @@ -81,9 +79,6 @@ spec: - name: aai-data hostPath: path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/" - - name: entrypoint-override - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-resources/docker-entrypoint.sh" restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" diff --git a/kubernetes/aai/templates/aai-traversal-deployment.yaml b/kubernetes/aai/templates/aai-traversal-deployment.yaml index ec387b04e8..d430479664 100644 --- a/kubernetes/aai/templates/aai-traversal-deployment.yaml +++ b/kubernetes/aai/templates/aai-traversal-deployment.yaml @@ -39,7 +39,7 @@ spec: "imagePullPolicy": "{{ .Values.pullPolicy }}", "name": "aai-traversal-readiness" } - ]' + ]' spec: containers: - name: aai-traversal @@ -56,6 +56,8 @@ spec: value: /var/chef/aai-data/environments - name: CHEF_GIT_URL value: http://gerrit.onap.org/r/aai + - name: RESOURCES_HOSTNAME + value: aai-resources.{{ .Values.nsPrefix }}-aai volumeMounts: - mountPath: /etc/localtime name: localtime @@ -64,8 +66,6 @@ spec: name: aai-traversal-logs - mountPath: /var/chef/aai-data/ name: aai-data - - mountPath: /docker-entrypoint.sh - name: entrypoint-override ports: - containerPort: 8446 readinessProbe: @@ -83,9 +83,6 @@ spec: - name: aai-data hostPath: path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/" - - name: entrypoint-override - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-traversal/docker-entrypoint.sh" restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" diff --git a/kubernetes/aai/templates/gremlin-deployment.yaml b/kubernetes/aai/templates/gremlin-deployment.yaml deleted file mode 100644 index 75b3e92437..0000000000 --- a/kubernetes/aai/templates/gremlin-deployment.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: gremlin - namespace: "{{ .Values.nsPrefix }}-aai" -spec: - selector: - matchLabels: - app: gremlin - template: - metadata: - labels: - app: gremlin - name: gremlin - annotations: - pod.beta.kubernetes.io/init-containers: '[ - { - "args": [ - "--container-name", - "hbase" - ], - "command": [ - "/root/ready.py" - ], - "env": [ - { - "name": "NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "image": "{{ .Values.image.readiness }}", - "imagePullPolicy": "{{ .Values.pullPolicy }}", - "name": "gremlin-readiness" - } - ]' - spec: - hostname: gremlin - containers: - - name: gremlin - image: {{ .Values.image.gremlinServerImage }} - imagePullPolicy: {{ .Values.pullPolicy }} - env: - - name: SERVER_HOST - value: "hbase.{{ .Values.nsPrefix }}-aai" - - name: SERVER_TABLE - value: aaigraph.dev - - name: GREMLIN_HOST - value: "gremlin" - ports: - - containerPort: 8182 - readinessProbe: - tcpSocket: - port: 8182 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - name: localtime - mountPath: /etc/localtime - readOnly: true - volumes: - - name: localtime - hostPath: - path: /etc/localtime - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" diff --git a/kubernetes/config/docker/init/config-init.sh b/kubernetes/config/docker/init/config-init.sh index 9217d2cd68..29167bf844 100755 --- a/kubernetes/config/docker/init/config-init.sh +++ b/kubernetes/config/docker/init/config-init.sh @@ -51,6 +51,9 @@ mkdir -p /config-init/$NAMESPACE/aai/data-router/logs/ mkdir -p /config-init/$NAMESPACE/mso/mariadb/data mkdir -p /config-init/$NAMESPACE/clamp/mariadb/data mkdir -p /config-init/$NAMESPACE/log/elasticsearch/data +mkdir -p /config-init/$NAMESPACE/consul/consul-agent-config/bin +mkdir -p /config-init/$NAMESPACE/consul/consul-agent-config/scripts +mkdir -p /config-init/$NAMESPACE/consul/consul-server-config echo "Setting permissions to container writeable directories" chmod -R 777 /config-init/$NAMESPACE/sdc/logs/ @@ -73,6 +76,7 @@ echo "Substituting configuration parameters" # replace the default 'onap' namespace qualification of K8s hostnames within the config files find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/\.onap-/\.$NAMESPACE-/g" {} \; +find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/kubectl -n onap/kubectl -n $NAMESPACE/g" {} \; # set the ubuntu 14 image find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/UBUNTU_14_IMAGE_NAME_HERE/$OPENSTACK_UBUNTU_14_IMAGE/g" {} \; # set the openstack public network uuid diff --git a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/attributes/gremlin-server-config.rb b/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/attributes/gremlin-server-config.rb deleted file mode 100644 index 97fa6fd286..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/attributes/gremlin-server-config.rb +++ /dev/null @@ -1 +0,0 @@ -node.default["aai-traversal-config"]["AAI_GREMLIN_SERVER_CONFIG_HOST_LIST"] = '[localhost]' diff --git a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/recipes/gremlin-server-config.rb b/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/recipes/gremlin-server-config.rb deleted file mode 100644 index 2af775b324..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/recipes/gremlin-server-config.rb +++ /dev/null @@ -1,11 +0,0 @@ -['gremlin-server-config.yaml'].each do |file| - template "#{node['aai-traversal-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do - source "aai-traversal-app-config/gremlin-server-config.yaml" - owner "aaiadmin" - group "aaiadmin" - mode "0644" - variables( -:AAI_GREMLIN_SERVER_CONFIG_HOST_LIST => node["aai-traversal-config"]["AAI_GREMLIN_SERVER_CONFIG_HOST_LIST"] - ) - end -end \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/gremlin-server-config.yaml b/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/gremlin-server-config.yaml deleted file mode 100644 index 23637a8fd4..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/gremlin-server-config.yaml +++ /dev/null @@ -1,3 +0,0 @@ -hosts: <%= @AAI_GREMLIN_SERVER_CONFIG_HOST_LIST %> -port: 8182 -serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 } \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/runlist-aai-traversal.json b/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/runlist-aai-traversal.json index 8baa3e4a7b..98c61a74e3 100644 --- a/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/runlist-aai-traversal.json +++ b/kubernetes/config/docker/init/src/config/aai/aai-config/cookbooks/aai-traversal/runlist-aai-traversal.json @@ -5,7 +5,6 @@ "recipe[aai-traversal-config::aaiEventDMaaPPublisher]", "recipe[aai-traversal-config::titan-cached]", "recipe[aai-traversal-config::titan-realtime]", - "recipe[aai-traversal-config::gremlin-server-config]", "recipe[aai-traversal-config::aai-traversal-config]", "recipe[aai-traversal-config::aai-preferredRoute]" ] diff --git a/kubernetes/config/docker/init/src/config/aai/aai-data/environments/simpledemo.json b/kubernetes/config/docker/init/src/config/aai/aai-data/environments/simpledemo.json index 5c64d250c9..99edba2bed 100644 --- a/kubernetes/config/docker/init/src/config/aai/aai-data/environments/simpledemo.json +++ b/kubernetes/config/docker/init/src/config/aai/aai-data/environments/simpledemo.json @@ -5,7 +5,7 @@ "aai-traversal-auth" : "= 1.0.0", "aai-traversal-config" : "= 1.0.0", "aai-traversal-process" : "= 1.0.0", - + "aai-resources-auth" : "= 1.0.0", "aai-resources-config" : "= 1.0.0", "aai-resources-process" : "= 1.0.0" @@ -57,7 +57,6 @@ "TXN_ZOOKEEPER_QUORUM": "hbase.onap-aai", "TXN_ZOOKEEPER_PROPERTY_CLIENTPORT": "2181", "TXN_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase", - "AAI_GREMLIN_SERVER_CONFIG_HOST_LIST" : "[gremlin.onap-aai]", "AAI_WORKLOAD_PREFERRED_ROUTE_KEY": "MR1", "STORAGE_HOSTNAME": "hbase.onap-aai", "STORAGE_HBASE_TABLE": "aaigraph.dev", @@ -104,7 +103,7 @@ "AAI_NOTIFICATION_EVENT_DEFAULT_SEQUENCE_NUMBER": "0", "AAI_NOTIFICATION_EVENT_DEFAULT_SEVERITY": "NORMAL", "AAI_NOTIFICATION_EVENT_DEFAULT_VERSION": "v11", - "AAI_NOTIFICATION_CURRENT_VERSION": "v11", + "AAI_NOTIFICATION_CURRENT_VERSION": "v11", "RESOURCE_VERSION_ENABLE_FLAG": "true", "TXN_HBASE_TABLE_NAME": "aailogging.dev", "TXN_ZOOKEEPER_QUORUM": "hbase.onap-aai", diff --git a/kubernetes/config/docker/init/src/config/aai/aai-data/environments/solo.json b/kubernetes/config/docker/init/src/config/aai/aai-data/environments/solo.json index fb8e91b90c..ac83173908 100644 --- a/kubernetes/config/docker/init/src/config/aai/aai-data/environments/solo.json +++ b/kubernetes/config/docker/init/src/config/aai/aai-data/environments/solo.json @@ -5,7 +5,7 @@ "aai-traversal-auth" : "= 1.0.0", "aai-traversal-config" : "= 1.0.0", "aai-traversal-process" : "= 1.0.0", - + "aai-resources-auth" : "= 1.0.0", "aai-resources-config" : "= 1.0.0", "aai-resources-process" : "= 1.0.0" @@ -56,7 +56,6 @@ "TXN_ZOOKEEPER_QUORUM": "localhost", "TXN_ZOOKEEPER_PROPERTY_CLIENTPORT": "2181", "TXN_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase", - "AAI_GREMLIN_SERVER_CONFIG_HOST_LIST" : "[localhost]", "AAI_WORKLOAD_PREFERRED_ROUTE_KEY": "MR1", "STORAGE_HOSTNAME": "localhost", "STORAGE_HBASE_TABLE": "aaigraph.dev", diff --git a/kubernetes/config/docker/init/src/config/aai/aai-resources/docker-entrypoint.sh b/kubernetes/config/docker/init/src/config/aai/aai-resources/docker-entrypoint.sh deleted file mode 100755 index 059ef45eb2..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/aai-resources/docker-entrypoint.sh +++ /dev/null @@ -1,56 +0,0 @@ -### -# ============LICENSE_START======================================================= -# org.openecomp.aai -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# 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. -# ============LICENSE_END========================================================= -### - -cd /var/chef; - -CHEF_CONFIG_REPO=${CHEF_CONFIG_REPO:-aai-config}; - -CHEF_GIT_URL=${CHEF_GIT_URL:-http://nexus.onap.org/r/aai}; - -CHEF_CONFIG_GIT_URL=${CHEF_CONFIG_GIT_URL:-$CHEF_GIT_URL}; -CHEF_DATA_GIT_URL=${CHEF_DATA_GIT_URL:-$CHEF_GIT_URL}; - -if [ ! -d "aai-config" ]; then - - git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_CONFIG_GIT_URL}/${CHEF_CONFIG_REPO}.git aai-config || { - echo "Error: Unable to clone the aai-config repo with url: ${CHEF_GIT_URL}/${CHEF_CONFIG_REPO}.git"; - exit; - } - - (cd aai-config/cookbooks/aai-resources/ && \ - for f in $(ls); do mv $f ../; done && \ - cd ../ && rmdir aai-resources); -fi - - -chef-solo \ - -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \ - -j /var/chef/aai-config/cookbooks/runlist-aai-resources.json \ - -E ${AAI_CHEF_ENV}; - -# TODO: If this runs, startup hangs and logs errors indicating aaiGraph.dev already exists in HBASE. -# Commenting out until we figure out whether it is needed or not. -# /opt/app/aai-resources/bin/createDBSchema.sh || { -# echo "Error: Unable to create the db schema, please check if the hbase host is configured and up"; -# exit; -# } - - -java -cp ${CLASSPATH}:/opt/app/commonLibs/*:/opt/app/aai-resources/etc:/opt/app/aai-resources/lib/*:/opt/app/aai-resources/extJars/logback-access-1.1.7.jar:/opt/app/aai-resources/extJars/logback-core-1.1.7.jar:/opt/app/aai-resources/extJars/aai-core-${AAI_CORE_VERSION}.jar -server -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:+DisableExplicitGC -verbose:gc -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseBiasedLocking -XX:ParallelGCThreads=4 -XX:LargePageSizeInBytes=128m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dsun.net.inetaddr.ttl=180 -XX:+HeapDumpOnOutOfMemoryError -Dhttps.protocols=TLSv1.1,TLSv1.2 -DSOACLOUD_SERVICE_VERSION=1.0.1 -DAJSC_HOME=/opt/app/aai-resources/ -DAJSC_CONF_HOME=/opt/app/aai-resources/bundleconfig -DAJSC_SHARED_CONFIG=/opt/app/aai-resources/bundleconfig -DAFT_HOME=/opt/app/aai-resources -DAAI_CORE_VERSION=${AAI_CORE_VERSION} -Daai-core.version=${AAI_CORE_VERSION} -Dlogback.configurationFile=/opt/app/aai-resources/bundleconfig/etc/logback.xml -Xloggc:/opt/app/aai-resources/logs/ajsc-jetty/gc/graph-query_gc.log com.att.ajsc.runner.Runner context=/ port=8087 sslport=8447 \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/aai/aai-traversal/docker-entrypoint.sh b/kubernetes/config/docker/init/src/config/aai/aai-traversal/docker-entrypoint.sh deleted file mode 100755 index 60268f64a4..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/aai-traversal/docker-entrypoint.sh +++ /dev/null @@ -1,47 +0,0 @@ -### -# ============LICENSE_START======================================================= -# org.openecomp.aai -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# 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. -# ============LICENSE_END========================================================= -### - -cd /var/chef; - -CHEF_CONFIG_REPO=${CHEF_CONFIG_REPO:-aai-config}; - -CHEF_GIT_URL=${CHEF_GIT_URL:-http://nexus.onap.org/r/aai}; - -CHEF_CONFIG_GIT_URL=${CHEF_CONFIG_GIT_URL:-$CHEF_GIT_URL}; -CHEF_DATA_GIT_URL=${CHEF_DATA_GIT_URL:-$CHEF_GIT_URL}; - -if [ ! -d "aai-config" ]; then - - git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_CONFIG_GIT_URL}/${CHEF_CONFIG_REPO}.git aai-config || { - echo "Error: Unable to clone the aai-config repo with url: ${CHEF_GIT_URL}/${CHEF_CONFIG_REPO}.git"; - exit; - } - - (cd aai-config/cookbooks/aai-traversal/ && \ - for f in $(ls); do mv $f ../; done && \ - cd ../ && rmdir aai-traversal); -fi - -chef-solo \ - -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \ - -j /var/chef/aai-config/cookbooks/runlist-aai-traversal.json \ - -E ${AAI_CHEF_ENV}; - -java -cp ${CLASSPATH}:/opt/app/commonLibs/*:/opt/app/aai-traversal/etc:/opt/app/aai-traversal/lib/*:/opt/app/aai-traversal/extJars/logback-access-1.1.7.jar:/opt/app/aai-traversal/extJars/logback-core-1.1.7.jar:/opt/app/aai-traversal/extJars/aai-core-${AAI_CORE_VERSION}.jar -server -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:+DisableExplicitGC -verbose:gc -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseBiasedLocking -XX:ParallelGCThreads=4 -XX:LargePageSizeInBytes=128m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dsun.net.inetaddr.ttl=180 -XX:+HeapDumpOnOutOfMemoryError -Dhttps.protocols=TLSv1.1,TLSv1.2 -DSOACLOUD_SERVICE_VERSION=1.0.1 -DAJSC_HOME=/opt/app/aai-traversal/ -DAJSC_CONF_HOME=/opt/app/aai-traversal/bundleconfig -DAJSC_SHARED_CONFIG=/opt/app/aai-traversal/bundleconfig -DAFT_HOME=/opt/app/aai-traversal -DAAI_CORE_VERSION=${AAI_CORE_VERSION} -Daai-core.version=${AAI_CORE_VERSION} -Dlogback.configurationFile=/opt/app/aai-traversal/bundleconfig/etc/logback.xml -Xloggc:/opt/app/aai-traversal/logs/ajsc-jetty/gc/graph-query_gc.log com.att.ajsc.runner.Runner context=/ port=8086 sslport=8446 \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/aai/data-router/appconfig/model/aai_oxm_v11.xml b/kubernetes/config/docker/init/src/config/aai/data-router/appconfig/model/aai_oxm_v11.xml new file mode 100644 index 0000000000..ecf163e097 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/aai/data-router/appconfig/model/aai_oxm_v11.xml @@ -0,0 +1,6307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-data-router-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-data-router-health.json new file mode 100644 index 0000000000..a60203694a --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-data-router-health.json @@ -0,0 +1,14 @@ +{ + "service": { + "name": "A&AI Synapse Data Routing Service", + "checks": [ + { + "id": "data-router-process", + "name": "Synapse Presence", + "script": "/consul/config/scripts/data-router-script.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-model-loader-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-model-loader-health.json new file mode 100644 index 0000000000..4e2e305afd --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-model-loader-health.json @@ -0,0 +1,14 @@ +{ + "service": { + "name": "A&AI Model Loader", + "checks": [ + { + "id": "model-loader-process", + "name": "Model Loader Presence", + "script": "/consul/config/scripts/model-loader-script.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json new file mode 100644 index 0000000000..c74fe8af26 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json @@ -0,0 +1,33 @@ +{ + "service": { + "name": "A&AI Search Data Service", + "checks": [ + { + "id": "elasticsearch", + "name": "Search Data Service Document Store", + "http": "http://elasticsearch.onap-aai:9200/_cat/indices?v", + "interval": "15s", + "timeout": "1s" + }, + { + "id": "elasticsearch-write-health", + "name": "Search Data Service Document Store Write Test", + "script": "/consul/config/scripts/aai-search-storage-write-script.sh", + "interval": "60s" + }, + { + "id": "search-data-service-availability", + "name": "Search Data Service Availability", + "script": "curl -k --cert /consul/config/bin/client-cert-onap.crt.pem --cert-type PEM --key /consul/config/bin/client-cert-onap.key.pem --key-type PEM https://search-data-service.onap-aai:9509/services/search-data-service/v1/jaxrsExample/jaxrs-services/echo/up 2>&1 | grep 'Up'", + "interval": "15s" + }, + { + "id": "search-data-service-api", + "name": "Search Data Service Operational Test", + "script": "/consul/config/scripts/search-data-service-availability.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-services-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-services-health.json new file mode 100644 index 0000000000..35f9371e8d --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-services-health.json @@ -0,0 +1,53 @@ +{ + "service": { + "name": "Active and Available Inventory", + "checks": [ + { + "id": "aai-service", + "name": "Core A&AI", + "http": "https://aai-service.onap-aai:8443/aai/util/echo", + "header": { + "Authorization": ["Basic QUFJOkFBSQ=="], + "X-TransactionId": ["ConsulHealthCheck"], + "X-FromAppId": ["healthcheck"] + }, + "tls_skip_verify": true, + "interval": "15s", + "timeout": "1s" + }, + { + "id": "aai-resources", + "name": "Resources Microservice", + "http": "https://aai-resources.onap-aai:8447/aai/util/echo", + "header": { + "Authorization": ["Basic QUFJOkFBSQ=="], + "X-TransactionId": ["ConsulHealthCheck"], + "X-FromAppId": ["healthcheck"] + }, + "tls_skip_verify": true, + "interval": "15s", + "timeout": "1s" + }, + { + "id": "aai-traversal", + "name": "Traversal Microservice", + "http": "https://aai-traversal.onap-aai:8446/aai/util/echo", + "header": { + "Authorization": ["Basic QUFJOkFBSQ=="], + "X-TransactionId": ["ConsulHealthCheck"], + "X-FromAppId": ["healthcheck"] + }, + "tls_skip_verify": true, + "interval": "15s", + "timeout": "1s" + }, + { + "id": "gremlin-server", + "name": "Graph Data Store", + "script": "/consul/config/scripts/gremlin-script.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-sparky-be-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-sparky-be-health.json new file mode 100644 index 0000000000..6af58dbf4f --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-sparky-be-health.json @@ -0,0 +1,14 @@ +{ + "service": { + "name": "A&AI UI Backend Service", + "checks": [ + { + "id": "sparky-be-process", + "name": "UI Backend Presence", + "script": "/consul/config/scripts/sparky-be-script.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-tabular-backend-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-tabular-backend-health.json new file mode 100644 index 0000000000..f76b33b3d8 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-tabular-backend-health.json @@ -0,0 +1,14 @@ +{ + "service": { + "name": "A&AI Tabular Data Store", + "checks": [ + { + "id": "tabular-backend", + "name": "Tabular Data Store Operational Test", + "script": "/consul/config/scripts/tabular-db-availability.sh", + "interval": "15s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.crt.pem b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.crt.pem new file mode 100644 index 0000000000..5696aa3570 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.crt.pem @@ -0,0 +1,25 @@ +Bag Attributes + friendlyName: tomcat + localKeyID: 54 69 6D 65 20 31 34 39 33 33 32 33 39 32 32 37 35 31 +subject=/C=CA/ST=Ontario/L=Ottawa/O=ONAP/OU=ONAP/CN=ONAP +issuer=/C=CA/ST=Ontario/L=Ottawa/O=ONAP/OU=ONAP/CN=ONAP +-----BEGIN CERTIFICATE----- +MIIDWTCCAkGgAwIBAgIERWHcIzANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJD +QTEQMA4GA1UECBMHT250YXJpbzEPMA0GA1UEBxMGT3R0YXdhMQ0wCwYDVQQKEwRP +TkFQMQ0wCwYDVQQLEwRPTkFQMQ0wCwYDVQQDEwRPTkFQMB4XDTE3MDQyNzIwMDUz +N1oXDTM3MDExMjIwMDUzN1owXTELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFy +aW8xDzANBgNVBAcTBk90dGF3YTENMAsGA1UEChMET05BUDENMAsGA1UECxMET05B +UDENMAsGA1UEAxMET05BUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AJsQpjB5U0exZHWKVt6xDzmBBhLiAtv7Qb8zsbAcIZPxuKsieOJykWDCaf+Ip7oe ++b86nf4LmKrNm4KMsDNnlU7Bg7+3HFa7m+tZgfILORv2HPMRXgvcqPFr1dxgTBkp +xtlcGXHhA8oBpmqTmOCitE+ngVH+FBVxN93aHEDz+Dgc06PyzoP/xWI0GjvlOsv/ +qZeXCj6K4Hpu/FSPNk06Piq9M+rDwUMuyaRtY9FWjYMvkMCrRvlZUoAasrC0BGyR +UAboHdk5aW3AZ0cVR6NMSlELcvCUFqzacAOWLgffX3b5vhkOaAsmnnzmxANV6s0t +SqrD6Mmjg5OcYJW4VFKrwjUCAwEAAaMhMB8wHQYDVR0OBBYEFNji+IU70Qgptn4i +boq/rOKNAg8tMA0GCSqGSIb3DQEBCwUAA4IBAQBc5mJLeeUUzJ4MujZjn0DS3Lvv +THJTE54Id1euT3ddzfX3htF0Ewd90YzmLuj1y8r8PXj7b/8Bq+cvoKbmJ42c8h3X +If0tqde+gYWx1X3NAWHwz00Cje9R0KY4Bx1Cvr39jTw/ESnuSQDKPHBnn8WyAS9K +08ZhvrVSK54d3U7tDVut9UVva8Scdi12utTAWaOIlusLo3bU9Z6t+tgg7AnQBYc0 +N9oCMbq/MACFlLSdc1J6NITYS8XHY2RS8u88eLbWkCcEEx1glYz/PMX3+V1Ow9Uy +MjenEx8ifl96ZSOe9XsI2gl2TCaevCY/QuREu4LZB9XmO0gncH7gF5w9Bw2b +-----END CERTIFICATE----- diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.key.pem b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.key.pem new file mode 100644 index 0000000000..c7e386e55f --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.key.pem @@ -0,0 +1,32 @@ +Bag Attributes + friendlyName: tomcat + localKeyID: 54 69 6D 65 20 31 34 39 33 33 32 33 39 32 32 37 35 31 +Key Attributes: +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCbEKYweVNHsWR1 +ilbesQ85gQYS4gLb+0G/M7GwHCGT8birInjicpFgwmn/iKe6Hvm/Op3+C5iqzZuC +jLAzZ5VOwYO/txxWu5vrWYHyCzkb9hzzEV4L3Kjxa9XcYEwZKcbZXBlx4QPKAaZq +k5jgorRPp4FR/hQVcTfd2hxA8/g4HNOj8s6D/8ViNBo75TrL/6mXlwo+iuB6bvxU +jzZNOj4qvTPqw8FDLsmkbWPRVo2DL5DAq0b5WVKAGrKwtARskVAG6B3ZOWltwGdH +FUejTEpRC3LwlBas2nADli4H3192+b4ZDmgLJp585sQDVerNLUqqw+jJo4OTnGCV +uFRSq8I1AgMBAAECggEANFs6wcM1S0+qC8XZ7vb5nQDjfByzunLrkBN0O3JEJB/J +qn7JMixcyb7a61zIxR8QVHEGR3DC62jgyQOXusOOtjjAs0qwVtihnKVsKr1/WuGO +hMOobXjj0iAG5ZHeH+DrMxjVvo2rKdnExtdvFunY18xG7dhMD7Fam525THUTql4K +yxhT7X6MrfS1eFjbR6oAIGNjoNTwyyEjEm4yvHO3PnG2NeyIeu7zIO2k+GimAAXT +tN3AK30lmr3+35k6o+XQAhDE4/6msn6jBVSdLfK35ATFGwrojD0bCgALR4SUNEyd +i33nuNLGyeI7DPWbqmjyWQW9uWLFJD85We2HzqBZQQKBgQDIrJ4PLvYE75dFWnSa +lBr1HZbl/x5mP56MVEiwTabRbUsJoXKlX44lm9hwQaPbuoUAflb1ZtNKbyiRVsuN +Ft5RToU9PWXyFtc2eyLCJToxHI4MhsuGRAaEeic5+l12wdpRxl74eeXdKJK4P/iU +8wdhSxDG2ekkj6lyye5l5iwcBwKBgQDF0Pptcs+yPCz9FRqCmHT/I4QTK1VSD6mW +F2Yd2KEUa4aocIb+L56ghJfYR+enIe9hHmb0ulomJaLLTicZJk6ffDfaQpCFBiS7 +BirDqHX8zlnBHePrBzZPyA5EfGMLxlP4uUk4g28JMFBJaZTEXAnQLUH0mIm0o0YR +mbsaVo/Y4wKBgFsG8iuxAaf7hoLPJVV5GUFWyrxJnWCEO0csdEyE7MbS7NbRhU++ +qJwmtWc2Xz2svegbZxaqLe31vlEvLeYyGWaIV6gP0c6ezcDI2lt2x46/hS/pdSjS +cqJlRqXmC79y77VoZmwP31USsnshiYEHPLHFeza4YilTgWmwb5OJdTjBAoGBAJBC +0P7UhedjvyNqKoUnDdurWPxp07Ueuvw8YDpP61jq+a8JMUlaDQLe76XI+oWGV/6p +n0fGR0weklRV0Gmk6B2jB1BizuZUDqFd4/4ActtE2WvekoKqJc+VA+KqG8lQf5iZ +924BXA6Fb2e6WcXBoV5yQvFP9M0JbWYUiMCydAElAoGBAKof78r8POfTPq9fQA9I +0zsQGnxqnSqyIu5yobM3GyXHBPOKdevlxyXxuMnGTr7upSNZrDrrA+f5Czlu7Fas +qdt/5PmqYQjRsVoHNQFatUzHWwx2vU2Pr1jBpZFBpnjnLwn3A35+UEWn13nCjkla +TrDniEcyId4ya5cMLDnM7Zgw +-----END PRIVATE KEY----- diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/kubectl b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/kubectl new file mode 100644 index 0000000000..d53ce5f7f2 Binary files /dev/null and b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/kubectl differ diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/model-loader.properties b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/model-loader.properties new file mode 100644 index 0000000000..b2db044417 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/model-loader.properties @@ -0,0 +1,23 @@ +# Model Loader Distribution Client Configuration +ml.distribution.ACTIVE_SERVER_TLS_AUTH=false +ml.distribution.ASDC_ADDRESS=c2.vm1.sdc.simpledemo.openecomp.org:8443 +ml.distribution.CONSUMER_GROUP=aai-ml-group +ml.distribution.CONSUMER_ID=aai-ml +ml.distribution.ENVIRONMENT_NAME=AUTO +ml.distribution.KEYSTORE_PASSWORD= +ml.distribution.KEYSTORE_FILE=asdc-client.jks +ml.distribution.PASSWORD=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp +ml.distribution.POLLING_INTERVAL=30 +ml.distribution.POLLING_TIMEOUT=20 +ml.distribution.USER=aai +ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG + +# Model Loader AAI REST Client Configuration +ml.aai.BASE_URL=https://c1.vm1.aai.simpledemo.openecomp.org:8443 +ml.aai.MODEL_URL=/aai/v10/service-design-and-creation/models/model/ +ml.aai.NAMED_QUERY_URL=/aai/v10/service-design-and-creation/named-queries/named-query/ +ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images +ml.aai.KEYSTORE_FILE=aai-os-cert.p12 +ml.aai.KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o +ml.aai.AUTH_USER=ModelLoader +ml.aai.AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-dmaap-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-dmaap-health.json new file mode 100644 index 0000000000..bd01bc5d95 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-dmaap-health.json @@ -0,0 +1,10 @@ +{ + "service": { + "name": "Health Check: Message Router - DMaaP", + "check": { + "http": "http://dmaap.onap-message-router:3904/topics", + "interval": "30s", + "timeout": "1s" + } + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-kafka-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-kafka-health.json new file mode 100644 index 0000000000..128cf94460 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-kafka-health.json @@ -0,0 +1,10 @@ +{ + "service": { + "name": "Health Check: Message Router - Kafka", + "check": { + "script": "/consul/config/scripts/mr-kafka-health.sh", + "interval": "30s", + "timeout": "1s" + } + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-zookeeper-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-zookeeper-health.json new file mode 100644 index 0000000000..5268747349 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mr-zookeeper-health.json @@ -0,0 +1,10 @@ +{ + "service": { + "name": "Health Check: Message Router - ZooKeeper", + "check": { + "script": "/consul/config/scripts/mr-zookeeper-health.sh", + "interval": "30s", + "timeout": "1s" + } + } +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-doc.txt b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-doc.txt new file mode 100644 index 0000000000..a6e084cfea --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-doc.txt @@ -0,0 +1,9 @@ +{ + "vnfId" : "testwrite", + "device" : "10.198.1.31", + "timestamp" : "2017-08-23T19:13:56Z", + "jdmTotalMem" : "2097152", + "jdmAvailableMem" : "1877272", + "jdmUserCpu" : "16", + "jdmSystemCpu" : "3" +} diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-script.sh new file mode 100644 index 0000000000..26e13913a0 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/aai-search-storage-write-script.sh @@ -0,0 +1,17 @@ +if curl -s -X PUT http://elasticsearch.onap-aai:9200/searchhealth/stats/testwrite -d @/consul/config/scripts/aai-search-storage-write-doc.txt | grep '\"created\":true'; then + if curl -s -X DELETE http://elasticsearch.onap-aai:9200/searchhealth/stats/testwrite | grep '\"failed\":0'; then + if curl -s -X GET http://elasticsearch.onap-aai:9200/searchhealth/stats/testwrite | grep '\"found\":false'; then + echo Successful PUT, DELETE, GET from Search Document Storage 2>&1 + exit 0 + else + echo Failed GET from Search Document Storage 2>&1 + exit 1 + fi + else + echo Failed DELETE from Search Document Storage 2>&1 + exit 1 + fi +else + echo Failed PUT from Search Document Storage 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/data-router-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/data-router-script.sh new file mode 100644 index 0000000000..53cd5886f9 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/data-router-script.sh @@ -0,0 +1,16 @@ + +NAME=$(/consul/config/bin/kubectl -n onap-aai get pod | grep -o "data-router[^[:space:]]*") + +if [ -n "$NAME" ]; then + if /consul/config/bin/kubectl -n onap-aai exec -it $NAME -- ps -efww | grep 'java' | grep 'data-router' > /dev/null; then + + echo Success. Synapse process is running. 2>&1 + exit 0 + else + echo Failed. Synapse process is not running. 2>&1 + exit 1 + fi +else + echo Failed. Synapse container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/gremlin-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/gremlin-script.sh new file mode 100644 index 0000000000..c1766f8a2a --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/gremlin-script.sh @@ -0,0 +1,16 @@ + +NAME=$(/consul/config/bin/kubectl -n onap-aai get pod | grep -o "gremlin[^[:space:]]*") + +if [ -n "$NAME" ]; then + if /consul/config/bin/kubectl -n onap-aai exec -it $NAME -- ps -efww | grep 'java' | grep 'gremlin-server' > /dev/null; then + + echo Success. Gremlin Server process is running. 2>&1 + exit 0 + else + echo Failed. Gremlin Server process is not running. 2>&1 + exit 1 + fi +else + echo Failed. Gremlin Server container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/model-loader-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/model-loader-script.sh new file mode 100644 index 0000000000..1c93ecb38e --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/model-loader-script.sh @@ -0,0 +1,16 @@ + +NAME=$(/consul/config/bin/kubectl -n onap-aai get pod | grep -o "model-loader[^[:space:]]*") + +if [ -n "$NAME" ]; then + if /consul/config/bin/kubectl -n onap-aai exec -it $NAME -- ps -efww | grep 'java' | grep 'model-loader' > /dev/null; then + + echo Success. Model Loader process is running. 2>&1 + exit 0 + else + echo Failed. Model Loader process is not running. 2>&1 + exit 1 + fi +else + echo Failed. Model Loader container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-kafka-health.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-kafka-health.sh new file mode 100644 index 0000000000..317c2a699c --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-kafka-health.sh @@ -0,0 +1,13 @@ +kafkapod=$(/consul/config/bin/kubectl -n onap-message-router get pod | grep -o "global-kafka-[^[:space:]]*") +if [ -n "$kafkapod" ]; then + if /consul/config/bin/kubectl -n onap-message-router exec -it $kafkapod -- ps ef | grep -i kafka; then + echo Success. Kafka process is running. 2>&1 + exit 0 + else + echo Failed. Kafka is not running. 2>&1 + exit 1 + fi +else + echo Failed. Kafka container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-zookeeper-health.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-zookeeper-health.sh new file mode 100644 index 0000000000..3da456c05a --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-zookeeper-health.sh @@ -0,0 +1,13 @@ +zkpod=$(/consul/config/bin/kubectl -n onap-message-router get pod | grep -o "zookeeper-[^[:space:]]*") +if [ -n "$zkpod" ]; then + if /consul/config/bin/kubectl -n onap-message-router exec -it $zkpod -- ps ef | grep -i zookeeper; then + echo Success. Zookeeper process is running. 2>&1 + exit 0 + else + echo Failed. Zookeeper is not running. 2>&1 + exit 1 + fi +else + echo Failed. Zookeeper container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh new file mode 100644 index 0000000000..e5cf5cfefb --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +SEARCH_SERVICE_NAME="search-data-service.onap-aai" +SEARCH_SERVICE_PORT=9509 +HEALTH_CHECK_INDEX="healthcheck" + +# 'Document Index' REST Endpoint +INDEX_URL="https://$SEARCH_SERVICE_NAME:$SEARCH_SERVICE_PORT/services/search-data-service/v1/search/indexes/$HEALTH_CHECK_INDEX" +INDEX_SCHEMA="{\"fields\":[{\"name\": \"field1\", \"data-type\": \"string\"}]}" + + +SEARCH_CERT_FILE="/consul/config/client-cert-onap.crt.pem" +SEARCH_KEY_FILE="/consul/config/client-cert-onap.key.pem" + + +## Try to create an index via the Search Data Service API. +CREATE_INDEX_RESP=$(curl -s -o /dev/null -w "%{http_code}" -k --cert $SEARCH_CERT_FILE --cert-type PEM --key $SEARCH_KEY_FILE --key-type PEM -d "$INDEX_SCHEMA" --header "Content-Type: application/json" --header "X-TransactionId: ConsulHealthCheck" -X PUT $INDEX_URL) + +RESULT_STRING=" " + +if [ $CREATE_INDEX_RESP -eq 201 ]; then + RESULT_STRING="Service Is Able To Communicate With Back End" +elif [ $CREATE_INDEX_RESP -eq 400 ]; then + # A 400 response could mean that the index already exists (ie: we didn't + # clean up after ourselves on a previous check), so log the response but + # don't exit yet. If we fail on the delete then we can consider the + # check a failure, otherwise, we are good. + RESULT_STRING="$RESULT_STRING Create Index [FAIL - 400 (possible index already exists)] " +else + RESULT_STRING="Service API Failure - $CREATE_INDEX_RESP" + echo $RESULT_STRING + exit 1 +fi + +## Now, clean up after ourselves. +DELETE_INDEX_RESP=$(curl -s -o /dev/null -w "%{http_code}" -k --cert $SEARCH_CERT_FILE --cert-type PEM --key $SEARCH_KEY_FILE --key-type PEM -d "{ }" --header "Content-Type: application/json" --header "X-TransactionId: ConsulHealthCheck" -X DELETE $INDEX_URL) + +if [ $DELETE_INDEX_RESP -eq 200 ]; then + RESULT_STRING="Service Is Able To Communicate With Back End" +else + RESULT_STRING="Service API Failure - $DELETE_INDEX_RESP" + echo $RESULT_STRING + exit 1 +fi + +echo $RESULT_STRING +return 0 diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/sparky-be-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/sparky-be-script.sh new file mode 100644 index 0000000000..fe265ba2b0 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/sparky-be-script.sh @@ -0,0 +1,16 @@ + +NAME=$(/consul/config/bin/kubectl -n onap-aai get pod | grep -o "sparky-be[^[:space:]]*") + +if [ -n "$NAME" ]; then + if /consul/config/bin/kubectl -n onap-aai exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then + + echo Success. UI Backend Service process is running. 2>&1 + exit 0 + else + echo Failed. UI Backend Service process is not running. 2>&1 + exit 1 + fi +else + echo Failed. UI Backend Service container is offline. 2>&1 + exit 1 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/tabular-db-availability.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/tabular-db-availability.sh new file mode 100644 index 0000000000..da9d8a5d82 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/tabular-db-availability.sh @@ -0,0 +1,20 @@ + +# Query the Hbase service for the cluster status. +GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://hbase.onap-aai:8080/status/cluster) + +if [ -z "$GET_CLUSTER_STATUS_RESPONSE" ]; then + echo "Tabular store is unreachable." + return 2 +fi + +# Check the resulting status JSON to see if there is a 'DeadNodes' stanza with +# entries. +DEAD_NODES=$(echo $GET_CLUSTER_STATUS_RESPONSE | grep "") + +if [ -n "$DEAD_NODES" ]; then + echo "Tabular store is up and accessible." + return 0 +else + echo "Tabular store is up but is reporting dead nodes - cluster may be in degraded state." + return 1 +fi diff --git a/kubernetes/consul/Chart.yaml b/kubernetes/consul/Chart.yaml new file mode 100644 index 0000000000..318234db06 --- /dev/null +++ b/kubernetes/consul/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Consul +name: consul +version: 1.1.0 diff --git a/kubernetes/consul/templates/consul-agent-deployment.yaml b/kubernetes/consul/templates/consul-agent-deployment.yaml new file mode 100644 index 0000000000..15318660b5 --- /dev/null +++ b/kubernetes/consul/templates/consul-agent-deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: consul-agent + name: consul-agent + namespace: "{{ .Values.nsPrefix }}-consul" +spec: + selector: + matchLabels: + app: consul-agent + template: + metadata: + labels: + app: consul-agent + name: consul-agent + spec: + containers: + - image: "{{ .Values.consulimageRegistry }}:{{ .Values.consuldockerTag }}" + command: ["/usr/local/bin/docker-entrypoint.sh"] + args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","consul-server.{{ .Values.nsPrefix }}-consul"] + name: consul-server + volumeMounts: + - mountPath: /consul/config + name: consul-agent-config + volumes: + - hostPath: + path: {{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-agent-config + name: consul-agent-config diff --git a/kubernetes/consul/templates/consul-server-deployment.yaml b/kubernetes/consul/templates/consul-server-deployment.yaml new file mode 100644 index 0000000000..3e6dcba865 --- /dev/null +++ b/kubernetes/consul/templates/consul-server-deployment.yaml @@ -0,0 +1,30 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: consul-server + name: consul-server + namespace: "{{ .Values.nsPrefix }}-consul" +spec: + replicas: 3 + selector: + matchLabels: + app: consul-server + template: + metadata: + labels: + app: consul-server + name: consul-server + spec: + containers: + - image: "{{ .Values.consulimageRegistry }}:{{ .Values.consuldockerTag }}" + command: ["/usr/local/bin/docker-entrypoint.sh"] + args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","consul-server.{{ .Values.nsPrefix }}-consul"] + name: consul-server + volumeMounts: + - mountPath: /consul/config + name: consul-server-config + volumes: + - hostPath: + path: {{ .Values.rootHostPath }}/{{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-server-config + name: consul-server-config diff --git a/kubernetes/consul/templates/consul-server-service.yaml b/kubernetes/consul/templates/consul-server-service.yaml new file mode 100644 index 0000000000..465456425e --- /dev/null +++ b/kubernetes/consul/templates/consul-server-service.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: consul-server + name: consul-server + namespace: "{{ .Values.nsPrefix }}-consul" +spec: + ports: + - name: consul-ui + nodePort: {{ .Values.nodePortPrefix }}70 + port: 8500 + protocol: TCP + targetPort: 8500 + - name: consul-join + nodePort: {{ .Values.nodePortPrefix }}71 + port: 8301 + protocol: TCP + targetPort: 8301 + selector: + app: consul-server + type: {{ .Values.service.type | quote }} diff --git a/kubernetes/consul/values.yaml b/kubernetes/consul/values.yaml new file mode 100644 index 0000000000..2b713dc278 --- /dev/null +++ b/kubernetes/consul/values.yaml @@ -0,0 +1,7 @@ +nsPrefix: "inf" +nodePortPrefix: 302 +consuldockerTag: "latest" +rootHostPath: "/dockerdata-nfs" +consulimageRegistry: "docker.io/consul" +service: + type: NodePort diff --git a/kubernetes/dcaegen2/.helmignore b/kubernetes/dcaegen2/.helmignore new file mode 100644 index 0000000000..a7adb75030 --- /dev/null +++ b/kubernetes/dcaegen2/.helmignore @@ -0,0 +1,22 @@ +# 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 +dcae-parameters-sample.yaml \ No newline at end of file diff --git a/kubernetes/dcaegen2/Chart.yaml b/kubernetes/dcaegen2/Chart.yaml new file mode 100644 index 0000000000..4ab4f859c7 --- /dev/null +++ b/kubernetes/dcaegen2/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: DCAE Generation 2 bootstrap container +name: dcaegen2 +version: 1.1.0 diff --git a/kubernetes/dcaegen2/dcae-parameters-sample.yaml b/kubernetes/dcaegen2/dcae-parameters-sample.yaml new file mode 100644 index 0000000000..b2cffae46b --- /dev/null +++ b/kubernetes/dcaegen2/dcae-parameters-sample.yaml @@ -0,0 +1,41 @@ +# UUID of the OpenStack"s CentOS 7 cloud VM image +# If your Openstack does not have a CentOS 7 cloud image, you will have to add one. +centos7image_id: "52d4ea09-cc69-4a9a-9961-938a3282d209" +# UUID of the OpenStack"s Ubuntu 16.04 VM image +# If your Openstack does not have a buntu 16.04 cloud image, you will have to add one. +ubuntu1604image_id: "97bbe637-5d42-419a-a2c7-beff33ffa23c" +# ID of the OpenStack"s VM flavor to be used by DCAEGEN2 VMs (m1.medium/m1.large) +flavor_id: "4" +# UUID of the OpenStack"s security group to be used for DCAEGEN2 VMs +security_group: "abc0687d-34ab-4d37-8fe8-4b544d94ba71" +# The name of the OpenStack network where public IP addresses and floating IPs are allocated from +# This must use the name and not the UUID. The name must be unique otherwise the installer fails +public_net: "public" +# The name of the OpenStack network where private IP addresses are allocated from +private_net: "onap_oam" +# Group header for OpenStack Keystone parameters +openstack: + # User name + username: "dev" + # Password + password: "dev" + # Name of the OpenStack tenant/project where DCAEGEN2 VMs are deployed + tenant_name: "dev" + # Openstack authentication API URL, for example "https://horizon.playground.onap.org:5000/v2.0" + auth_url: "http://1.2.3.4:5000/v2.0" + # Name of the OpenStack region where DCAEGEN2 VMs are deployed, for example "RegionOne" + region: "RegionOne" +# Name of the public key uploaded to OpenStack in the Prepration step +keypair: "dcae-g2" +# Path to the private key within the conatiner (!! Do not change!!) +key_filename: "/opt/dcae/key" +# Prefix (location code) of all DCAEGEN2 VMs +location_prefix: "onapr1" +# Domain name of the OpenStack tenant "onapr1.playground.onap.org" +location_domain: "onap-dcaegen2" +# Location of the raw artifact repo hosting additional boot scripts called by DCAEGEN2 VMs" cloud-init, for example: "https://nexus.onap.org/service/local/repositories/raw/content" +codesource_url: "https://nexus.onap.org/content/sites/raw" +# Path to the boot scripts within the raw artifact repo, for example: "org.onap.dcaegen2.deployments.scripts/releases/" +codesource_version: "org.onap.dcaegen2.deployments/releases/scripts/" + + diff --git a/kubernetes/dcaegen2/templates/pod.yaml b/kubernetes/dcaegen2/templates/pod.yaml new file mode 100644 index 0000000000..e275ff671d --- /dev/null +++ b/kubernetes/dcaegen2/templates/pod.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Pod +metadata: + name: {{ .Chart.Name }} + namespace: "{{ .Values.nsPrefix }}-dcaegen2" +spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - name: installer-config-mount + mountPath: /opt/app/installer/config + readOnly: true + env: + - name: LOCATION + value: "{{ .Values.location }}" + volumes: + - name: installer-config-mount + projected: + sources: + - secret: + name: "{{ .Chart.Name }}-openstack-ssh-private-key" + - configMap: + name: "{{ .Chart.Name }}-config-inputs" + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" + restartPolicy: Never \ No newline at end of file diff --git a/kubernetes/dcaegen2/values.yaml b/kubernetes/dcaegen2/values.yaml new file mode 100644 index 0000000000..5d446c8c41 --- /dev/null +++ b/kubernetes/dcaegen2/values.yaml @@ -0,0 +1,6 @@ +nsPrefix: onap +location: dg2 +image: + repository: nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.bootstrap + tag: 1.1-latest + pullPolicy: Always \ No newline at end of file diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index c59cf095ca..c8810aa615 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -14,7 +14,7 @@ Usage: $0 [PARAMs] -a [APP] : Specify a specific ONAP component (default: all) from the following choices: sdc, aai ,mso, message-router, robot, - vid, sdnc, portal, policy, appc, multicloud, clamp + vid, sdnc, portal, policy, appc, multicloud, clamp, consul EOF } @@ -39,11 +39,46 @@ create_registry_key() { check_return_code $cmd } +configure_dcaegen2() { + if [ ! -s "$OPENSTACK_PRIVATE_KEY_PATH" ] + then + echo "ERROR: $OPENSTACK_PRIVATE_KEY_PATH does not exist or is empty. Cannot launch dcae gen2." + return 1 + fi + + cmd=`echo kubectl --namespace $1-$2 create secret generic $2-openstack-ssh-private-key --from-file=key=${OPENSTACK_PRIVATE_KEY_PATH}` + eval ${cmd} + check_return_code $cmd + + if [ ! -s "$DCAEGEN2_CONFIG_INPUT_FILE_PATH" ] + then + echo "ERROR: $DCAEGEN2_CONFIG_INPUT_FILE_PATH does not exist or is empty. Cannot launch dcae gen2." + return 1 + fi + + cmd=`echo kubectl --namespace $1-$2 create configmap $2-config-inputs --from-file=inputs.yaml=${DCAEGEN2_CONFIG_INPUT_FILE_PATH}` + eval ${cmd} + check_return_code $cmd +} + create_onap_helm() { HELM_VALUES_ADDITION="" if [[ ! -z $HELM_VALUES_FILEPATH ]]; then HELM_VALUES_ADDITION="--values=$HELM_VALUES_FILEPATH" fi + # Have to put a check for dcaegen2 because it requires external files to helm + # which should not be part of the Chart. + if [ "$2" = "dcaegen2" ]; + then + configure_dcaegen2 $1 $2 + local result=$? + if [ $result -ne 0 ] + then + echo "ERROR: dcaegen2 failed to configure: Pre-requisites not met. Skipping deploying it and continue" + return + fi + fi + cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3 ${HELM_VALUES_ADDITION}` eval ${cmd} check_return_code $cmd diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash index 3e4125bbb9..6dfd948924 100644 --- a/kubernetes/oneclick/setenv.bash +++ b/kubernetes/oneclick/setenv.bash @@ -1,8 +1,15 @@ #!/bin/bash # Deploying MSB first and kube2msb last will ensure all the ONAP services can be registered to MSB -HELM_APPS=('msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcae' 'log' 'cli' 'multicloud' 'clamp' 'kube2msb') +HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'kube2msb') ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001} ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker} ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker} ONAP_DOCKER_MAIL=${ONAP_DOCKER_MAIL:-$USERNAME@$USERDOMAIN} +# Openstack key pair private key file location required to enable dcaegen2 installer CRUD operations in your Openstack +# Ensure you set the name of your keypair in the dcae-parameters.yaml entry "keypair: "dcae-g2" +# example: export OPENSTACK_PRIVATE_KEY_PATH=/home/user/Downloads/dcae-g2.pem +OPENSTACK_PRIVATE_KEY_PATH=${OPENSTACK_PRIVATE_KEY_PATH:-~/.ssh/onap_rsa} +# dcaegen2 bootstrap configuration input yaml file. Start from the sample, and set your environments real values: +# example: export DCAEGEN2_CONFIG_INPUT_FILE_PATH=/tmp/dcae-parameters.yaml +DCAEGEN2_CONFIG_INPUT_FILE_PATH=${DCAEGEN2_CONFIG_INPUT_FILE_PATH:-../dcaegen2/dcae-parameters-sample.yaml} \ No newline at end of file