From: Mike Elliott Date: Mon, 25 Sep 2017 13:51:48 +0000 (+0000) Subject: Merge "Add Consul health check support for SDC" X-Git-Tag: 2.0.0-ONAP~633 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=270a717ecd7e5a5ed83418efc8007eff92d9b7fd;hp=d0769519dbad546eee9ca9ab37ee2cf37f6aee9d;p=oom.git Merge "Add Consul health check support for SDC" --- 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/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/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/mso-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mso-health.json new file mode 100644 index 0000000000..354cd9ebab --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/mso-health.json @@ -0,0 +1,28 @@ +{ + "service": { + "name": "Health Check: MSO", + "checks": [ + { + "id": "mso-api-healthcheck", + "name": "MSO API Health Check", + "script": "/consul/config/scripts/mso-api-script.sh", + "interval": "10s", + "timeout": "1s" + }, + { + "id": "mso-camunda-healthcheck", + "name": "MSO Camunda Health Check", + "script": "/consul/config/scripts/mso-camunda-script.sh", + "interval": "10s", + "timeout": "1s" + }, + { + "id": "mso-jra-healthcheck", + "name": "MSO JRA Health Check", + "script": "/consul/config/scripts/mso-jra-script.sh", + "interval": "10s", + "timeout": "1s" + } + ] + } +} 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/mso-api-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-api-script.sh new file mode 100644 index 0000000000..ba0afc0dce --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-api-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://mso.onap-mso.svc.cluster.local:8080/ecomp/mso/infra/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-camunda-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-camunda-script.sh new file mode 100644 index 0000000000..254a0445ce --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-camunda-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://mso.onap-mso.svc.cluster.local:8080/mso/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-jra-script.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-jra-script.sh new file mode 100644 index 0000000000..29ffd8fe4c --- /dev/null +++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-jra-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://mso.onap-mso.svc.cluster.local:8080/networks/rest/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/chef-configs/solo.rb b/kubernetes/config/docker/init/src/config/mso/docker-files/chef-configs/solo.rb deleted file mode 100644 index 5e8247503a..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/chef-configs/solo.rb +++ /dev/null @@ -1,9 +0,0 @@ -current_dir = File.dirname(__FILE__) -log_level :info -log_location STDOUT -node_name "mso" -syntax_check_cache_path "#{current_dir}/syntaxcache" -cookbook_path ["/var/berks-cookbooks"] -environment_path "/var/berks-cookbooks/CHEF_REPO_NAME_TO_REPLACE/environments" -environment "mso-docker" - diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-roles.properties b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-roles.properties deleted file mode 100644 index de9b0aac09..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-roles.properties +++ /dev/null @@ -1,32 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm' which is the default realm -# for application services on a new installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -#guest=guest -CSIClient=CSI-Client -CCDClient=CCD-Client -GUIClient=GUI-Client -BPMNClient=BPMN-Client -InfraPortalClient=InfraPortal-Client -MSOClient=MSO-Client -sitecontrol=SiteControl-Client -MSO=AAIEmul-Client -BPELClient=BPEL-Client \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-users.properties b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-users.properties deleted file mode 100644 index a04d22296d..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/application-users.properties +++ /dev/null @@ -1,34 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -#$REALM_NAME=ApplicationRealm$ This line is used by the add-user utility to identify the realm name already used in this file. -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -CSIClient=0024f53a4ec012c22d9575a3710ed362 -CCDClient=c5e97286d4251605d8ef72f727ac1da6 -GUIClient=583075cf28c7c69c3a8b08356830b856 -BPMNClient=42b98ca2e0cc976d91a26c1495ecd529 -InfraPortalClient=e5077b432685a94babe332893337f6fc -MSOClient=72bc85031ae67afe67014c7663ae1033 -sitecontrol=9a3a360d86758f69ec9508725c017335 -MSO=a05cb60a04f41f750ce1fc60a2633534 -BPELClient=f2b4ce8ae1964050c0ad7e69bd88fd62 \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-groups.properties b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-groups.properties deleted file mode 100644 index 44742a83c4..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-groups.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users groups for the realm 'ManagementRealm'. -# -# This is used for domain management, users groups membership information is used to assign the user -# specific management roles. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-users.properties b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-users.properties deleted file mode 100644 index 1576e76f4e..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/mgmt-users.properties +++ /dev/null @@ -1,27 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# On start-up the server will also automatically add a user $local - this user is specifically -# for local tools running against this AS installation. -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -admin=281905e1b4420050a7f07eecba66ee68 -# -#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file. -# diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/standalone-full-ha.xml b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/standalone-full-ha.xml deleted file mode 100644 index cface7f46d..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/configuration/standalone-full-ha.xml +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:mariadb://mariadb:3306/mso_requests?autoReconnect=true&connectTimeout=60000&socketTimeout=60000 - mariadb - TRANSACTION_READ_COMMITTED - - 10 - 100 - true - false - FailingConnectionOnly - - - mso - mso123 - - - - false - true - 20000 - true - - - - 15 - 30 - 1 - 3000 - - - - jdbc:mariadb://mariadb:3306/mso_catalog?autoReconnect=true&connectTimeout=60000&socketTimeout=60000 - mariadb - TRANSACTION_READ_COMMITTED - - 10 - 100 - true - false - FailingConnectionOnly - - - catalog - catalog123 - - - - false - true - 20000 - true - - - - 15 - 30 - 1 - 3000 - - - - jdbc:mariadb://mariadb:3306/camundabpmn?autoReconnect=true&connectTimeout=60000&socketTimeout=60000 - mariadb - set autocommit=1 - TRANSACTION_READ_COMMITTED - - 10 - 100 - true - false - FailingConnectionOnly - - - camunda - camunda123 - - - - - - - 32 - true - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - org.mariadb.jdbc.MySQLDataSource - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/modules/mariadb/main/module.xml b/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/modules/mariadb/main/module.xml deleted file mode 100644 index 1b127358ed..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/docker-files/jboss-configs/modules/mariadb/main/module.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf b/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf old mode 100755 new mode 100644 index a4c8c3dc25..39ed022489 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf @@ -1,192 +1,193 @@ -# MariaDB database server configuration file. +# Example MySQL config file for medium systems. # -# You can copy this file to one of: -# - "/etc/mysql/my.cnf" to set global options, -# - "~/.my.cnf" to set user-specific options. +# This is for a system with memory 8G where MySQL plays +# an important part, or systems up to 128M where MySQL is used together with +# other programs (such as a web server) # -# One can use all long options that the program supports. -# Run program with --help to get a list of available options and with -# --print-defaults to see which it would actually understand and use. -# -# For explanations see -# http://dev.mysql.com/doc/mysql/en/server-system-variables.html - -# This will be passed to all mysql clients -# It has been reported that passwords should be enclosed with ticks/quotes -# escpecially if they contain "#" chars... -# Remember to edit /etc/mysql/debian.cnf when changing the socket location. -[client] -port = 3306 -socket = /var/run/mysqld/mysqld.sock +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. -# Here is entries for some specific programs -# The following values assume you have at least 32M ram +# The following options will be passed to all MySQL clients +##[client] +##user = root +##port = 3306 +##socket = //opt/app/mysql/mysql.sock -# This was formally known as [safe_mysqld]. Both versions are currently parsed. -[mysqld_safe] -socket = /var/run/mysqld/mysqld.sock -nice = 0 +# Here follows entries for some specific programs +# The MySQL server [mysqld] -skip-host-cache -skip-name-resolve -# -# * Basic Settings -# -#user = mysql -pid-file = /var/run/mysqld/mysqld.pid -socket = /var/run/mysqld/mysqld.sock -port = 3306 -basedir = /usr -datadir = /var/lib/mysql -tmpdir = /tmp -lc_messages_dir = /usr/share/mysql -lc_messages = en_US -lower_case_table_names = 1 +##performance_schema + +slow_query_log =ON +long_query_time =2 +slow_query_log_file =//var/lib/mysql/slow_query.log + skip-external-locking +explicit_defaults_for_timestamp = true +skip-symbolic-links +local-infile = 0 +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 100 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +max_connections = 500 +lower_case_table_names = 1 +thread_stack = 256K +thread_cache_size = 25 +query_cache_size = 8M +query_cache_type = 0 +query_prealloc_size = 512K +query_cache_limit = 1M + +# Password validation +##plugin-load-add=simple_password_check.so +##simple_password_check_other_characters=0 + +# Audit Log settings +plugin-load-add=server_audit.so +server_audit=FORCE_PLUS_PERMANENT +server_audit_file_path=//var/lib/mysql/audit.log +server_audit_file_rotate_size=50M +server_audit_events=CONNECT,QUERY,TABLE +server_audit_logging=on + +# Don't listen on a TCP/IP port at all. This can be a security enhancement, +# if all processes that need to connect to mysqld run on the same host. +# All interaction with mysqld must be made via Unix sockets or named pipes. +# Note that using this option without enabling named pipes on Windows +# (via the "enable-named-pipe" option) will render mysqld useless! +# +#skip-networking + +# Replication Master Server (default) +# binary logging is required for replication +##log-bin=//var/lib/mysql/mysql-bin + +# binary logging format - mixed recommended +binlog_format=row + +# required unique id between 1 and 2^32 - 1 +# defaults to 1 if master-host is not set +# but will not function as a master if omitted + +# Replication Slave (comment out master section to use this) +# +# To configure this host as a replication slave, you can choose between +# two methods : +# +# 1) Use the CHANGE MASTER TO command (fully described in our manual) - +# the syntax is: +# +# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=, +# MASTER_USER=, MASTER_PASSWORD= ; # -# Instead of skip-networking the default is now to listen only on -# localhost which is more compatible and is not less secure. -#bind-address = 127.0.0.1 -# -# * Fine Tuning -# -max_connections = 100 -connect_timeout = 5 -wait_timeout = 600 -max_allowed_packet = 16M -thread_cache_size = 128 -sort_buffer_size = 4M -bulk_insert_buffer_size = 16M -tmp_table_size = 32M -max_heap_table_size = 32M -# -# * MyISAM -# -# This replaces the startup script and checks MyISAM tables if needed -# the first time they are touched. On error, make copy and try a repair. -myisam_recover_options = BACKUP -key_buffer_size = 128M -#open-files-limit = 2000 -table_open_cache = 400 -myisam_sort_buffer_size = 512M -concurrent_insert = 2 -read_buffer_size = 2M -read_rnd_buffer_size = 1M -# -# * Query Cache Configuration -# -# Cache only tiny result sets, so we can fit more in the query cache. -query_cache_limit = 128K -query_cache_size = 64M -# for more write intensive setups, set to DEMAND or OFF -#query_cache_type = DEMAND -# -# * Logging and Replication -# -# Both location gets rotated by the cronjob. -# Be aware that this log type is a performance killer. -# As of 5.1 you can enable the log at runtime! -#general_log_file = /var/log/mysql/mysql.log -#general_log = 1 -# -# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. -# -# we do want to know about network errors and such -#log_warnings = 2 -# -# Enable the slow query log to see queries with especially long duration -#slow_query_log[={0|1}] -slow_query_log_file = /var/log/mysql/mariadb-slow.log -long_query_time = 10 -#log_slow_rate_limit = 1000 -#log_slow_verbosity = query_plan - -#log-queries-not-using-indexes -#log_slow_admin_statements -# -# The following can be used as easy to replay backup logs or for replication. -# note: if you are setting up a replication slave, see README.Debian about -# other settings you may need to change. -#server-id = 1 -#report_host = master1 -#auto_increment_increment = 2 -#auto_increment_offset = 1 -#log_bin = /var/log/mysql/mariadb-bin -#log_bin_index = /var/log/mysql/mariadb-bin.index -# not fab for performance, but safer -#sync_binlog = 1 -expire_logs_days = 10 -max_binlog_size = 100M -# slaves -#relay_log = /var/log/mysql/relay-bin -#relay_log_index = /var/log/mysql/relay-bin.index -#relay_log_info_file = /var/log/mysql/relay-bin.info -#log_slave_updates -#read_only -# -# If applications support it, this stricter sql_mode prevents some -# mistakes like inserting invalid dates etc. -#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL -# -# * InnoDB -# -# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. -# Read the manual for more InnoDB related options. There are many! -default_storage_engine = InnoDB -# you can't just change log file size, requires special procedure -#innodb_log_file_size = 50M -innodb_buffer_pool_size = 256M -innodb_log_buffer_size = 8M -innodb_file_per_table = 1 -innodb_open_files = 400 -innodb_io_capacity = 400 -innodb_flush_method = O_DIRECT -# -# * Security Features -# -# Read the manual, too, if you want chroot! -# chroot = /var/lib/mysql/ -# -# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". -# -# ssl-ca=/etc/mysql/cacert.pem -# ssl-cert=/etc/mysql/server-cert.pem -# ssl-key=/etc/mysql/server-key.pem - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 +# where you replace , , by quoted strings and +# by the master's port number (3306 by default). +# +# Example: +# +# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, +# MASTER_USER='joe', MASTER_PASSWORD='secret'; +# +# OR +# +# 2) Set the variables below. However, in case you choose this method, then +# start replication for the first time (even unsuccessfully, for example +# if you mistyped the password in master-password and the slave fails to +# connect), the slave will create a master.info file, and any later +# change in this file to the variables' values below will be ignored and +# overridden by the content of the master.info file, unless you shutdown +# the slave server, delete master.info and restart the slaver server. +# For that reason, you may want to leave the lines below untouched +# (commented) and instead use CHANGE MASTER TO (see above) +# +# required unique id between 2 and 2^32 - 1 +# (and different from the master) +# defaults to 2 if master-host is set +# but will not function as a slave if omitted +#server-id = 2 +# +# The replication master for this slave - required +#master-host = +# +# The username the slave will use for authentication when connecting +# to the master - required +#master-user = +# +# The password the slave will authenticate with when connecting to +# the master - required +#master-password = +# +# The port the master is listening on. +# optional - defaults to 3306 +#master-port = +# +# binary logging - not required for slaves, but recommended +#log-bin=mysql-bin + +# Uncomment the following if you are using InnoDB tables +##innodb_data_home_dir = //opt/app/mysql/data +##innodb_data_file_path = ibdata1:20M:autoextend:max:32G +##innodb_log_group_home_dir = //opt/app/mysql/iblogs +# You can set .._buffer_pool_size up to 50 - 80 % +# of RAM but beware of setting memory usage too high +#innodb_buffer_pool_size = 6380M +#innodb_additional_mem_pool_size = 2M +# Set .._log_file_size to 25 % of buffer pool size +innodb_log_file_size = 150M +innodb_log_files_in_group = 3 +innodb_log_buffer_size = 8M +#innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_autoextend_increment = 100 +expire_logs_days = 8 +open_files_limit = 2000 +transaction-isolation=READ-COMMITTED +####### Galera parameters ####### +## Galera Provider configuration +wsrep_provider=/usr/lib/galera/libgalera_smm.so +wsrep_provider_options="gcache.size=2G; gcache.page_size=1G" +## Galera Cluster configuration +wsrep_cluster_name="MSO-automated-tests-cluster" +wsrep_cluster_address="gcomm://" +#wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3" +##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186" +## Galera Synchronization configuration +wsrep_sst_method=rsync +#wsrep_sst_method=xtrabackup-v2 +#wsrep_sst_auth="sstuser:Mon#2o!6" +## Galera Node configuration +wsrep_node_name="mariadb1" +##wsrep_node_address="192.169.3.184" +wsrep_on=ON +## Status notification +#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify +####### + [mysqldump] quick -quote-names -max_allowed_packet = 16M +max_allowed_packet = 16M [mysql] -#no-auto-rehash # faster start of mysql but no tab completion +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates -[isamchk] -key_buffer = 16M +[myisamchk] +key_buffer_size = 20971520 -# -# * IMPORTANT: Additional settings that can override those from this file! -# The files must end with '.cnf', otherwise they'll be ignored. -# -#!includedir /etc/mysql/conf.d/ +##[mysqlhotcopy] +##interactive-timeout +##[mysqld_safe] +##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1 +##log-error=//opt/app/mysql/log/mysqld.log + +general_log_file = /var/log/mysql/mysql.log +general_log = 1 diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf.example b/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf.example deleted file mode 100644 index 39ed022489..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/conf.d/mariadb1.cnf.example +++ /dev/null @@ -1,193 +0,0 @@ -# Example MySQL config file for medium systems. -# -# This is for a system with memory 8G where MySQL plays -# an important part, or systems up to 128M where MySQL is used together with -# other programs (such as a web server) -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MySQL clients -##[client] -##user = root -##port = 3306 -##socket = //opt/app/mysql/mysql.sock - -# Here follows entries for some specific programs - -# The MySQL server -[mysqld] -##performance_schema - -slow_query_log =ON -long_query_time =2 -slow_query_log_file =//var/lib/mysql/slow_query.log - -skip-external-locking -explicit_defaults_for_timestamp = true -skip-symbolic-links -local-infile = 0 -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 100 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -max_connections = 500 -lower_case_table_names = 1 -thread_stack = 256K -thread_cache_size = 25 -query_cache_size = 8M -query_cache_type = 0 -query_prealloc_size = 512K -query_cache_limit = 1M - -# Password validation -##plugin-load-add=simple_password_check.so -##simple_password_check_other_characters=0 - -# Audit Log settings -plugin-load-add=server_audit.so -server_audit=FORCE_PLUS_PERMANENT -server_audit_file_path=//var/lib/mysql/audit.log -server_audit_file_rotate_size=50M -server_audit_events=CONNECT,QUERY,TABLE -server_audit_logging=on - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking - -# Replication Master Server (default) -# binary logging is required for replication -##log-bin=//var/lib/mysql/mysql-bin - -# binary logging format - mixed recommended -binlog_format=row - -# required unique id between 1 and 2^32 - 1 -# defaults to 1 if master-host is not set -# but will not function as a master if omitted - -# Replication Slave (comment out master section to use this) -# -# To configure this host as a replication slave, you can choose between -# two methods : -# -# 1) Use the CHANGE MASTER TO command (fully described in our manual) - -# the syntax is: -# -# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=, -# MASTER_USER=, MASTER_PASSWORD= ; -# -# where you replace , , by quoted strings and -# by the master's port number (3306 by default). -# -# Example: -# -# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, -# MASTER_USER='joe', MASTER_PASSWORD='secret'; -# -# OR -# -# 2) Set the variables below. However, in case you choose this method, then -# start replication for the first time (even unsuccessfully, for example -# if you mistyped the password in master-password and the slave fails to -# connect), the slave will create a master.info file, and any later -# change in this file to the variables' values below will be ignored and -# overridden by the content of the master.info file, unless you shutdown -# the slave server, delete master.info and restart the slaver server. -# For that reason, you may want to leave the lines below untouched -# (commented) and instead use CHANGE MASTER TO (see above) -# -# required unique id between 2 and 2^32 - 1 -# (and different from the master) -# defaults to 2 if master-host is set -# but will not function as a slave if omitted -#server-id = 2 -# -# The replication master for this slave - required -#master-host = -# -# The username the slave will use for authentication when connecting -# to the master - required -#master-user = -# -# The password the slave will authenticate with when connecting to -# the master - required -#master-password = -# -# The port the master is listening on. -# optional - defaults to 3306 -#master-port = -# -# binary logging - not required for slaves, but recommended -#log-bin=mysql-bin - -# Uncomment the following if you are using InnoDB tables -##innodb_data_home_dir = //opt/app/mysql/data -##innodb_data_file_path = ibdata1:20M:autoextend:max:32G -##innodb_log_group_home_dir = //opt/app/mysql/iblogs -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 6380M -#innodb_additional_mem_pool_size = 2M -# Set .._log_file_size to 25 % of buffer pool size -innodb_log_file_size = 150M -innodb_log_files_in_group = 3 -innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_autoextend_increment = 100 -expire_logs_days = 8 -open_files_limit = 2000 -transaction-isolation=READ-COMMITTED -####### Galera parameters ####### -## Galera Provider configuration -wsrep_provider=/usr/lib/galera/libgalera_smm.so -wsrep_provider_options="gcache.size=2G; gcache.page_size=1G" -## Galera Cluster configuration -wsrep_cluster_name="MSO-automated-tests-cluster" -wsrep_cluster_address="gcomm://" -#wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3" -##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186" -## Galera Synchronization configuration -wsrep_sst_method=rsync -#wsrep_sst_method=xtrabackup-v2 -#wsrep_sst_auth="sstuser:Mon#2o!6" -## Galera Node configuration -wsrep_node_name="mariadb1" -##wsrep_node_address="192.169.3.184" -wsrep_on=ON -## Status notification -#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify -####### - - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 20971520 - -##[mysqlhotcopy] -##interactive-timeout -##[mysqld_safe] -##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1 -##log-error=//opt/app/mysql/log/mysqld.log - -general_log_file = /var/log/mysql/mysql.log -general_log = 1 diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/02-load-additional-changes.sh b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/02-load-additional-changes.sh index c018ca0381..a163801083 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/02-load-additional-changes.sh +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/02-load-additional-changes.sh @@ -21,4 +21,7 @@ # and service marks of AT&T Intellectual Property. # # -mysql -uroot -p$MYSQL_ROOT_PASSWORD -e "UPDATE heat_environment SET ENVIRONMENT='parameters:\n vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n vfw_flavor_name: 4 GB General Purpose v1\n public_net_id: 00000000-0000-0000-0000-000000000000\n unprotected_private_net_id: zdfw1fwl01_unprotected\n protected_private_net_id: zdfw1fwl01_protected\n ecomp_private_net_id: oam_ecomp\n unprotected_private_net_cidr: 192.168.10.0/24\n protected_private_net_cidr: 192.168.20.0/24\n ecomp_private_net_cidr: 192.168.9.0/24\n vfw_private_ip_0: 192.168.10.100\n vfw_private_ip_1: 192.168.20.100\n vfw_private_ip_2: 192.168.9.100\n vpg_private_ip_0: 192.168.10.200\n vpg_private_ip_1: 192.168.9.200\n vsn_private_ip_0: 192.168.20.250\n vsn_private_ip_1: 192.168.9.250\n vfw_name_0: zdfw1fwl01fwl01\n vpg_name_0: zdfw1fwl01pgn01\n vsn_name_0: zdfw1fwl01snk01\n vnf_id: vFirewall_demo_app\n vf_module_id: vFirewall\n webserver_ip: 162.242.237.182\n dcae_collector_ip: 192.168.9.1\n key_name: vfw_key\n pub_key: INSERT YOUR PUBLIC KEY HERE' where id=5;" mso_catalog \ No newline at end of file + +# TODO: update this script to work with the new DB schema + +# mysql -uroot -p$MYSQL_ROOT_PASSWORD -e "UPDATE heat_environment SET ENVIRONMENT='parameters:\n vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n vfw_flavor_name: 4 GB General Purpose v1\n public_net_id: 00000000-0000-0000-0000-000000000000\n unprotected_private_net_id: zdfw1fwl01_unprotected\n protected_private_net_id: zdfw1fwl01_protected\n ecomp_private_net_id: oam_ecomp\n unprotected_private_net_cidr: 192.168.10.0/24\n protected_private_net_cidr: 192.168.20.0/24\n ecomp_private_net_cidr: 192.168.9.0/24\n vfw_private_ip_0: 192.168.10.100\n vfw_private_ip_1: 192.168.20.100\n vfw_private_ip_2: 192.168.9.100\n vpg_private_ip_0: 192.168.10.200\n vpg_private_ip_1: 192.168.9.200\n vsn_private_ip_0: 192.168.20.250\n vsn_private_ip_1: 192.168.9.250\n vfw_name_0: zdfw1fwl01fwl01\n vpg_name_0: zdfw1fwl01pgn01\n vsn_name_0: zdfw1fwl01snk01\n vnf_id: vFirewall_demo_app\n vf_module_id: vFirewall\n webserver_ip: 162.242.237.182\n dcae_collector_ip: 192.168.9.1\n key_name: vfw_key\n pub_key: INSERT YOUR PUBLIC KEY HERE' where id=5;" mso_catalog diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql index 3b824b8b4b..7df7e29d46 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql @@ -1,5 +1,4 @@ -SOURCE ../../camunda/mariadb_engine_7.6.0.sql -SOURCE ../../camunda/mariadb_identity_7.6.0.sql +SOURCE ../../camunda/mariadb_engine_7.7.3-ee.sql -- -- Create an admin user automatically for the cockpit @@ -17,8 +16,6 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mso_requests` /*!40100 DEFAULT CHARACT USE `mso_requests`; SOURCE ../../main-schemas/MySQL-Requests-schema.sql -SOURCE ../../sub-sql-files/site_status_updated_timestamp.sql - -- -- Current Database: `mso_catalog` @@ -31,8 +28,6 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mso_catalog` /*!40100 DEFAULT CHARACTE USE `mso_catalog`; SOURCE ../../main-schemas/MySQL-Catalog-schema.sql -SOURCE ../../sub-sql-files/catalog_timestamp_mso_db.sql -SOURCE ../../sub-sql-files/catalog_add_constraints.sql LOCK TABLES `NETWORK_RECIPE` WRITE; /*!40000 ALTER TABLE `NETWORK_RECIPE` DISABLE KEYS */; diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql index e61abae404..fd540abb65 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql @@ -12,62 +12,64 @@ CREATE USER 'catalog'; GRANT ALL on mso_catalog.* to 'catalog' identified by 'catalog123' with GRANT OPTION; FLUSH PRIVILEGES; -LOCK TABLES `heat_environment` WRITE; -/*!40000 ALTER TABLE `heat_environment` DISABLE KEYS */; -INSERT INTO `heat_environment` VALUES (5,'base_vfw.env','1.0','vfw-service/VFWResource-1','base_vfw ENV file','parameters:\n vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n vfw_flavor_name: 4 GB General Purpose v1\n public_net_id: 00000000-0000-0000-0000-000000000000\n unprotected_private_net_id: zdfw1fwl01_unprotected\n protected_private_net_id: zdfw1fwl01_protected\n ecomp_private_net_id: oam_ecomp\n unprotected_private_net_cidr: 192.168.10.0/24\n protected_private_net_cidr: 192.168.20.0/24\n ecomp_private_net_cidr: 192.168.9.0/24\n vfw_private_ip_0: 192.168.10.100\n vfw_private_ip_1: 192.168.20.100\n vfw_private_ip_2: 192.168.9.100\n vpg_private_ip_0: 192.168.10.200\n vpg_private_ip_1: 192.168.9.200\n vsn_private_ip_0: 192.168.20.250\n vsn_private_ip_1: 192.168.9.250\n vfw_name_0: zdfw1fwl01fwl01\n vpg_name_0: zdfw1fwl01pgn01\n vsn_name_0: zdfw1fwl01snk01\n vnf_id: vFirewall_demo_app\n vf_module_id: vFirewall\n webserver_ip: 162.242.237.182\n dcae_collector_ip: 192.168.9.1\n key_name: vfw_key\n pub_key: INSERT YOUR PUBLIC KEY HERE','2016-11-14 13:04:07','EnvArtifact-UUID3','Label'); -/*!40000 ALTER TABLE `heat_environment` ENABLE KEYS */; -UNLOCK TABLES; +# TODO: update this script to work with the new DB schema -LOCK TABLES `heat_template` WRITE; -/*!40000 ALTER TABLE `heat_template` DISABLE KEYS */; -INSERT INTO `heat_template` VALUES (8,'base_vfw.yaml','1.0','VFWResource','base_vfw.yaml','heat_template_version: 2013-05-23\n\ndescription: Heat template to deploy vFirewall demo app for OpenECOMP\n\nparameters:\n vfw_image_name:\n type: string\n label: Image name or ID\n description: Image to be used for compute instance\n vfw_flavor_name:\n type: string\n label: Flavor\n description: Type of instance (flavor) to be used\n public_net_id:\n type: string\n label: Public network name or ID\n description: Public network that enables remote connection to VNF\n unprotected_private_net_id:\n type: string\n label: Unprotected private network name or ID\n description: Private network that connects vPacketGenerator with vFirewall\n protected_private_net_id:\n type: string\n label: Protected private network name or ID\n description: Private network that connects vFirewall with vSink\n ecomp_private_net_id:\n type: string\n label: ECOMP management network name or ID\n description: Private network that connects ECOMP component and the VNF\n unprotected_private_net_cidr:\n type: string\n label: Unprotected private network CIDR\n description: The CIDR of the unprotected private network\n protected_private_net_cidr:\n type: string\n label: Protected private network CIDR\n description: The CIDR of the protected private network\n ecomp_private_net_cidr:\n type: string\n label: ECOMP private network CIDR\n description: The CIDR of the protected private network\n vfw_private_ip_0:\n type: string\n label: vFirewall private IP address towards the unprotected network\n description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator\n vfw_private_ip_1:\n type: string\n label: vFirewall private IP address towards the protected network\n description: Private IP address that is assigned to the vFirewall to communicate with the vSink\n vfw_private_ip_2:\n type: string\n label: vFirewall private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vFirewall to communicate with ECOMP components\n vpg_private_ip_0:\n type: string\n label: vPacketGenerator private IP address towards the unprotected network\n description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall\n vpg_private_ip_1:\n type: string\n label: vPacketGenerator private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vPacketGenerator to communicate with ECOMP components\n vsn_private_ip_0:\n type: string\n label: vSink private IP address towards the protected network\n description: Private IP address that is assigned to the vSink to communicate with the vFirewall\n vsn_private_ip_1:\n type: string\n label: vSink private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vSink to communicate with ECOMP components\n vfw_name_0:\n type: string\n label: vFirewall name\n description: Name of the vFirewall\n vpg_name_0:\n type: string\n label: vPacketGenerator name\n description: Name of the vPacketGenerator\n vsn_name_0:\n type: string\n label: vSink name\n description: Name of the vSink\n vnf_id:\n type: string\n label: VNF ID\n description: The VNF ID is provided by ECOMP\n vf_module_id:\n type: string\n label: vFirewall module ID\n description: The vFirewall Module ID is provided by ECOMP\n webserver_ip:\n type: string\n label: Webserver IP address\n description: IP address of the webserver that hosts the source code and binaries\n dcae_collector_ip:\n type: string\n label: DCAE collector IP address\n description: IP address of the DCAE collector\n key_name:\n type: string\n label: Key pair name\n description: Public/Private key pair name\n pub_key:\n type: string\n label: Public key\n description: Public key to be installed on the compute instance\n\nresources:\n my_keypair:\n type: OS::Nova::KeyPair\n properties:\n name: { get_param: key_name }\n public_key: { get_param: pub_key }\n save_private_key: false\n\n unprotected_private_network:\n type: OS::Neutron::Net\n properties:\n name: { get_param: unprotected_private_net_id }\n\n protected_private_network:\n type: OS::Neutron::Net\n properties:\n name: { get_param: protected_private_net_id }\n\n unprotected_private_subnet:\n type: OS::Neutron::Subnet\n properties:\n network_id: { get_resource: unprotected_private_network }\n cidr: { get_param: unprotected_private_net_cidr }\n\n protected_private_subnet:\n type: OS::Neutron::Subnet\n properties:\n network_id: { get_resource: protected_private_network }\n cidr: { get_param: protected_private_net_cidr }\n\n vfw_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vfw_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vfw_private_0_port }\n - port: { get_resource: vfw_private_1_port }\n - port: { get_resource: vfw_private_2_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __dcae_collector_ip__ : { get_param: dcae_collector_ip }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n DCAE_COLLECTOR_IP=__dcae_collector_ip__\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_firewall_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vfirewall.sh\n chmod +x v_firewall_init.sh\n chmod +x vfirewall.sh\n echo $WEBSERVER_IP > config/webserver_ip.txt\n echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt\n echo "no" > config/install.txt\n mv vfirewall.sh /etc/init.d\n sudo update-rc.d vfirewall.sh defaults\n ./v_firewall_init.sh\n\n vfw_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: unprotected_private_network }\n fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]\n\n vfw_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: protected_private_network }\n fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]\n\n vfw_private_2_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vfw_private_ip_2 }}]\n\n vpg_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vpg_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vpg_private_0_port }\n - port: { get_resource: vpg_private_1_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __fw_ipaddr__: { get_param: vfw_private_ip_0 }\n __protected_net_cidr__: { get_param: protected_private_net_cidr }\n __sink_ipaddr__: { get_param: vsn_private_ip_0 }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n FW_IPADDR=__fw_ipaddr__\n PROTECTED_NET_CIDR=__protected_net_cidr__\n SINK_IPADDR=__sink_ipaddr__\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_packetgen_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vpacketgen.sh\n chmod +x v_packetgen_init.sh\n chmod +x vpacketgen.sh\n echo $WEBSERVER_IP > config/webserver_ip.txt\n echo $FW_IPADDR > config/fw_ipaddr.txt\n echo $PROTECTED_NET_CIDR > config/protected_net_cidr.txt\n echo $SINK_IPADDR > config/sink_ipaddr.txt\n echo "no" > config/install.txt\n mv vpacketgen.sh /etc/init.d\n sudo update-rc.d vpacketgen.sh defaults\n ./v_packetgen_init.sh\n\n vpg_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: unprotected_private_network }\n fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]\n\n vpg_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vpg_private_ip_1 }}]\n\n vsn_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vsn_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vsn_private_0_port }\n - port: { get_resource: vsn_private_1_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __protected_net_gw__: { get_param: vfw_private_ip_1 }\n __unprotected_net__: { get_param: unprotected_private_net_cidr }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n PROTECTED_NET_GW=__protected_net_gw__\n UNPROTECTED_NET=__unprotected_net__\n UNPROTECTED_NET=$(echo $UNPROTECTED_NET | cut -d\'/\' -f1)\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_sink_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vsink.sh\n chmod +x v_sink_init.sh\n chmod +x vsink.sh\n echo $PROTECTED_NET_GW > config/protected_net_gw.txt\n echo $UNPROTECTED_NET > config/unprotected_net.txt\n echo "no" > config/install.txt\n mv vsink.sh /etc/init.d\n sudo update-rc.d vsink.sh defaults\n ./v_sink_init.sh\n\n vsn_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: protected_private_network }\n fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]\n\n vsn_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vsn_private_ip_1 }}]\n \n',300,'Artifact-UUID3','Base VFW Heat','label','2016-11-14 13:04:07',NULL); -/*!40000 ALTER TABLE `heat_template` ENABLE KEYS */; -UNLOCK TABLES; - -LOCK TABLES `heat_template_params` WRITE; -/*!40000 ALTER TABLE `heat_template_params` DISABLE KEYS */; -INSERT INTO `heat_template_params` VALUES (144,8,'vsn_private_ip_1','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (145,8,'ecomp_private_net_cidr','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (146,8,'public_net_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (147,8,'unprotected_private_net_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (148,8,'webserver_ip','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (149,8,'vfw_image_name','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (150,8,'vnf_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (151,8,'dcae_collector_ip','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (152,8,'protected_private_net_cidr','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (153,8,'vsn_private_ip_0','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (154,8,'vfw_private_ip_0','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (155,8,'vfw_private_ip_1','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (156,8,'vfw_private_ip_2','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (157,8,'unprotected_private_net_cidr','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (158,8,'vsn_name_0','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (159,8,'ecomp_private_net_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (160,8,'vpg_private_ip_1','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (161,8,'vpg_name_0','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (162,8,'vf_module_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (163,8,'pub_key','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (164,8,'protected_private_net_id','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (165,8,'key_name','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (166,8,'vfw_flavor_name','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (167,8,'vpg_private_ip_0','\1','string',NULL); -INSERT INTO `heat_template_params` VALUES (168,8,'vfw_name_0','\1','string',NULL); -/*!40000 ALTER TABLE `heat_template_params` ENABLE KEYS */; -UNLOCK TABLES; - -LOCK TABLES `service` WRITE; -/*!40000 ALTER TABLE `service` DISABLE KEYS */; -INSERT INTO `service` VALUES (11,'vfw-service','1.0','VFW service','2e34774e-715e-4fd5-bd09-7b654622f35i',NULL,NULL,'2016-11-14 13:04:07','585822c7-4027-4f84-ba50-e9248606f112'); -/*!40000 ALTER TABLE `service` ENABLE KEYS */; -UNLOCK TABLES; - -LOCK TABLES `vf_module` WRITE; -/*!40000 ALTER TABLE `vf_module` DISABLE KEYS */; -INSERT INTO `vf_module` VALUES (9,'vfw-service/VFWResource-1::VF_RI1_VFW::module-1','1.0','VF_RI1_VFW::module-1','1.0','1e34774e-715e-4fd5-bd08-7b654622f33f.VF_RI1_VFW::module-1::module-1.group',NULL,8,1,'2016-11-14 13:04:07',NULL,NULL,7,5,'585822c7-4027-4f84-ba50-e9248606f134'); -/*!40000 ALTER TABLE `vf_module` ENABLE KEYS */; -UNLOCK TABLES; - -LOCK TABLES `vnf_resource` WRITE; -/*!40000 ALTER TABLE `vnf_resource` DISABLE KEYS */; -INSERT INTO `vnf_resource` VALUES (7,'vfw-service/VFWResource-1','1.0','HEAT','VFW service',NULL,NULL,'2016-11-14 13:04:07','685822c7-4027-4f84-ba50-e9248606f132',NULL,NULL,'585822c7-4027-4f84-ba50-e9248606f113','1.0','VFWResource-1','VFWResource','585822c7-4027-4f84-ba50-e9248606f112'); -/*!40000 ALTER TABLE `vnf_resource` ENABLE KEYS */; -UNLOCK TABLES; \ No newline at end of file +# LOCK TABLES `heat_environment` WRITE; +# /*!40000 ALTER TABLE `heat_environment` DISABLE KEYS */; +# INSERT INTO `heat_environment` VALUES (5,'base_vfw.env','1.0','vfw-service/VFWResource-1','base_vfw ENV file','parameters:\n vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n vfw_flavor_name: 4 GB General Purpose v1\n public_net_id: 00000000-0000-0000-0000-000000000000\n unprotected_private_net_id: zdfw1fwl01_unprotected\n protected_private_net_id: zdfw1fwl01_protected\n ecomp_private_net_id: oam_ecomp\n unprotected_private_net_cidr: 192.168.10.0/24\n protected_private_net_cidr: 192.168.20.0/24\n ecomp_private_net_cidr: 192.168.9.0/24\n vfw_private_ip_0: 192.168.10.100\n vfw_private_ip_1: 192.168.20.100\n vfw_private_ip_2: 192.168.9.100\n vpg_private_ip_0: 192.168.10.200\n vpg_private_ip_1: 192.168.9.200\n vsn_private_ip_0: 192.168.20.250\n vsn_private_ip_1: 192.168.9.250\n vfw_name_0: zdfw1fwl01fwl01\n vpg_name_0: zdfw1fwl01pgn01\n vsn_name_0: zdfw1fwl01snk01\n vnf_id: vFirewall_demo_app\n vf_module_id: vFirewall\n webserver_ip: 162.242.237.182\n dcae_collector_ip: 192.168.9.1\n key_name: vfw_key\n pub_key: INSERT YOUR PUBLIC KEY HERE','2016-11-14 13:04:07','EnvArtifact-UUID3','Label'); +# /*!40000 ALTER TABLE `heat_environment` ENABLE KEYS */; +# UNLOCK TABLES; +# +# LOCK TABLES `heat_template` WRITE; +# /*!40000 ALTER TABLE `heat_template` DISABLE KEYS */; +# INSERT INTO `heat_template` VALUES (8,'base_vfw.yaml','1.0','VFWResource','base_vfw.yaml','heat_template_version: 2013-05-23\n\ndescription: Heat template to deploy vFirewall demo app for OpenECOMP\n\nparameters:\n vfw_image_name:\n type: string\n label: Image name or ID\n description: Image to be used for compute instance\n vfw_flavor_name:\n type: string\n label: Flavor\n description: Type of instance (flavor) to be used\n public_net_id:\n type: string\n label: Public network name or ID\n description: Public network that enables remote connection to VNF\n unprotected_private_net_id:\n type: string\n label: Unprotected private network name or ID\n description: Private network that connects vPacketGenerator with vFirewall\n protected_private_net_id:\n type: string\n label: Protected private network name or ID\n description: Private network that connects vFirewall with vSink\n ecomp_private_net_id:\n type: string\n label: ECOMP management network name or ID\n description: Private network that connects ECOMP component and the VNF\n unprotected_private_net_cidr:\n type: string\n label: Unprotected private network CIDR\n description: The CIDR of the unprotected private network\n protected_private_net_cidr:\n type: string\n label: Protected private network CIDR\n description: The CIDR of the protected private network\n ecomp_private_net_cidr:\n type: string\n label: ECOMP private network CIDR\n description: The CIDR of the protected private network\n vfw_private_ip_0:\n type: string\n label: vFirewall private IP address towards the unprotected network\n description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator\n vfw_private_ip_1:\n type: string\n label: vFirewall private IP address towards the protected network\n description: Private IP address that is assigned to the vFirewall to communicate with the vSink\n vfw_private_ip_2:\n type: string\n label: vFirewall private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vFirewall to communicate with ECOMP components\n vpg_private_ip_0:\n type: string\n label: vPacketGenerator private IP address towards the unprotected network\n description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall\n vpg_private_ip_1:\n type: string\n label: vPacketGenerator private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vPacketGenerator to communicate with ECOMP components\n vsn_private_ip_0:\n type: string\n label: vSink private IP address towards the protected network\n description: Private IP address that is assigned to the vSink to communicate with the vFirewall\n vsn_private_ip_1:\n type: string\n label: vSink private IP address towards the ECOMP management network\n description: Private IP address that is assigned to the vSink to communicate with ECOMP components\n vfw_name_0:\n type: string\n label: vFirewall name\n description: Name of the vFirewall\n vpg_name_0:\n type: string\n label: vPacketGenerator name\n description: Name of the vPacketGenerator\n vsn_name_0:\n type: string\n label: vSink name\n description: Name of the vSink\n vnf_id:\n type: string\n label: VNF ID\n description: The VNF ID is provided by ECOMP\n vf_module_id:\n type: string\n label: vFirewall module ID\n description: The vFirewall Module ID is provided by ECOMP\n webserver_ip:\n type: string\n label: Webserver IP address\n description: IP address of the webserver that hosts the source code and binaries\n dcae_collector_ip:\n type: string\n label: DCAE collector IP address\n description: IP address of the DCAE collector\n key_name:\n type: string\n label: Key pair name\n description: Public/Private key pair name\n pub_key:\n type: string\n label: Public key\n description: Public key to be installed on the compute instance\n\nresources:\n my_keypair:\n type: OS::Nova::KeyPair\n properties:\n name: { get_param: key_name }\n public_key: { get_param: pub_key }\n save_private_key: false\n\n unprotected_private_network:\n type: OS::Neutron::Net\n properties:\n name: { get_param: unprotected_private_net_id }\n\n protected_private_network:\n type: OS::Neutron::Net\n properties:\n name: { get_param: protected_private_net_id }\n\n unprotected_private_subnet:\n type: OS::Neutron::Subnet\n properties:\n network_id: { get_resource: unprotected_private_network }\n cidr: { get_param: unprotected_private_net_cidr }\n\n protected_private_subnet:\n type: OS::Neutron::Subnet\n properties:\n network_id: { get_resource: protected_private_network }\n cidr: { get_param: protected_private_net_cidr }\n\n vfw_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vfw_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vfw_private_0_port }\n - port: { get_resource: vfw_private_1_port }\n - port: { get_resource: vfw_private_2_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __dcae_collector_ip__ : { get_param: dcae_collector_ip }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n DCAE_COLLECTOR_IP=__dcae_collector_ip__\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_firewall_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vfirewall.sh\n chmod +x v_firewall_init.sh\n chmod +x vfirewall.sh\n echo $WEBSERVER_IP > config/webserver_ip.txt\n echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt\n echo "no" > config/install.txt\n mv vfirewall.sh /etc/init.d\n sudo update-rc.d vfirewall.sh defaults\n ./v_firewall_init.sh\n\n vfw_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: unprotected_private_network }\n fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]\n\n vfw_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: protected_private_network }\n fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]\n\n vfw_private_2_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vfw_private_ip_2 }}]\n\n vpg_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vpg_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vpg_private_0_port }\n - port: { get_resource: vpg_private_1_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __fw_ipaddr__: { get_param: vfw_private_ip_0 }\n __protected_net_cidr__: { get_param: protected_private_net_cidr }\n __sink_ipaddr__: { get_param: vsn_private_ip_0 }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n FW_IPADDR=__fw_ipaddr__\n PROTECTED_NET_CIDR=__protected_net_cidr__\n SINK_IPADDR=__sink_ipaddr__\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_packetgen_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vpacketgen.sh\n chmod +x v_packetgen_init.sh\n chmod +x vpacketgen.sh\n echo $WEBSERVER_IP > config/webserver_ip.txt\n echo $FW_IPADDR > config/fw_ipaddr.txt\n echo $PROTECTED_NET_CIDR > config/protected_net_cidr.txt\n echo $SINK_IPADDR > config/sink_ipaddr.txt\n echo "no" > config/install.txt\n mv vpacketgen.sh /etc/init.d\n sudo update-rc.d vpacketgen.sh defaults\n ./v_packetgen_init.sh\n\n vpg_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: unprotected_private_network }\n fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]\n\n vpg_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vpg_private_ip_1 }}]\n\n vsn_0:\n type: OS::Nova::Server\n properties:\n image: { get_param: vfw_image_name }\n flavor: { get_param: vfw_flavor_name }\n name: { get_param: vsn_name_0 }\n key_name: { get_resource: my_keypair }\n networks:\n - network: { get_param: public_net_id }\n - port: { get_resource: vsn_private_0_port }\n - port: { get_resource: vsn_private_1_port }\n metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n user_data_format: RAW\n user_data:\n str_replace:\n params:\n __webserver__: { get_param: webserver_ip }\n __protected_net_gw__: { get_param: vfw_private_ip_1 }\n __unprotected_net__: { get_param: unprotected_private_net_cidr }\n template: |\n #!/bin/bash\n\n WEBSERVER_IP=__webserver__\n PROTECTED_NET_GW=__protected_net_gw__\n UNPROTECTED_NET=__unprotected_net__\n UNPROTECTED_NET=$(echo $UNPROTECTED_NET | cut -d\'/\' -f1)\n\n mkdir /opt/config\n cd /opt\n wget http://$WEBSERVER_IP/demo_repo/v_sink_init.sh\n wget http://$WEBSERVER_IP/demo_repo/vsink.sh\n chmod +x v_sink_init.sh\n chmod +x vsink.sh\n echo $PROTECTED_NET_GW > config/protected_net_gw.txt\n echo $UNPROTECTED_NET > config/unprotected_net.txt\n echo "no" > config/install.txt\n mv vsink.sh /etc/init.d\n sudo update-rc.d vsink.sh defaults\n ./v_sink_init.sh\n\n vsn_private_0_port:\n type: OS::Neutron::Port\n properties:\n network: { get_resource: protected_private_network }\n fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]\n\n vsn_private_1_port:\n type: OS::Neutron::Port\n properties:\n network: { get_param: ecomp_private_net_id }\n fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vsn_private_ip_1 }}]\n \n',300,'Artifact-UUID3','Base VFW Heat','label','2016-11-14 13:04:07',NULL); +# /*!40000 ALTER TABLE `heat_template` ENABLE KEYS */; +# UNLOCK TABLES; +# +# LOCK TABLES `heat_template_params` WRITE; +# /*!40000 ALTER TABLE `heat_template_params` DISABLE KEYS */; +# INSERT INTO `heat_template_params` VALUES (144,8,'vsn_private_ip_1','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (145,8,'ecomp_private_net_cidr','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (146,8,'public_net_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (147,8,'unprotected_private_net_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (148,8,'webserver_ip','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (149,8,'vfw_image_name','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (150,8,'vnf_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (151,8,'dcae_collector_ip','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (152,8,'protected_private_net_cidr','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (153,8,'vsn_private_ip_0','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (154,8,'vfw_private_ip_0','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (155,8,'vfw_private_ip_1','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (156,8,'vfw_private_ip_2','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (157,8,'unprotected_private_net_cidr','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (158,8,'vsn_name_0','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (159,8,'ecomp_private_net_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (160,8,'vpg_private_ip_1','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (161,8,'vpg_name_0','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (162,8,'vf_module_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (163,8,'pub_key','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (164,8,'protected_private_net_id','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (165,8,'key_name','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (166,8,'vfw_flavor_name','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (167,8,'vpg_private_ip_0','\1','string',NULL); +# INSERT INTO `heat_template_params` VALUES (168,8,'vfw_name_0','\1','string',NULL); +# /*!40000 ALTER TABLE `heat_template_params` ENABLE KEYS */; +# UNLOCK TABLES; +# +# LOCK TABLES `service` WRITE; +# /*!40000 ALTER TABLE `service` DISABLE KEYS */; +# INSERT INTO `service` VALUES (11,'vfw-service','1.0','VFW service','2e34774e-715e-4fd5-bd09-7b654622f35i',NULL,NULL,'2016-11-14 13:04:07','585822c7-4027-4f84-ba50-e9248606f112'); +# /*!40000 ALTER TABLE `service` ENABLE KEYS */; +# UNLOCK TABLES; +# +# LOCK TABLES `vf_module` WRITE; +# /*!40000 ALTER TABLE `vf_module` DISABLE KEYS */; +# INSERT INTO `vf_module` VALUES (9,'vfw-service/VFWResource-1::VF_RI1_VFW::module-1','1.0','VF_RI1_VFW::module-1','1.0','1e34774e-715e-4fd5-bd08-7b654622f33f.VF_RI1_VFW::module-1::module-1.group',NULL,8,1,'2016-11-14 13:04:07',NULL,NULL,7,5,'585822c7-4027-4f84-ba50-e9248606f134'); +# /*!40000 ALTER TABLE `vf_module` ENABLE KEYS */; +# UNLOCK TABLES; +# +# LOCK TABLES `vnf_resource` WRITE; +# /*!40000 ALTER TABLE `vnf_resource` DISABLE KEYS */; +# INSERT INTO `vnf_resource` VALUES (7,'vfw-service/VFWResource-1','1.0','HEAT','VFW service',NULL,NULL,'2016-11-14 13:04:07','685822c7-4027-4f84-ba50-e9248606f132',NULL,NULL,'585822c7-4027-4f84-ba50-e9248606f113','1.0','VFWResource-1','VFWResource','585822c7-4027-4f84-ba50-e9248606f112'); +# /*!40000 ALTER TABLE `vnf_resource` ENABLE KEYS */; +# UNLOCK TABLES; diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.6.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.7.3-ee.sql similarity index 90% rename from kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.6.0.sql rename to kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.7.3-ee.sql index f40f3dc3de..b9b8dd62c9 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.6.0.sql +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_engine_7.7.3-ee.sql @@ -1,7 +1,6 @@ -# Start of Statements added for MSO DROP DATABASE IF EXISTS `camundabpmn`; -CREATE DATABASE /*!32312 IF NOT EXISTS*/ `camundabpmn` /*!40100 DEFAULT CHARACTER SET latin1 */; +CREATE DATABASE `camundabpmn`; USE `camundabpmn`; @@ -10,7 +9,8 @@ delete from mysql.user where User='camunda'; CREATE USER 'camunda'; GRANT ALL on camundabpmn.* to 'camunda' identified by 'camunda123' with GRANT OPTION; FLUSH PRIVILEGES; -# End of Statements added for MSO + +USE `camundabpmn`; create table ACT_GE_PROPERTY ( NAME_ varchar(64), @@ -31,6 +31,9 @@ values ('next.dbid', '1', 1); insert into ACT_GE_PROPERTY values ('deployment.lock', '0', 1); +insert into ACT_GE_PROPERTY +values ('history.cleanup.job.lock', '0', 1); + create table ACT_GE_BYTEARRAY ( ID_ varchar(64), REV_ integer, @@ -129,6 +132,7 @@ create table ACT_RE_PROCDEF ( SUSPENSION_STATE_ integer, TENANT_ID_ varchar(64), VERSION_TAG_ varchar(64), + HISTORY_TTL_ integer, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -182,8 +186,8 @@ create table ACT_RU_VARIABLE ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), + TEXT_ LONGBLOB NULL, + TEXT2_ LONGBLOB NULL, VAR_SCOPE_ varchar(64) not null, SEQUENCE_COUNTER_ bigint, IS_CONCURRENT_LOCAL_ TINYINT, @@ -198,7 +202,7 @@ create table ACT_RU_EVENT_SUBSCR ( EVENT_NAME_ varchar(255), EXECUTION_ID_ varchar(64), PROC_INST_ID_ varchar(64), - ACTIVITY_ID_ varchar(64), + ACTIVITY_ID_ varchar(255), CONFIGURATION_ varchar(255), CREATED_ timestamp(3) not null, TENANT_ID_ varchar(64), @@ -328,6 +332,7 @@ CREATE INDEX ACT_IDX_METER_LOG ON ACT_RU_METER_LOG(NAME_, TIMESTAMP_); create index ACT_IDX_EXT_TASK_TOPIC on ACT_RU_EXT_TASK(TOPIC_NAME_); create index ACT_IDX_EXT_TASK_TENANT_ID on ACT_RU_EXT_TASK(TENANT_ID_); create index ACT_IDX_EXT_TASK_PRIORITY ON ACT_RU_EXT_TASK(PRIORITY_); +create index ACT_IDX_EXT_TASK_ERR_DETAILS ON ACT_RU_EXT_TASK(ERROR_DETAILS_ID_); create index ACT_IDX_AUTH_GROUP_ID ON ACT_RU_AUTHORIZATION(GROUP_ID_); create index ACT_IDX_JOB_JOB_DEF_ID on ACT_RU_JOB(JOB_DEF_ID_); @@ -510,6 +515,7 @@ create table ACT_RE_CASE_DEF ( RESOURCE_NAME_ varchar(4000), DGRM_RESOURCE_NAME_ varchar(4000), TENANT_ID_ varchar(64), + HISTORY_TTL_ integer, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -618,6 +624,7 @@ create table ACT_RE_DECISION_DEF ( DEC_REQ_ID_ varchar(64), DEC_REQ_KEY_ varchar(255), TENANT_ID_ varchar(64), + HISTORY_TTL_ integer, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -735,8 +742,8 @@ create table ACT_HI_VARINST ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), + TEXT_ LONGBLOB NULL, + TEXT2_ LONGBLOB NULL, TENANT_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -762,10 +769,11 @@ create table ACT_HI_DETAIL ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), + TEXT_ LONGBLOB NULL, + TEXT2_ LONGBLOB NULL, SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), + OPERATION_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -898,6 +906,27 @@ create table ACT_HI_BATCH ( primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; +create table ACT_HI_EXT_TASK_LOG ( + ID_ varchar(64) not null, + TIMESTAMP_ timestamp(3) not null, + EXT_TASK_ID_ varchar(64) not null, + RETRIES_ integer, + TOPIC_NAME_ varchar(255), + WORKER_ID_ varchar(255), + PRIORITY_ bigint NOT NULL DEFAULT 0, + ERROR_MSG_ varchar(4000), + ERROR_DETAILS_ID_ varchar(64), + ACT_ID_ varchar(255), + ACT_INST_ID_ varchar(64), + EXECUTION_ID_ varchar(64), + PROC_INST_ID_ varchar(64), + PROC_DEF_ID_ varchar(64), + PROC_DEF_KEY_ varchar(255), + TENANT_ID_ varchar(64), + STATE_ integer, + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_); @@ -944,6 +973,11 @@ create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_); create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_); create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_); +create index ACT_HI_EXT_TASK_LOG_PROCINST on ACT_HI_EXT_TASK_LOG(PROC_INST_ID_); +create index ACT_HI_EXT_TASK_LOG_PROCDEF on ACT_HI_EXT_TASK_LOG(PROC_DEF_ID_); +create index ACT_HI_EXT_TASK_LOG_PROC_DEF_KEY on ACT_HI_EXT_TASK_LOG(PROC_DEF_KEY_); +create index ACT_HI_EXT_TASK_LOG_TENANT_ID on ACT_HI_EXT_TASK_LOG(TENANT_ID_); + create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_); create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_); create table ACT_HI_CASEINST ( @@ -1025,8 +1059,8 @@ create table ACT_HI_DEC_IN ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), + TEXT_ LONGBLOB NULL, + TEXT2_ LONGBLOB NULL, TENANT_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -1044,8 +1078,8 @@ create table ACT_HI_DEC_OUT ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), + TEXT_ LONGBLOB NULL, + TEXT2_ LONGBLOB NULL, TENANT_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -1069,3 +1103,93 @@ create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_) create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_); create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_); + + +-- mariadb identity: + +create table ACT_ID_GROUP ( + ID_ varchar(64), + REV_ integer, + NAME_ varchar(255), + TYPE_ varchar(255), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_ID_MEMBERSHIP ( + USER_ID_ varchar(64), + GROUP_ID_ varchar(64), + primary key (USER_ID_, GROUP_ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_ID_USER ( + ID_ varchar(64), + REV_ integer, + FIRST_ varchar(255), + LAST_ varchar(255), + EMAIL_ varchar(255), + PWD_ varchar(255), + SALT_ varchar(255), + PICTURE_ID_ varchar(64), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_ID_INFO ( + ID_ varchar(64), + REV_ integer, + USER_ID_ varchar(64), + TYPE_ varchar(64), + KEY_ varchar(255), + VALUE_ varchar(255), + PASSWORD_ LONGBLOB, + PARENT_ID_ varchar(255), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_ID_TENANT ( + ID_ varchar(64), + REV_ integer, + NAME_ varchar(255), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_ID_TENANT_MEMBER ( + ID_ varchar(64) not null, + TENANT_ID_ varchar(64) not null, + USER_ID_ varchar(64), + GROUP_ID_ varchar(64), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +alter table ACT_ID_MEMBERSHIP + add constraint ACT_FK_MEMB_GROUP + foreign key (GROUP_ID_) + references ACT_ID_GROUP (ID_); + +alter table ACT_ID_MEMBERSHIP + add constraint ACT_FK_MEMB_USER + foreign key (USER_ID_) + references ACT_ID_USER (ID_); + +alter table ACT_ID_TENANT_MEMBER + add constraint ACT_UNIQ_TENANT_MEMB_USER + unique (TENANT_ID_, USER_ID_); + +alter table ACT_ID_TENANT_MEMBER + add constraint ACT_UNIQ_TENANT_MEMB_GROUP + unique (TENANT_ID_, GROUP_ID_); + +alter table ACT_ID_TENANT_MEMBER + add constraint ACT_FK_TENANT_MEMB + foreign key (TENANT_ID_) + references ACT_ID_TENANT (ID_); + +alter table ACT_ID_TENANT_MEMBER + add constraint ACT_FK_TENANT_MEMB_USER + foreign key (USER_ID_) + references ACT_ID_USER (ID_); + +alter table ACT_ID_TENANT_MEMBER + add constraint ACT_FK_TENANT_MEMB_GROUP + foreign key (GROUP_ID_) + references ACT_ID_GROUP (ID_); + diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_identity_7.6.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_identity_7.6.0.sql deleted file mode 100644 index e4a81e45f4..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mariadb_identity_7.6.0.sql +++ /dev/null @@ -1,88 +0,0 @@ -# Start of statements added for MSO -USE `camundabpmn`; -# End of statements added for MSO - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ LONGBLOB, - PARENT_ID_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_TENANT ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_TENANT_MEMBER ( - ID_ varchar(64) not null, - TENANT_ID_ varchar(64) not null, - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_USER - unique (TENANT_ID_, USER_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_GROUP - unique (TENANT_ID_, GROUP_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB - foreign key (TENANT_ID_) - references ACT_ID_TENANT (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_create_camunda_admin.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_create_camunda_admin.sql index 3beeaf1140..c550304d9b 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_create_camunda_admin.sql +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_create_camunda_admin.sql @@ -1,9 +1,26 @@ USE camundabpmn; -INSERT INTO `act_id_user` VALUES ('admin',1,'admin','user','camundaadmin@openecomp.org','{SHA}Y7MVubSDgzJeaulJRLN2dFyNCyc=',NULL); +INSERT INTO `act_id_group` (`ID_`, `REV_`, `NAME_`, `TYPE_`) VALUES ('camunda-admin',1,'camunda BPM Administrators','SYSTEM'); -INSERT INTO `act_id_group` VALUES ('camunda-admin',1,'camunda BPM Administrators','SYSTEM'); +INSERT INTO `act_id_user` (`ID_`, `REV_`, `FIRST_`, `LAST_`, `EMAIL_`, `PWD_`, `SALT_`, `PICTURE_ID_`) VALUES ('admin',1,'admin','user','camundaadmin@onap.org','{SHA-512}p9Y4lC0X70X5ihfqGTNz/NDuWRbAgtnlEfjbYLMHLp0tMl//B7ujc80MLcHWlJ+jIG14uWTI6AqQYp6PykCxZg==','2vEsAj7cap7XEidkrd4BVg==',NULL); -INSERT INTO `act_id_membership` VALUES ('admin','camunda-admin'); +INSERT INTO `act_id_membership` (`USER_ID_`, `GROUP_ID_`) VALUES ('admin','camunda-admin'); + +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68bc7a75-9cdc-11e7-a63d-0242ac120003',1,1,NULL,'admin',1,'admin',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68c13566-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,2,'camunda-admin',2); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68c4dee7-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,0,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68ca5d28-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,1,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68cd9179-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,2,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68d0ecda-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,3,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68d384eb-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,4,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68d5a7cc-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,5,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68d83fdd-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,6,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68dad7ee-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,7,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68dd48ef-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,8,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68e0a450-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,9,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68e31551-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,10,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68e5ad62-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,11,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68e908c3-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,12,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68eb52b4-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,13,'*',2147483647); +INSERT INTO `act_ru_authorization` (`ID_`, `REV_`, `TYPE_`, `GROUP_ID_`, `USER_ID_`, `RESOURCE_TYPE_`, `RESOURCE_ID_`, `PERMS_`) VALUES ('68edeac5-9cdc-11e7-a63d-0242ac120003',1,1,'camunda-admin',NULL,14,'*',2147483647); -INSERT INTO `act_ru_authorization` VALUES ('4ca68335-b7c5-11e6-b411-0242ac110003',1,1,NULL,'admin',1,'admin',2147483647),('4ca91b46-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,2,'camunda-admin',2),('4cab3e27-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,0,'*',2147483647),('4cadd638-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,1,'*',2147483647),('4caf0eb9-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,2,'*',2147483647),('4caff91a-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,3,'*',2147483647),('4cb10a8b-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,4,'*',2147483647),('4cb2430c-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,5,'*',2147483647),('4cb32d6d-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,6,'*',2147483647),('4cb43ede-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,7,'*',2147483647),('4cb5293f-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,8,'*',2147483647),('4cb5ec90-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,9,'*',2147483647); diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_engine_7.3.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_engine_7.3.0.sql deleted file mode 100644 index c25acf16c5..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_engine_7.3.0.sql +++ /dev/null @@ -1,748 +0,0 @@ -# Start of Statements added for MSO -DROP DATABASE IF EXISTS `camundabpmn`; - -CREATE DATABASE /*!32312 IF NOT EXISTS*/ `camundabpmn` /*!40100 DEFAULT CHARACTER SET latin1 */; - -USE `camundabpmn`; - -# DROP USER IF EXISTS 'camunda'; -delete from mysql.user where User='camunda'; -CREATE USER 'camunda'; -GRANT ALL on camundabpmn.* to 'camunda' identified by 'camunda123' with GRANT OPTION; -FLUSH PRIVILEGES; -# End of Statements added for MSO - -create table ACT_GE_PROPERTY ( - NAME_ varchar(64), - VALUE_ varchar(300), - REV_ integer, - primary key (NAME_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -insert into ACT_GE_PROPERTY -values ('schema.version', 'fox', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(fox)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -insert into ACT_GE_PROPERTY -values ('deployment.lock', '0', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - DEPLOYMENT_ID_ varchar(64), - BYTES_ LONGBLOB, - GENERATED_ TINYINT, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RE_DEPLOYMENT ( - ID_ varchar(64), - NAME_ varchar(255), - DEPLOY_TIME_ timestamp, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_EXECUTION ( - ID_ varchar(64), - REV_ integer, - PROC_INST_ID_ varchar(64), - BUSINESS_KEY_ varchar(255), - PARENT_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - SUPER_EXEC_ varchar(64), - SUPER_CASE_EXEC_ varchar(64), - CASE_INST_ID_ varchar(64), - ACT_ID_ varchar(255), - ACT_INST_ID_ varchar(64), - IS_ACTIVE_ TINYINT, - IS_CONCURRENT_ TINYINT, - IS_SCOPE_ TINYINT, - IS_EVENT_SCOPE_ TINYINT, - SUSPENSION_STATE_ integer, - CACHED_ENT_STATE_ integer, - SEQUENCE_COUNTER_ bigint, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_JOB ( - ID_ varchar(64) NOT NULL, - REV_ integer, - TYPE_ varchar(255) NOT NULL, - LOCK_EXP_TIME_ timestamp NULL, - LOCK_OWNER_ varchar(255), - EXCLUSIVE_ boolean, - EXECUTION_ID_ varchar(64), - PROCESS_INSTANCE_ID_ varchar(64), - PROCESS_DEF_ID_ varchar(64), - PROCESS_DEF_KEY_ varchar(64), - RETRIES_ integer, - EXCEPTION_STACK_ID_ varchar(64), - EXCEPTION_MSG_ varchar(4000), - DUEDATE_ timestamp NULL, - REPEAT_ varchar(255), - HANDLER_TYPE_ varchar(255), - HANDLER_CFG_ varchar(4000), - DEPLOYMENT_ID_ varchar(64), - SUSPENSION_STATE_ integer, - JOB_DEF_ID_ varchar(64), - SEQUENCE_COUNTER_ bigint, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_JOBDEF ( - ID_ varchar(64) NOT NULL, - REV_ integer, - PROC_DEF_ID_ varchar(64) NOT NULL, - PROC_DEF_KEY_ varchar(255) NOT NULL, - ACT_ID_ varchar(255) NOT NULL, - JOB_TYPE_ varchar(255) NOT NULL, - JOB_CONFIGURATION_ varchar(255), - SUSPENSION_STATE_ integer, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RE_PROCDEF ( - ID_ varchar(64) not null, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) not null, - VERSION_ integer not null, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - HAS_START_FORM_KEY_ TINYINT, - SUSPENSION_STATE_ integer, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_TASK ( - ID_ varchar(64), - REV_ integer, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - CASE_DEF_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - TASK_DEF_KEY_ varchar(255), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - DELEGATION_ varchar(64), - PRIORITY_ integer, - CREATE_TIME_ timestamp, - DUE_DATE_ datetime, - FOLLOW_UP_DATE_ datetime, - SUSPENSION_STATE_ integer, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_IDENTITYLINK ( - ID_ varchar(64), - REV_ integer, - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_VARIABLE ( - ID_ varchar(64) not null, - REV_ integer, - TYPE_ varchar(255) not null, - NAME_ varchar(255) not null, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - TASK_ID_ varchar(64), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - VAR_SCOPE_ varchar(64) not null, - SEQUENCE_COUNTER_ bigint, - IS_CONCURRENT_LOCAL_ TINYINT, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_EVENT_SUBSCR ( - ID_ varchar(64) not null, - REV_ integer, - EVENT_TYPE_ varchar(255) not null, - EVENT_NAME_ varchar(255), - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTIVITY_ID_ varchar(64), - CONFIGURATION_ varchar(255), - CREATED_ timestamp not null, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_INCIDENT ( - ID_ varchar(64) not null, - REV_ integer not null, - INCIDENT_TIMESTAMP_ timestamp not null, - INCIDENT_MSG_ varchar(4000), - INCIDENT_TYPE_ varchar(255) not null, - EXECUTION_ID_ varchar(64), - ACTIVITY_ID_ varchar(255), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - CAUSE_INCIDENT_ID_ varchar(64), - ROOT_CAUSE_INCIDENT_ID_ varchar(64), - CONFIGURATION_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_AUTHORIZATION ( - ID_ varchar(64) not null, - REV_ integer not null, - TYPE_ integer not null, - GROUP_ID_ varchar(255), - USER_ID_ varchar(255), - RESOURCE_TYPE_ integer not null, - RESOURCE_ID_ varchar(64), - PERMS_ integer, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_FILTER ( - ID_ varchar(64) not null, - REV_ integer not null, - RESOURCE_TYPE_ varchar(255) not null, - NAME_ varchar(255) not null, - OWNER_ varchar(255), - QUERY_ LONGTEXT not null, - PROPERTIES_ LONGTEXT, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_METER_LOG ( - ID_ varchar(64) not null, - NAME_ varchar(64) not null, - VALUE_ bigint, - TIMESTAMP_ timestamp not null, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_); -create index ACT_IDX_JOB_PROCINST on ACT_RU_JOB(PROCESS_INSTANCE_ID_); -create index ACT_IDX_METER_LOG on ACT_RU_METER_LOG(NAME_,TIMESTAMP_); - -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF - unique (KEY_,VERSION_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade; - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER - foreign key (SUPER_EXEC_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK - foreign key (TASK_ID_) - references ACT_RU_TASK (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF(ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY - foreign key (BYTEARRAY_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION - foreign key (EXCEPTION_STACK_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_CAUSE - foreign key (CAUSE_INCIDENT_ID_) - references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade; - -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_RCAUSE - foreign key (ROOT_CAUSE_INCIDENT_ID_) - references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade; - -alter table ACT_RU_AUTHORIZATION - add constraint ACT_UNIQ_AUTH_USER - unique (USER_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_); - -alter table ACT_RU_AUTHORIZATION - add constraint ACT_UNIQ_AUTH_GROUP - unique (GROUP_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_UNIQ_VARIABLE - unique (VAR_SCOPE_, NAME_); - --- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 -- -create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT(CAUSE_INCIDENT_ID_); -create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT(EXECUTION_ID_); -create index ACT_IDX_INC_PROCDEFID on ACT_RU_INCIDENT(PROC_DEF_ID_); -create index ACT_IDX_INC_PROCINSTID on ACT_RU_INCIDENT(PROC_INST_ID_); -create index ACT_IDX_INC_ROOTCAUSEINCID on ACT_RU_INCIDENT(ROOT_CAUSE_INCIDENT_ID_); --- create case definition table -- -create table ACT_RE_CASE_DEF ( - ID_ varchar(64) not null, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) not null, - VERSION_ integer not null, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create case execution table -- -create table ACT_RU_CASE_EXECUTION ( - ID_ varchar(64) NOT NULL, - REV_ integer, - CASE_INST_ID_ varchar(64), - SUPER_CASE_EXEC_ varchar(64), - SUPER_EXEC_ varchar(64), - BUSINESS_KEY_ varchar(255), - PARENT_ID_ varchar(64), - CASE_DEF_ID_ varchar(64), - ACT_ID_ varchar(255), - PREV_STATE_ integer, - CURRENT_STATE_ integer, - REQUIRED_ boolean, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create case sentry part table -- - -create table ACT_RU_CASE_SENTRY_PART ( - ID_ varchar(64) NOT NULL, - REV_ integer, - CASE_INST_ID_ varchar(64), - CASE_EXEC_ID_ varchar(64), - SENTRY_ID_ varchar(255), - TYPE_ varchar(255), - SOURCE_CASE_EXEC_ID_ varchar(64), - STANDARD_EVENT_ varchar(255), - SATISFIED_ boolean, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create unique constraint on ACT_RE_CASE_DEF -- -alter table ACT_RE_CASE_DEF - add constraint ACT_UNIQ_CASE_DEF - unique (KEY_,VERSION_); - --- create index on business key -- -create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION(BUSINESS_KEY_); - --- create foreign key constraints on ACT_RU_CASE_EXECUTION -- -alter table ACT_RU_CASE_EXECUTION - add constraint ACT_FK_CASE_EXE_CASE_INST - foreign key (CASE_INST_ID_) - references ACT_RU_CASE_EXECUTION(ID_) on delete cascade on update cascade; - -alter table ACT_RU_CASE_EXECUTION - add constraint ACT_FK_CASE_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_CASE_EXECUTION(ID_); - -alter table ACT_RU_CASE_EXECUTION - add constraint ACT_FK_CASE_EXE_CASE_DEF - foreign key (CASE_DEF_ID_) - references ACT_RE_CASE_DEF(ID_); - --- create foreign key constraints on ACT_RU_VARIABLE -- -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_CASE_EXE - foreign key (CASE_EXECUTION_ID_) - references ACT_RU_CASE_EXECUTION(ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_CASE_INST - foreign key (CASE_INST_ID_) - references ACT_RU_CASE_EXECUTION(ID_); - --- create foreign key constraints on ACT_RU_TASK -- -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_CASE_EXE - foreign key (CASE_EXECUTION_ID_) - references ACT_RU_CASE_EXECUTION(ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_CASE_DEF - foreign key (CASE_DEF_ID_) - references ACT_RE_CASE_DEF(ID_); - --- create foreign key constraints on ACT_RU_CASE_SENTRY_PART -- -alter table ACT_RU_CASE_SENTRY_PART - add constraint ACT_FK_CASE_SENTRY_CASE_INST - foreign key (CASE_INST_ID_) - references ACT_RU_CASE_EXECUTION(ID_); - -alter table ACT_RU_CASE_SENTRY_PART - add constraint ACT_FK_CASE_SENTRY_CASE_EXEC - foreign key (CASE_EXEC_ID_) - references ACT_RU_CASE_EXECUTION(ID_); -create table ACT_HI_PROCINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - BUSINESS_KEY_ varchar(255), - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64) not null, - START_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ bigint, - START_USER_ID_ varchar(255), - START_ACT_ID_ varchar(255), - END_ACT_ID_ varchar(255), - SUPER_PROCESS_INSTANCE_ID_ varchar(64), - SUPER_CASE_INSTANCE_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - DELETE_REASON_ varchar(4000), - primary key (ID_), - unique (PROC_INST_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_ACTINST ( - ID_ varchar(64) not null, - PARENT_ACT_INST_ID_ varchar(64), - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - EXECUTION_ID_ varchar(64) not null, - ACT_ID_ varchar(255) not null, - TASK_ID_ varchar(64), - CALL_PROC_INST_ID_ varchar(64), - CALL_CASE_INST_ID_ varchar(64), - ACT_NAME_ varchar(255), - ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(64), - START_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ bigint, - ACT_INST_STATE_ integer, - SEQUENCE_COUNTER_ bigint, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_TASKINST ( - ID_ varchar(64) not null, - TASK_DEF_KEY_ varchar(255), - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - CASE_DEF_KEY_ varchar(255), - CASE_DEF_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - START_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ bigint, - DELETE_REASON_ varchar(4000), - PRIORITY_ integer, - DUE_DATE_ datetime, - FOLLOW_UP_DATE_ datetime, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_VARINST ( - ID_ varchar(64) not null, - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - CASE_DEF_KEY_ varchar(255), - CASE_DEF_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(100), - REV_ integer, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_DETAIL ( - ID_ varchar(64) not null, - TYPE_ varchar(255) not null, - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - CASE_DEF_KEY_ varchar(255), - CASE_DEF_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - VAR_INST_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(255), - REV_ integer, - TIME_ datetime not null, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - SEQUENCE_COUNTER_ bigint, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_COMMENT ( - ID_ varchar(64) not null, - TYPE_ varchar(255), - TIME_ datetime not null, - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTION_ varchar(255), - MESSAGE_ varchar(4000), - FULL_MSG_ LONGBLOB, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_ATTACHMENT ( - ID_ varchar(64) not null, - REV_ integer, - USER_ID_ varchar(255), - NAME_ varchar(255), - DESCRIPTION_ varchar(4000), - TYPE_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - URL_ varchar(4000), - CONTENT_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_OP_LOG ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64), - PROC_DEF_KEY_ varchar(255), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - CASE_DEF_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - CASE_EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - JOB_ID_ varchar(64), - JOB_DEF_ID_ varchar(64), - USER_ID_ varchar(255), - TIMESTAMP_ timestamp not null, - OPERATION_TYPE_ varchar(64), - OPERATION_ID_ varchar(64), - ENTITY_TYPE_ varchar(30), - PROPERTY_ varchar(64), - ORG_VALUE_ varchar(4000), - NEW_VALUE_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_INCIDENT ( - ID_ varchar(64) not null, - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - CREATE_TIME_ timestamp not null, - END_TIME_ timestamp null, - INCIDENT_MSG_ varchar(4000), - INCIDENT_TYPE_ varchar(255) not null, - ACTIVITY_ID_ varchar(255), - CAUSE_INCIDENT_ID_ varchar(64), - ROOT_CAUSE_INCIDENT_ID_ varchar(64), - CONFIGURATION_ varchar(255), - INCIDENT_STATE_ integer, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_JOB_LOG ( - ID_ varchar(64) not null, - TIMESTAMP_ timestamp not null, - JOB_ID_ varchar(64) not null, - JOB_DUEDATE_ timestamp NULL, - JOB_RETRIES_ integer, - JOB_EXCEPTION_MSG_ varchar(4000), - JOB_EXCEPTION_STACK_ID_ varchar(64), - JOB_STATE_ integer, - JOB_DEF_ID_ varchar(64), - JOB_DEF_TYPE_ varchar(255), - JOB_DEF_CONFIGURATION_ varchar(255), - ACT_ID_ varchar(255), - EXECUTION_ID_ varchar(64), - PROCESS_INSTANCE_ID_ varchar(64), - PROCESS_DEF_ID_ varchar(64), - PROCESS_DEF_KEY_ varchar(255), - DEPLOYMENT_ID_ varchar(64), - SEQUENCE_COUNTER_ bigint, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); - -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_, ID_); -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); - -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL(CASE_INST_ID_); -create index ACT_IDX_HI_DETAIL_CASE_EXEC on ACT_HI_DETAIL(CASE_EXECUTION_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); - -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST(CASE_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); - -create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_); -create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG(PROCESS_DEF_ID_); -create table ACT_HI_CASEINST ( - ID_ varchar(64) not null, - CASE_INST_ID_ varchar(64) not null, - BUSINESS_KEY_ varchar(255), - CASE_DEF_ID_ varchar(64) not null, - CREATE_TIME_ datetime not null, - CLOSE_TIME_ datetime, - DURATION_ bigint, - STATE_ integer, - CREATE_USER_ID_ varchar(255), - SUPER_CASE_INSTANCE_ID_ varchar(64), - SUPER_PROCESS_INSTANCE_ID_ varchar(64), - primary key (ID_), - unique (CASE_INST_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_CASEACTINST ( - ID_ varchar(64) not null, - PARENT_ACT_INST_ID_ varchar(64), - CASE_DEF_ID_ varchar(64) not null, - CASE_INST_ID_ varchar(64) not null, - CASE_ACT_ID_ varchar(255) not null, - TASK_ID_ varchar(64), - CALL_PROC_INST_ID_ varchar(64), - CALL_CASE_INST_ID_ varchar(64), - CASE_ACT_NAME_ varchar(255), - CASE_ACT_TYPE_ varchar(255), - CREATE_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ bigint, - STATE_ integer, - REQUIRED_ boolean, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create index ACT_IDX_HI_CAS_I_CLOSE on ACT_HI_CASEINST(CLOSE_TIME_); -create index ACT_IDX_HI_CAS_I_BUSKEY on ACT_HI_CASEINST(BUSINESS_KEY_); -create index ACT_IDX_HI_CAS_A_I_CREATE on ACT_HI_CASEACTINST(CREATE_TIME_); -create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST(END_TIME_); -create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST(CASE_ACT_ID_, END_TIME_, ID_); -create index ACT_IDX_HI_CAS_A_I_CASEINST on ACT_HI_CASEACTINST(CASE_INST_ID_, CASE_ACT_ID_); diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_identity_7.3.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_identity_7.3.0.sql deleted file mode 100644 index dc72917cdf..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_identity_7.3.0.sql +++ /dev/null @@ -1,50 +0,0 @@ -# Start of statements added for MSO -USE `camundabpmn`; -# End of statements added for MSO - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ LONGBLOB, - PARENT_ID_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0.sql deleted file mode 100644 index 09c53ea059..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0.sql +++ /dev/null @@ -1,11 +0,0 @@ -# MSO updates to the default camunda schema. -USE `camundabpmn`; -ALTER TABLE ACT_HI_VARINST MODIFY TEXT_ LONGTEXT; - -ALTER TABLE ACT_HI_DETAIL MODIFY TEXT_ LONGTEXT; - -ALTER TABLE ACT_RU_VARIABLE MODIFY TEXT_ LONGTEXT; - -INSERT INTO ACT_GE_PROPERTY VALUES ('historyLevel','3',1) ON DUPLICATE KEY UPDATE VALUE_='3'; - -CREATE TABLE IF NOT EXISTS ATT_URN_MAPPING AS SELECT * FROM ACT_GE_PROPERTY WHERE NAME_='-'; diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0_to_7.6.0.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0_to_7.6.0.sql deleted file mode 100644 index cd607aa059..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/mysql_updates_7.3.0_to_7.6.0.sql +++ /dev/null @@ -1,699 +0,0 @@ -# MSO updates to the default camunda schema. -USE `camundabpmn`; - -ALTER TABLE ACT_RU_METER_LOG - ADD REPORTER_ varchar(255); - --- job prioritization -- - -ALTER TABLE ACT_RU_JOB - ADD PRIORITY_ bigint NOT NULL - DEFAULT 0; - -ALTER TABLE ACT_RU_JOBDEF - ADD JOB_PRIORITY_ bigint; - -ALTER TABLE ACT_HI_JOB_LOG - ADD JOB_PRIORITY_ bigint NOT NULL - DEFAULT 0; - --- create decision definition table -- -create table ACT_RE_DECISION_DEF ( - ID_ varchar(64) not null, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) not null, - VERSION_ integer not null, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create unique constraint on ACT_RE_DECISION_DEF -- -alter table ACT_RE_DECISION_DEF - add constraint ACT_UNIQ_DECISION_DEF - unique (KEY_,VERSION_); - --- case sentry part source -- - -ALTER TABLE ACT_RU_CASE_SENTRY_PART - ADD SOURCE_ varchar(255); - --- create history decision instance table -- -create table ACT_HI_DECINST ( - ID_ varchar(64) NOT NULL, - DEC_DEF_ID_ varchar(64) NOT NULL, - DEC_DEF_KEY_ varchar(255) NOT NULL, - DEC_DEF_NAME_ varchar(255), - PROC_DEF_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - CASE_DEF_KEY_ varchar(255), - CASE_DEF_ID_ varchar(64), - CASE_INST_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - ACT_ID_ varchar(255), - EVAL_TIME_ datetime not null, - COLLECT_VALUE_ double, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create history decision input table -- -create table ACT_HI_DEC_IN ( - ID_ varchar(64) NOT NULL, - DEC_INST_ID_ varchar(64) NOT NULL, - CLAUSE_ID_ varchar(64) NOT NULL, - CLAUSE_NAME_ varchar(255), - VAR_TYPE_ varchar(100), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ LONGBLOB NULL, - TEXT2_ LONGBLOB NULL, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create history decision output table -- -create table ACT_HI_DEC_OUT ( - ID_ varchar(64) NOT NULL, - DEC_INST_ID_ varchar(64) NOT NULL, - CLAUSE_ID_ varchar(64) NOT NULL, - CLAUSE_NAME_ varchar(255), - RULE_ID_ varchar(64) NOT NULL, - RULE_ORDER_ integer, - VAR_NAME_ varchar(255), - VAR_TYPE_ varchar(100), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ LONGBLOB NULL, - TEXT2_ LONGBLOB NULL, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - --- create indexes for historic decision tables -create index ACT_IDX_HI_DEC_INST_ID on ACT_HI_DECINST(DEC_DEF_ID_); -create index ACT_IDX_HI_DEC_INST_KEY on ACT_HI_DECINST(DEC_DEF_KEY_); -create index ACT_IDX_HI_DEC_INST_PI on ACT_HI_DECINST(PROC_INST_ID_); -create index ACT_IDX_HI_DEC_INST_CI on ACT_HI_DECINST(CASE_INST_ID_); -create index ACT_IDX_HI_DEC_INST_ACT on ACT_HI_DECINST(ACT_ID_); -create index ACT_IDX_HI_DEC_INST_ACT_INST on ACT_HI_DECINST(ACT_INST_ID_); -create index ACT_IDX_HI_DEC_INST_TIME on ACT_HI_DECINST(EVAL_TIME_); - -create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN(DEC_INST_ID_); -create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_); - -create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_); -create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_); - --- add grant authorization for group camunda-admin: -INSERT INTO - ACT_RU_AUTHORIZATION (ID_, TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_, PERMS_, REV_) -VALUES - ('camunda-admin-grant-decision-definition', 1, 'camunda-admin', 10, '*', 2147483647, 1); - --- external tasks -- - -create table ACT_RU_EXT_TASK ( - ID_ varchar(64) not null, - REV_ integer not null, - WORKER_ID_ varchar(255), - TOPIC_NAME_ varchar(255), - RETRIES_ integer, - ERROR_MSG_ varchar(4000), - LOCK_EXP_TIME_ timestamp NULL, - SUSPENSION_STATE_ integer, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - PROC_DEF_KEY_ varchar(255), - ACT_ID_ varchar(255), - ACT_INST_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_RU_EXT_TASK - add constraint ACT_FK_EXT_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXT_TASK_TOPIC on ACT_RU_EXT_TASK(TOPIC_NAME_); - --- deployment -- - -ALTER TABLE ACT_RE_DEPLOYMENT - ADD SOURCE_ varchar(255); - -ALTER TABLE ACT_HI_OP_LOG - ADD DEPLOYMENT_ID_ varchar(64); - --- job suspension state - -ALTER TABLE ACT_RU_JOB - MODIFY COLUMN SUSPENSION_STATE_ integer - DEFAULT 1; - - -- relevant for jobs created in Camunda 7.0 -UPDATE ACT_RU_JOB - SET SUSPENSION_STATE_ = 1 - WHERE SUSPENSION_STATE_ IS NULL; - -ALTER TABLE ACT_RU_JOB - MODIFY COLUMN SUSPENSION_STATE_ integer - NOT NULL DEFAULT 1; - - --- mariadb_engine_7.4_patch_7.4.5_to_7.4.6 --- INCREASE process def key column size https://app.camunda.com/jira/browse/CAM-4328 -- -alter table ACT_RU_JOB - MODIFY COLUMN PROCESS_DEF_KEY_ varchar(255); - --- mariadb_engine_7.4_to_7.5 --- set datetime precision -- - -ALTER TABLE ACT_HI_CASEINST - MODIFY COLUMN CREATE_TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_CASEINST - MODIFY COLUMN CLOSE_TIME_ datetime(3); - -ALTER TABLE ACT_HI_CASEACTINST - MODIFY COLUMN CREATE_TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_CASEACTINST - MODIFY COLUMN END_TIME_ datetime(3); - -ALTER TABLE ACT_HI_DECINST - MODIFY COLUMN EVAL_TIME_ datetime(3) not null; - -ALTER TABLE ACT_RU_TASK - MODIFY COLUMN DUE_DATE_ datetime(3); - -ALTER TABLE ACT_RU_TASK - MODIFY COLUMN FOLLOW_UP_DATE_ datetime(3); - -ALTER TABLE ACT_HI_PROCINST - MODIFY COLUMN START_TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_PROCINST - MODIFY COLUMN END_TIME_ datetime(3); - -ALTER TABLE ACT_HI_ACTINST - MODIFY COLUMN START_TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_ACTINST - MODIFY COLUMN END_TIME_ datetime(3); - -ALTER TABLE ACT_HI_TASKINST - MODIFY COLUMN START_TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_TASKINST - MODIFY COLUMN END_TIME_ datetime(3); - -ALTER TABLE ACT_HI_TASKINST - MODIFY COLUMN DUE_DATE_ datetime(3); - -ALTER TABLE ACT_HI_TASKINST - MODIFY COLUMN FOLLOW_UP_DATE_ datetime(3); - -ALTER TABLE ACT_HI_DETAIL - MODIFY COLUMN TIME_ datetime(3) not null; - -ALTER TABLE ACT_HI_COMMENT - MODIFY COLUMN TIME_ datetime(3) not null; - --- set timestamp precision -- - -ALTER TABLE ACT_RE_DEPLOYMENT - MODIFY COLUMN DEPLOY_TIME_ timestamp(3); - -ALTER TABLE ACT_RU_JOB - MODIFY COLUMN LOCK_EXP_TIME_ timestamp(3) NULL; - -ALTER TABLE ACT_RU_JOB - MODIFY COLUMN DUEDATE_ timestamp(3) NULL; - -ALTER TABLE ACT_RU_TASK - MODIFY COLUMN CREATE_TIME_ timestamp(3); - -ALTER TABLE ACT_RU_EVENT_SUBSCR - MODIFY COLUMN CREATED_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_RU_INCIDENT - MODIFY COLUMN INCIDENT_TIMESTAMP_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_RU_METER_LOG - MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_RU_EXT_TASK - MODIFY COLUMN LOCK_EXP_TIME_ timestamp(3) NULL; - -ALTER TABLE ACT_HI_OP_LOG - MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_HI_INCIDENT - MODIFY COLUMN CREATE_TIME_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_HI_INCIDENT - MODIFY COLUMN END_TIME_ timestamp(3) NULL; - -ALTER TABLE ACT_HI_JOB_LOG - MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL; - -ALTER TABLE ACT_HI_JOB_LOG - MODIFY COLUMN JOB_DUEDATE_ timestamp(3) NULL; - --- semantic version -- - -ALTER TABLE ACT_RE_PROCDEF - ADD VERSION_TAG_ varchar(64); - -create index ACT_IDX_PROCDEF_VER_TAG on ACT_RE_PROCDEF(VERSION_TAG_); - --- tenant id -- - -ALTER TABLE ACT_RE_DEPLOYMENT - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT(TENANT_ID_); - -ALTER TABLE ACT_RE_PROCDEF - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_RE_PROCDEF - DROP INDEX ACT_UNIQ_PROCDEF; - -create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF(TENANT_ID_); - -ALTER TABLE ACT_RU_EXECUTION - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_); - -ALTER TABLE ACT_RU_TASK - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_); - -ALTER TABLE ACT_RU_VARIABLE - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_); - -ALTER TABLE ACT_RU_EVENT_SUBSCR - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_); - -ALTER TABLE ACT_RU_JOB - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_JOB_TENANT_ID on ACT_RU_JOB(TENANT_ID_); - -ALTER TABLE ACT_RU_JOBDEF - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_JOBDEF_TENANT_ID on ACT_RU_JOBDEF(TENANT_ID_); - -ALTER TABLE ACT_RU_INCIDENT - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_RU_IDENTITYLINK - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_); - -ALTER TABLE ACT_RU_EXT_TASK - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_EXT_TASK_TENANT_ID on ACT_RU_EXT_TASK(TENANT_ID_); - -ALTER TABLE ACT_RE_DECISION_DEF - DROP INDEX ACT_UNIQ_DECISION_DEF; - -ALTER TABLE ACT_RE_DECISION_DEF - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF(TENANT_ID_); - -ALTER TABLE ACT_RE_CASE_DEF - DROP INDEX ACT_UNIQ_CASE_DEF; - -ALTER TABLE ACT_RE_CASE_DEF - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF(TENANT_ID_); - -ALTER TABLE ACT_GE_BYTEARRAY - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_RU_CASE_EXECUTION - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION(TENANT_ID_); - -ALTER TABLE ACT_RU_CASE_SENTRY_PART - ADD TENANT_ID_ varchar(64); - --- user on historic decision instance -- - -ALTER TABLE ACT_HI_DECINST - ADD USER_ID_ varchar(255); - --- tenant id on history -- - -ALTER TABLE ACT_HI_PROCINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_); - -ALTER TABLE ACT_HI_ACTINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST(TENANT_ID_); - -ALTER TABLE ACT_HI_TASKINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST(TENANT_ID_); - -ALTER TABLE ACT_HI_VARINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_); - -ALTER TABLE ACT_HI_DETAIL - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL(TENANT_ID_); - -ALTER TABLE ACT_HI_INCIDENT - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_); - -ALTER TABLE ACT_HI_JOB_LOG - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_); - -ALTER TABLE ACT_HI_COMMENT - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_HI_ATTACHMENT - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_HI_OP_LOG - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_HI_DEC_IN - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_HI_DEC_OUT - ADD TENANT_ID_ varchar(64); - -ALTER TABLE ACT_HI_DECINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST(TENANT_ID_); - -ALTER TABLE ACT_HI_CASEINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_CAS_I_TENANT_ID on ACT_HI_CASEINST(TENANT_ID_); - -ALTER TABLE ACT_HI_CASEACTINST - ADD TENANT_ID_ varchar(64); - -create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST(TENANT_ID_); - --- AUTHORIZATION -- - --- add grant authorizations for group camunda-admin: -INSERT INTO - ACT_RU_AUTHORIZATION (ID_, TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_, PERMS_, REV_) -VALUES - ('camunda-admin-grant-tenant', 1, 'camunda-admin', 11, '*', 2147483647, 1), - ('camunda-admin-grant-tenant-membership', 1, 'camunda-admin', 12, '*', 2147483647, 1), - ('camunda-admin-grant-batch', 1, 'camunda-admin', 13, '*', 2147483647, 1); - --- tenant table - -create table ACT_ID_TENANT ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_TENANT_MEMBER ( - ID_ varchar(64) not null, - TENANT_ID_ varchar(64) not null, - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_USER - unique (TENANT_ID_, USER_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_GROUP - unique (TENANT_ID_, GROUP_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB - foreign key (TENANT_ID_) - references ACT_ID_TENANT (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - --- BATCH -- - --- remove not null from job definition table -- -alter table ACT_RU_JOBDEF - modify PROC_DEF_ID_ varchar(64), - modify PROC_DEF_KEY_ varchar(255), - modify ACT_ID_ varchar(255); - -create table ACT_RU_BATCH ( - ID_ varchar(64) not null, - REV_ integer not null, - TYPE_ varchar(255), - TOTAL_JOBS_ integer, - JOBS_CREATED_ integer, - JOBS_PER_SEED_ integer, - INVOCATIONS_PER_JOB_ integer, - SEED_JOB_DEF_ID_ varchar(64), - BATCH_JOB_DEF_ID_ varchar(64), - MONITOR_JOB_DEF_ID_ varchar(64), - SUSPENSION_STATE_ integer, - CONFIGURATION_ varchar(255), - TENANT_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_BATCH ( - ID_ varchar(64) not null, - TYPE_ varchar(255), - TOTAL_JOBS_ integer, - JOBS_PER_SEED_ integer, - INVOCATIONS_PER_JOB_ integer, - SEED_JOB_DEF_ID_ varchar(64), - MONITOR_JOB_DEF_ID_ varchar(64), - BATCH_JOB_DEF_ID_ varchar(64), - TENANT_ID_ varchar(64), - START_TIME_ datetime(3) not null, - END_TIME_ datetime(3), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_IDENTITYLINK ( - ID_ varchar(64) not null, - TIMESTAMP_ timestamp(3) not null, - TYPE_ varchar(255), - USER_ID_ varchar(255), - GROUP_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - OPERATION_TYPE_ varchar(64), - ASSIGNER_ID_ varchar(64), - PROC_DEF_KEY_ varchar(255), - TENANT_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_); - -create index ACT_IDX_JOB_JOB_DEF_ID on ACT_RU_JOB(JOB_DEF_ID_); -create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_); - -create index ACT_IDX_BATCH_SEED_JOB_DEF ON ACT_RU_BATCH(SEED_JOB_DEF_ID_); -alter table ACT_RU_BATCH - add constraint ACT_FK_BATCH_SEED_JOB_DEF - foreign key (SEED_JOB_DEF_ID_) - references ACT_RU_JOBDEF (ID_); - -create index ACT_IDX_BATCH_MONITOR_JOB_DEF ON ACT_RU_BATCH(MONITOR_JOB_DEF_ID_); -alter table ACT_RU_BATCH - add constraint ACT_FK_BATCH_MONITOR_JOB_DEF - foreign key (MONITOR_JOB_DEF_ID_) - references ACT_RU_JOBDEF (ID_); - -create index ACT_IDX_BATCH_JOB_DEF ON ACT_RU_BATCH(BATCH_JOB_DEF_ID_); -alter table ACT_RU_BATCH - add constraint ACT_FK_BATCH_JOB_DEF - foreign key (BATCH_JOB_DEF_ID_) - references ACT_RU_JOBDEF (ID_); - --- TASK PRIORITY -- - -ALTER TABLE ACT_RU_EXT_TASK - ADD PRIORITY_ bigint NOT NULL DEFAULT 0; - -create index ACT_IDX_EXT_TASK_PRIORITY ON ACT_RU_EXT_TASK(PRIORITY_); - --- HI OP PROC INDECIES -- - -create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_); -create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_); - --- JOB_DEF_ID_ on INCIDENTS -- -ALTER TABLE ACT_RU_INCIDENT - ADD JOB_DEF_ID_ varchar(64); - -create index ACT_IDX_INC_JOB_DEF on ACT_RU_INCIDENT(JOB_DEF_ID_); -alter table ACT_RU_INCIDENT - add constraint ACT_FK_INC_JOB_DEF - foreign key (JOB_DEF_ID_) - references ACT_RU_JOBDEF (ID_); - -ALTER TABLE ACT_HI_INCIDENT - ADD JOB_DEF_ID_ varchar(64); - --- BATCH_ID_ on ACT_HI_OP_LOG -- -ALTER TABLE ACT_HI_OP_LOG - ADD BATCH_ID_ varchar(64); - - -- add indexes on PROC_DEF_KEY_ columns in history tables CAM-6679 -create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST(PROC_DEF_KEY_); -create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_); -create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_); -create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_); -create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_); -create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST(PROC_DEF_KEY_); -create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST(PROC_DEF_KEY_); -create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_); - --- 7.5.8 to 7.6.2 upgrade --- AUTHORIZATION -- - --- add grant authorizations for group camunda-admin: -INSERT INTO - ACT_RU_AUTHORIZATION (ID_, TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_, PERMS_, REV_) -VALUES - ('camunda-admin-grant-drd', 1, 'camunda-admin', 14, '*', 2147483647, 1); - --- decision requirements definition -- - -ALTER TABLE ACT_RE_DECISION_DEF - ADD DEC_REQ_ID_ varchar(64); - -ALTER TABLE ACT_RE_DECISION_DEF - ADD DEC_REQ_KEY_ varchar(255); - -ALTER TABLE ACT_RU_CASE_SENTRY_PART - ADD VARIABLE_EVENT_ varchar(255); - -ALTER TABLE ACT_RU_CASE_SENTRY_PART - ADD VARIABLE_NAME_ varchar(255); - -create table ACT_RE_DECISION_REQ_DEF ( - ID_ varchar(64) NOT NULL, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) NOT NULL, - VERSION_ integer NOT NULL, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - TENANT_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;; - -alter table ACT_RE_DECISION_DEF - add constraint ACT_FK_DEC_REQ - foreign key (DEC_REQ_ID_) - references ACT_RE_DECISION_REQ_DEF(ID_); - -create index ACT_IDX_DEC_DEF_REQ_ID on ACT_RE_DECISION_DEF(DEC_REQ_ID_); -create index ACT_IDX_DEC_REQ_DEF_TENANT_ID on ACT_RE_DECISION_REQ_DEF(TENANT_ID_); - -ALTER TABLE ACT_HI_DECINST - ADD ROOT_DEC_INST_ID_ varchar(64); - -ALTER TABLE ACT_HI_DECINST - ADD DEC_REQ_ID_ varchar(64); - -ALTER TABLE ACT_HI_DECINST - ADD DEC_REQ_KEY_ varchar(255); - -create index ACT_IDX_HI_DEC_INST_ROOT_ID on ACT_HI_DECINST(ROOT_DEC_INST_ID_); -create index ACT_IDX_HI_DEC_INST_REQ_ID on ACT_HI_DECINST(DEC_REQ_ID_); -create index ACT_IDX_HI_DEC_INST_REQ_KEY on ACT_HI_DECINST(DEC_REQ_KEY_); - --- remove not null from ACT_HI_DEC tables -- -alter table ACT_HI_DEC_OUT - modify CLAUSE_ID_ varchar(64), - modify RULE_ID_ varchar(64); - -alter table ACT_HI_DEC_IN - modify CLAUSE_ID_ varchar(64); - --- CAM-5914 -create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_); - -ALTER TABLE ACT_RU_EXT_TASK - ADD ERROR_DETAILS_ID_ varchar(64); - -alter table ACT_RU_EXT_TASK - add constraint ACT_FK_EXT_TASK_ERROR_DETAILS - foreign key (ERROR_DETAILS_ID_) - references ACT_GE_BYTEARRAY (ID_); - -ALTER TABLE ACT_HI_PROCINST - ADD STATE_ varchar(255); - -update ACT_HI_PROCINST set STATE_ = 'ACTIVE' where END_TIME_ is null; -update ACT_HI_PROCINST set STATE_ = 'COMPLETED' where END_TIME_ is not null; - --- CAM-6725 -ALTER TABLE ACT_RU_METER_LOG - ADD MILLISECONDS_ bigint DEFAULT 0; - -alter table ACT_RU_METER_LOG - modify TIMESTAMP_ TIMESTAMP(3); - -CREATE INDEX ACT_IDX_METER_LOG_MS ON ACT_RU_METER_LOG(MILLISECONDS_); -CREATE INDEX ACT_IDX_METER_LOG_REPORT ON ACT_RU_METER_LOG(NAME_, REPORTER_, MILLISECONDS_); -CREATE INDEX ACT_IDX_METER_LOG_NAME_MS ON ACT_RU_METER_LOG(NAME_, MILLISECONDS_); - --- old metric timestamp column -CREATE INDEX ACT_IDX_METER_LOG_TIME ON ACT_RU_METER_LOG(TIMESTAMP_); - --- CAM-6938 -create index ACT_IDX_JOB_HANDLER on ACT_RU_JOB(HANDLER_TYPE_(100),HANDLER_CFG_(155)); \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql index 381637465b..b8253616da 100644 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql +++ b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql @@ -1,19 +1,37 @@ - alter table HEAT_TEMPLATE - drop - foreign key FK_ek5sot1q07taorbdmkvnveu98; - alter table HEAT_TEMPLATE_PARAMS drop - foreign key FK_8sxvm215cw3tjfh3wni2y3myx; + foreign key FK_p3ol1xcvp831glqohrlu6o07o; alter table MODEL_RECIPE drop foreign key FK_c23r0puyqug6n44jg39dutm1c; + alter table SERVICE + drop + foreign key FK_l3qy594u2xr1tfpmma3uigsna; + alter table SERVICE_RECIPE drop - foreign key FK_kv13yx013qtqkn94d5gkwbu3s; + foreign key FK_i3r1b8j6e7dg9hkp49evnnm5y; + + alter table SERVICE_TO_RESOURCE_CUSTOMIZATIONS + drop + foreign key FK_kiddaay6cfe0aob1f1jaio1bb; + + alter table VF_MODULE + drop + foreign key FK_12jptc9it7gs3pru08skobxxc; + + alter table VNF_RESOURCE_CUSTOMIZATION + drop + foreign key FK_iff1ayhb1hrp5jhea3vvikuni; + + alter table VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM + drop + foreign key FK_6tdyg2ib5eguh4k2qgofh4fj7; + + drop table if exists ALLOTTED_RESOURCE; drop table if exists ALLOTTED_RESOURCE_CUSTOMIZATION; @@ -45,8 +63,16 @@ drop table if exists SERVICE_TO_NETWORKS; + drop table if exists SERVICE_TO_RESOURCE_CUSTOMIZATIONS; + + drop table if exists TEMP_NETWORK_HEAT_TEMPLATE_LOOKUP; + + drop table if exists TOSCA_CSAR; + drop table if exists VF_MODULE; + drop table if exists VF_MODULE_CUSTOMIZATION; + drop table if exists VF_MODULE_TO_HEAT_FILES; drop table if exists VNF_COMPONENTS; @@ -57,79 +83,86 @@ drop table if exists VNF_RESOURCE; + drop table if exists VNF_RESOURCE_CUSTOMIZATION; + + drop table if exists VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM; + + create table ALLOTTED_RESOURCE ( + MODEL_UUID varchar(255) not null, + MODEL_INVARIANT_UUID varchar(255), + MODEL_VERSION varchar(255), + MODEL_NAME varchar(255), + TOSCA_NODE_TYPE varchar(255), + SUBCATEGORY varchar(255), + DESCRIPTION varchar(255), + CREATION_TIMESTAMP datetime not null, + primary key (MODEL_UUID) + ); + create table ALLOTTED_RESOURCE_CUSTOMIZATION ( MODEL_CUSTOMIZATION_UUID varchar(200) not null, - MODEL_VERSION varchar(20) not null, - MODEL_UUID varchar(200) not null, - MODEL_NAME varchar(200) not null, - MODEL_INSTANCE_NAME varchar(200) not null, + MODEL_INSTANCE_NAME varchar(255), + AR_MODEL_UUID varchar(255), + PROVIDING_SERVICE_MODEL_INVARIANT_UUID varchar(255), + TARGET_NETWORK_ROLE varchar(255), + NF_FUNCTION varchar(255), + NF_TYPE varchar(255), + NF_ROLE varchar(255), + NF_NAMING_CODE varchar(255), + MIN_INSTANCES integer, + MAX_INSTANCES integer, CREATION_TIMESTAMP datetime not null, - DESCRIPTION varchar(200) default null, - MODEL_INVARIANT_UUID varchar(200) not null, primary key (MODEL_CUSTOMIZATION_UUID) ); create table HEAT_ENVIRONMENT ( - id integer not null auto_increment, + ARTIFACT_UUID varchar(200) not null, NAME varchar(100) not null, VERSION varchar(20) not null, - ASDC_RESOURCE_NAME varchar(100) default 'MANUAL RECORD' not null, - ASDC_UUID varchar(200) default 'MANUAL RECORD' not null, DESCRIPTION varchar(1200), - ENVIRONMENT longtext not null, + BODY longtext not null, CREATION_TIMESTAMP datetime not null, - ASDC_LABEL varchar(200), - ARTIFACT_CHECKSUM varchar(200) default 'MANUAL RECORD' not null, - primary key (id) + ARTIFACT_CHECKSUM varchar(200) default 'MANUAL RECORD', + primary key (ARTIFACT_UUID) ); create table HEAT_FILES ( - id integer not null auto_increment, - DESCRIPTION varchar(1200) default null, - FILE_NAME varchar(200) not null, - ASDC_RESOURCE_NAME varchar(100) not null, - VERSION varchar(20) not null, - ASDC_UUID varchar(200) default 'MANUAL RECORD', - FILE_BODY longtext not null, - VNF_RESOURCE_ID integer default null, + ARTIFACT_UUID varchar(255) not null, + DESCRIPTION varchar(255), + NAME varchar(255), + VERSION varchar(255), + BODY varchar(255), CREATION_TIMESTAMP datetime not null, - ASDC_LABEL varchar(200), - ARTIFACT_CHECKSUM varchar(200) default 'MANUAL RECORD' not null, - primary key (id) + ARTIFACT_CHECKSUM varchar(255), + primary key (ARTIFACT_UUID) ); create table HEAT_NESTED_TEMPLATE ( - PARENT_TEMPLATE_ID integer not null, - CHILD_TEMPLATE_ID integer not null, + PARENT_HEAT_TEMPLATE_UUID varchar(200) not null, + CHILD_HEAT_TEMPLATE_UUID varchar(200) not null, PROVIDER_RESOURCE_FILE varchar(100), - primary key (PARENT_TEMPLATE_ID, CHILD_TEMPLATE_ID) + primary key (PARENT_HEAT_TEMPLATE_UUID, CHILD_HEAT_TEMPLATE_UUID) ); create table HEAT_TEMPLATE ( - id integer not null auto_increment, - TEMPLATE_NAME varchar(200) not null, + ARTIFACT_UUID varchar(200) not null, + NAME varchar(200) not null, VERSION varchar(20) not null, - ASDC_RESOURCE_NAME varchar(100) default 'MANUAL RECORD' not null, - ASDC_UUID varchar(200) default 'MANUAL RECORD' not null, - TEMPLATE_PATH varchar(100), - TEMPLATE_BODY longtext not null, + BODY longtext not null, TIMEOUT_MINUTES integer, DESCRIPTION varchar(1200), - ASDC_LABEL varchar(200), - ARTIFACT_CHECKSUM varchar(200) default 'MANUAL RECORD' not null, CREATION_TIMESTAMP datetime not null, - CHILD_TEMPLATE_ID integer, - primary key (id) + ARTIFACT_CHECKSUM varchar(200) default 'MANUAL RECORD' not null, + primary key (ARTIFACT_UUID) ); create table HEAT_TEMPLATE_PARAMS ( - id integer not null auto_increment, - HEAT_TEMPLATE_ID integer not null, - PARAM_NAME varchar(100) not null, + HEAT_TEMPLATE_ARTIFACT_UUID varchar(255) not null, + PARAM_NAME varchar(255) not null, IS_REQUIRED bit not null, PARAM_TYPE varchar(20), PARAM_ALIAS varchar(45), - primary key (id) + primary key (HEAT_TEMPLATE_ARTIFACT_UUID, PARAM_NAME) ); create table MODEL ( @@ -160,68 +193,70 @@ create table NETWORK_RECIPE ( id integer not null auto_increment, - NETWORK_TYPE varchar(20) not null, + MODEL_NAME varchar(20) not null, ACTION varchar(20) not null, VERSION_STR varchar(20) not null, + SERVICE_TYPE varchar(45), DESCRIPTION varchar(1200), ORCHESTRATION_URI varchar(256) not null, NETWORK_PARAM_XSD varchar(2048), RECIPE_TIMEOUT integer, - SERVICE_TYPE varchar(45) default null, CREATION_TIMESTAMP datetime not null, primary key (id) ); create table NETWORK_RESOURCE ( - id integer not null, - NETWORK_TYPE varchar(45) not null, - VERSION_STR varchar(20) not null, - ORCHESTRATION_MODE varchar(20), + MODEL_UUID varchar(200) not null, + MODEL_NAME varchar(200) not null, + MODEL_INVARIANT_UUID varchar(20), + MODEL_VERSION varchar(20), + TOSCA_NODE_TYPE varchar(200), + NEUTRON_NETWORK_TYPE varchar(20), DESCRIPTION varchar(1200), - TEMPLATE_ID integer, - NEUTRON_NETWORK_TYPE varchar(20) default null, + ORCHESTRATION_MODE varchar(20), + HEAT_TEMPLATE_ARTIFACT_UUID varchar(200) not null, + AIC_VERSION_MIN varchar(20) default 2.5 not null, + AIC_VERSION_MAX varchar(20) default 2.5, CREATION_TIMESTAMP datetime not null, - AIC_VERSION_MIN varchar(20) not null, - AIC_VERSION_MAX varchar(20) default null, - primary key (id) + primary key (MODEL_UUID) ); create table NETWORK_RESOURCE_CUSTOMIZATION ( MODEL_CUSTOMIZATION_UUID varchar(200) not null, - NETWORK_RESOURCE_ID integer default null, - MODEL_UUID varchar(200) not null, - MODEL_NAME varchar(200) not null, - MODEL_INSTANCE_NAME varchar(200) not null, - MODEL_VERSION varchar(20) not null, - MODEL_INVARIANT_UUID varchar(200) not null, + NETWORK_RESOURCE_MODEL_UUID varchar(200) not null, + MODEL_INSTANCE_NAME varchar(255), + NETWORK_TECHNOLOGY varchar(255), + NETWORK_TYPE varchar(255), + NETWORK_SCOPE varchar(255), + NETWORK_ROLE varchar(255), CREATION_TIMESTAMP datetime not null, - primary key (MODEL_CUSTOMIZATION_UUID, NETWORK_RESOURCE_ID) + primary key (MODEL_CUSTOMIZATION_UUID) ); create table SERVICE ( - id integer not null auto_increment, - SERVICE_NAME_VERSION_ID varchar(50) default 'MANUAL_RECORD' not null, - SERVICE_NAME varchar(40), - VERSION_STR varchar(20) not null, + MODEL_UUID varchar(200) not null, + MODEL_NAME varchar(200) not null, + MODEL_VERSION varchar(20) not null, DESCRIPTION varchar(1200), - SERVICE_VERSION varchar(10), - HTTP_METHOD varchar(50), + TOSCA_CSAR_ARTIFACT_UUID varchar(200), CREATION_TIMESTAMP datetime not null, MODEL_INVARIANT_UUID varchar(200) default 'MANUAL_RECORD' not null, - primary key (id) + SERVICE_TYPE varchar(20), + SERVICE_ROLE varchar(20), + primary key (MODEL_UUID) ); create table SERVICE_RECIPE ( id integer not null auto_increment, - SERVICE_ID integer not null, + SERVICE_MODEL_UUID varchar(200) not null, ACTION varchar(40) not null, - VERSION_STR varchar(20) default null, - DESCRIPTION varchar(1200), ORCHESTRATION_URI varchar(256) not null, + CREATION_TIMESTAMP datetime not null, + VERSION_STR varchar(20), + DESCRIPTION varchar(1200), SERVICE_PARAM_XSD varchar(2048), RECIPE_TIMEOUT integer, SERVICE_TIMEOUT_INTERIM integer, - CREATION_TIMESTAMP datetime not null, primary key (id) ); @@ -239,34 +274,65 @@ primary key (SERVICE_MODEL_UUID, NETWORK_MODEL_CUSTOMIZATION_UUID) ); + create table SERVICE_TO_RESOURCE_CUSTOMIZATIONS ( + MODEL_TYPE varchar(20) not null, + RESOURCE_MODEL_CUSTOMIZATION_UUID varchar(200) not null, + CREATION_TIMESTAMP datetime not null, + SERVICE_MODEL_UUID varchar(200) not null, + primary key (MODEL_TYPE, RESOURCE_MODEL_CUSTOMIZATION_UUID) + ); + + create table TEMP_NETWORK_HEAT_TEMPLATE_LOOKUP ( + NETWORK_RESOURCE_MODEL_NAME varchar(200) not null, + HEAT_TEMPLATE_ARTIFACT_UUID varchar(200) not null, + AIC_VERSION_MIN varchar(20) not null, + AIC_VERSION_MAX varchar(20), + primary key (NETWORK_RESOURCE_MODEL_NAME) + ); + + create table TOSCA_CSAR ( + ARTIFACT_UUID varchar(200) not null, + NAME varchar(200) not null, + VERSION varchar(20) not null, + ARTIFACT_CHECKSUM varchar(200) not null, + URL varchar(200) not null, + DESCRIPTION varchar(1200), + CREATION_TIMESTAMP datetime not null, + primary key (ARTIFACT_UUID) + ); + create table VF_MODULE ( - id integer not null auto_increment, - ASDC_UUID varchar(200) default null, - VOL_ENVIRONMENT_ID integer default null, - TYPE varchar(200) not null, - ASDC_SERVICE_MODEL_VERSION varchar(20) not null, - MODEL_CUSTOMIZATION_UUID varchar(200), - MODEL_NAME varchar(200) not null, + MODEL_UUID varchar(200) not null, + VNF_RESOURCE_MODEL_UUID varchar(200), + MODEL_INVARIANT_UUID varchar(200), MODEL_VERSION varchar(20) not null, - CREATION_TIMESTAMP datetime not null, - DESCRIPTION varchar(255) default null, - VOL_TEMPLATE_ID integer default null, - TEMPLATE_ID integer default null, - VNF_RESOURCE_ID integer not null, + MODEL_NAME varchar(200) not null, + DESCRIPTION varchar(1200), IS_BASE integer not null, - ENVIRONMENT_ID integer, - MODEL_INVARIANT_UUID varchar(200) default null, - MIN_INSTANCES integer default 0, - MAX_INSTANCES integer default null, - INITIAL_COUNT integer default 0, - LABEL varchar(200) default null, - primary key (id) + HEAT_TEMPLATE_ARTIFACT_UUID varchar(200) not null, + VOL_HEAT_TEMPLATE_ARTIFACT_UUID varchar(200), + CREATION_TIMESTAMP datetime not null, + primary key (MODEL_UUID) + ); + + create table VF_MODULE_CUSTOMIZATION ( + MODEL_CUSTOMIZATION_UUID varchar(200) not null, + VF_MODULE_MODEL_UUID varchar(200) not null, + VOL_ENVIRONMENT_ARTIFACT_UUID varchar(200), + CREATION_TIMESTAMP datetime not null, + HEAT_ENVIRONMENT_ARTIFACT_UUID varchar(200), + MIN_INSTANCES integer, + MAX_INSTANCES integer, + INITIAL_COUNT integer, + AVAILABILITY_ZONE_COUNT integer, + LABEL varchar(200), + primary key (MODEL_CUSTOMIZATION_UUID) ); create table VF_MODULE_TO_HEAT_FILES ( - VF_MODULE_ID integer not null, - HEAT_FILES_ID integer not null, - primary key (VF_MODULE_ID, HEAT_FILES_ID) + VF_MODULE_MODEL_UUID varchar(200) not null, + HEAT_FILES_ARTIFACT_UUID varchar(200) not null, + primary key (VF_MODULE_MODEL_UUID, HEAT_FILES_ARTIFACT_UUID) ); create table VNF_COMPONENTS ( @@ -281,10 +347,10 @@ create table VNF_COMPONENTS_RECIPE ( id integer not null auto_increment, VNF_TYPE varchar(200), + VF_MODULE_MODEL_UUID varchar(100), VNF_COMPONENT_TYPE varchar(45) not null, - VF_MODULE_ID varchar(100), ACTION varchar(20) not null, - SERVICE_TYPE varchar(45) default null, + SERVICE_TYPE varchar(45), VERSION varchar(20), DESCRIPTION varchar(1200), ORCHESTRATION_URI varchar(256) not null, @@ -310,37 +376,42 @@ ); create table VNF_RESOURCE ( - id integer not null auto_increment, - VNF_TYPE varchar(200) not null, - ASDC_SERVICE_MODEL_VERSION varchar(20) not null, - SERVICE_MODEL_INVARIANT_UUID varchar(200), - MODEL_CUSTOMIZATION_NAME varchar(200), - ORCHESTRATION_MODE varchar(20) not null, - DESCRIPTION varchar(1200), - TEMPLATE_ID integer, - ENVIRONMENT_ID integer, - CREATION_TIMESTAMP datetime not null, - ASDC_UUID varchar(200), - AIC_VERSION_MIN varchar(20), - AIC_VERSION_MAX varchar(20), + MODEL_UUID varchar(200) not null, MODEL_INVARIANT_UUID varchar(200), MODEL_VERSION varchar(20) not null, MODEL_NAME varchar(200), - MODEL_CUSTOMIZATION_UUID varchar(255), - primary key (id) + TOSCA_NODE_TYPE varchar(200), + DESCRIPTION varchar(1200), + ORCHESTRATION_MODE varchar(20) not null, + AIC_VERSION_MIN varchar(20), + AIC_VERSION_MAX varchar(20), + HEAT_TEMPLATE_ARTIFACT_UUID varchar(200), + CREATION_TIMESTAMP datetime not null, + primary key (MODEL_UUID) ); - alter table HEAT_ENVIRONMENT - add constraint UK_5wd9texshmrbg5ou83a5p70uk unique (NAME, VERSION, ASDC_RESOURCE_NAME, ASDC_UUID); - - alter table HEAT_FILES - add constraint UK_d3ctpcskoryvei0o24ib3dhj2 unique (FILE_NAME, ASDC_RESOURCE_NAME, VERSION, ASDC_UUID); - - alter table HEAT_TEMPLATE - add constraint UK_rpbyrb4spcnldds0evbyvucvi unique (TEMPLATE_NAME, VERSION, ASDC_RESOURCE_NAME, ASDC_UUID); + create table VNF_RESOURCE_CUSTOMIZATION ( + MODEL_CUSTOMIZATION_UUID varchar(200) not null, + MODEL_INSTANCE_NAME varchar(200) not null, + MIN_INSTANCES integer, + MAX_INSTANCES integer, + AVAILABILITY_ZONE_MAX_COUNT integer, + NF_FUNCTION varchar(200), + NF_TYPE varchar(200), + NF_ROLE varchar(200), + NF_NAMING_CODE varchar(200), + VNF_RESOURCE_MODEL_UUID varchar(200) not null, + CREATION_TIMESTAMP datetime not null, + primary key (MODEL_CUSTOMIZATION_UUID) + ); - alter table HEAT_TEMPLATE_PARAMS - add constraint UK_pj3cwbmewecf0joqv2mvmbvw3 unique (HEAT_TEMPLATE_ID, PARAM_NAME); + create table VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM ( + VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID varchar(200) not null, + VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID varchar(200) not null, + CREATION_TIMESTAMP datetime not null, + VNF_RESOURCE_MODEL_UUID varchar(200) not null, + primary key (VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID, VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID) + ); alter table MODEL add constraint UK_rra00f1rk6eyy7g00k9raxh2v unique (MODEL_TYPE, MODEL_VERSION_ID); @@ -349,45 +420,53 @@ add constraint UK_b4g8j9wtqrkxfycyi3ursk7gb unique (MODEL_ID, ACTION); alter table NETWORK_RECIPE - add constraint UK_rl4f296i0p8lyokxveaiwkayi unique (NETWORK_TYPE, ACTION, VERSION_STR); - - alter table NETWORK_RESOURCE - add constraint UK_i4hpdnu3rmdsit3m6fw1ynguq unique (NETWORK_TYPE, VERSION_STR); - - alter table SERVICE - add constraint UK_iopodavyy29kj79umla8oarak unique (SERVICE_NAME_VERSION_ID, SERVICE_NAME); + add constraint UK_pbsa8i44m8p10f9529jdgfuk9 unique (MODEL_NAME, ACTION, VERSION_STR); alter table SERVICE_RECIPE - add constraint UK_7fav5dkux2v8g9d2i5ymudlgc unique (SERVICE_ID, ACTION); - - alter table VF_MODULE - add constraint UK_o3bvdqspginaxlp4gxqohd44l unique (TYPE, ASDC_SERVICE_MODEL_VERSION); + add constraint UK_2lr377dpqnvl5aqlp5dtj2fcp unique (SERVICE_MODEL_UUID, ACTION); alter table VNF_COMPONENTS_RECIPE - add constraint UK_4dpdwddaaclhc11wxsb7h59ma unique (VNF_TYPE, VNF_COMPONENT_TYPE, VF_MODULE_ID, ACTION, SERVICE_TYPE, VERSION); + add constraint UK_g3je95aaxxiuest25f0qoy2u8 unique (VNF_TYPE, VF_MODULE_MODEL_UUID, VNF_COMPONENT_TYPE, ACTION, SERVICE_TYPE, VERSION); alter table VNF_RECIPE add constraint UK_f3tvqau498vrifq3cr8qnigkr unique (VF_MODULE_ID, ACTION, VERSION_STR); - alter table VNF_RESOURCE - add constraint UK_peslcm0k3yojkrj6cvdv1rttb unique (VNF_TYPE, ASDC_SERVICE_MODEL_VERSION, SERVICE_MODEL_INVARIANT_UUID); - - alter table HEAT_TEMPLATE - add constraint FK_ek5sot1q07taorbdmkvnveu98 - foreign key (CHILD_TEMPLATE_ID) - references HEAT_TEMPLATE (id); - alter table HEAT_TEMPLATE_PARAMS - add constraint FK_8sxvm215cw3tjfh3wni2y3myx - foreign key (HEAT_TEMPLATE_ID) - references HEAT_TEMPLATE (id); + add constraint FK_p3ol1xcvp831glqohrlu6o07o + foreign key (HEAT_TEMPLATE_ARTIFACT_UUID) + references HEAT_TEMPLATE (ARTIFACT_UUID); alter table MODEL_RECIPE add constraint FK_c23r0puyqug6n44jg39dutm1c foreign key (MODEL_ID) references MODEL (id); + alter table SERVICE + add constraint FK_l3qy594u2xr1tfpmma3uigsna + foreign key (TOSCA_CSAR_ARTIFACT_UUID) + references TOSCA_CSAR (ARTIFACT_UUID); + alter table SERVICE_RECIPE - add constraint FK_kv13yx013qtqkn94d5gkwbu3s - foreign key (SERVICE_ID) - references SERVICE (id); + add constraint FK_i3r1b8j6e7dg9hkp49evnnm5y + foreign key (SERVICE_MODEL_UUID) + references SERVICE (MODEL_UUID); + + alter table SERVICE_TO_RESOURCE_CUSTOMIZATIONS + add constraint FK_kiddaay6cfe0aob1f1jaio1bb + foreign key (SERVICE_MODEL_UUID) + references SERVICE (MODEL_UUID); + + alter table VF_MODULE + add constraint FK_12jptc9it7gs3pru08skobxxc + foreign key (VNF_RESOURCE_MODEL_UUID) + references VNF_RESOURCE (MODEL_UUID); + + alter table VNF_RESOURCE_CUSTOMIZATION + add constraint FK_iff1ayhb1hrp5jhea3vvikuni + foreign key (VNF_RESOURCE_MODEL_UUID) + references VNF_RESOURCE (MODEL_UUID); + + alter table VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM + add constraint FK_6tdyg2ib5eguh4k2qgofh4fj7 + foreign key (VNF_RESOURCE_MODEL_UUID) + references VNF_RESOURCE_CUSTOMIZATION (MODEL_CUSTOMIZATION_UUID); diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql deleted file mode 100644 index a5e9834de2..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql +++ /dev/null @@ -1,45 +0,0 @@ -USE `mso_catalog`; - -ALTER TABLE `mso_catalog`.`service_to_allotted_resources` - ADD INDEX `fk_service_to_allotted_resources__service_model_uuid_idx` (`SERVICE_MODEL_UUID` ASC), - ADD INDEX `fk_service_to_allotted_resources__allotted_resource_customiz_idx` (`AR_MODEL_CUSTOMIZATION_UUID` ASC), - ADD CONSTRAINT `fk_service_to_allotted_resources__service__service_name_ver_id` - FOREIGN KEY (`SERVICE_MODEL_UUID`) - REFERENCES `mso_catalog`.`service` (`SERVICE_NAME_VERSION_ID`) - ON DELETE CASCADE - ON UPDATE CASCADE, - ADD CONSTRAINT `fk_service_to_allotted_resources__allotted_resource_customizat1` - FOREIGN KEY (`AR_MODEL_CUSTOMIZATION_UUID`) - REFERENCES `mso_catalog`.`allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) - ON DELETE CASCADE - ON UPDATE CASCADE; - - -ALTER TABLE `mso_catalog`.`service_to_networks` - ADD INDEX `fk_service_to_networks__service_model_uuid_idx` (`SERVICE_MODEL_UUID` ASC), - ADD INDEX `fk_service_to_networks__network_resource_customization1_idx` (`NETWORK_MODEL_CUSTOMIZATION_UUID` ASC), - ADD CONSTRAINT `fk_service_to_networks__service__service_name_version_id` - FOREIGN KEY (`SERVICE_MODEL_UUID`) - REFERENCES `mso_catalog`.`service` (`SERVICE_NAME_VERSION_ID`) - ON DELETE CASCADE - ON UPDATE CASCADE, - ADD CONSTRAINT `fk_service_to_networks__network_resource_customization1` - FOREIGN KEY (`NETWORK_MODEL_CUSTOMIZATION_UUID`) - REFERENCES `mso_catalog`.`network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) - ON DELETE CASCADE - ON UPDATE CASCADE; - - -ALTER TABLE `mso_catalog`.`vf_module` - ADD INDEX `UK_model_customization_uuid__asdc_service_model_version` (`MODEL_CUSTOMIZATION_UUID` ASC, `ASDC_SERVICE_MODEL_VERSION` ASC); - -ALTER TABLE `mso_catalog`.`vnf_resource` - ADD UNIQUE INDEX `UK_model_customization_uuid__asdc_service_model_version` (`MODEL_CUSTOMIZATION_UUID` ASC, `ASDC_SERVICE_MODEL_VERSION` ASC); - -ALTER TABLE `mso_catalog`.`network_resource_customization` - ADD INDEX `fk_network_resource_customization__network_resource_id_idx` (`NETWORK_RESOURCE_ID` ASC), - ADD CONSTRAINT `fk_network_resource_customization__network_resource__id` - FOREIGN KEY (`NETWORK_RESOURCE_ID`) - REFERENCES `mso_catalog`.`network_resource` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE; \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql deleted file mode 100644 index bc88adcc70..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE `mso_catalog`; - -ALTER TABLE HEAT_ENVIRONMENT MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE NETWORK_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE NETWORK_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE SERVICE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE VNF_COMPONENTS MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE VNF_COMPONENTS_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE VNF_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE VNF_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE HEAT_FILES MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE HEAT_TEMPLATE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE VF_MODULE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE SERVICE_RECIPE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE NETWORK_RESOURCE_CUSTOMIZATION MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE ALLOTTED_RESOURCE_CUSTOMIZATION MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE SERVICE_TO_ALLOTTED_RESOURCES MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; -ALTER TABLE SERVICE_TO_NETWORKS MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL; - diff --git a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql b/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql deleted file mode 100644 index 3b2de4c0b7..0000000000 --- a/kubernetes/config/docker/init/src/config/mso/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE SITE_STATUS MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; diff --git a/kubernetes/config/docker/init/src/config/mso/mso/mso-docker.json b/kubernetes/config/docker/init/src/config/mso/mso/mso-docker.json index 1b6d7084af..1b28858ac9 100755 --- a/kubernetes/config/docker/init/src/config/mso/mso/mso-docker.json +++ b/kubernetes/config/docker/init/src/config/mso/mso/mso-docker.json @@ -1,97 +1,123 @@ { + "name": "mso-docker", + "description": "MSO Docker Images", "chef_type": "environment", - "cookbook_versions": { - "mso-config": "~> 1.0.0" - }, - "default_attributes": { - "asdc-connections": { - "asdc-controller1": { - "activateServerTLSAuth": "false", - "asdcAddress": "sdc-be.onap-sdc.svc.cluster.local:8443", + "json_class": "Chef::Environment", + "default_attributes": + { + "mso_config_path": "/etc/mso/config.d/", + + "mso-api-handler-infra-config": + { + "bpelURL": "http://mso.onap-mso.svc.cluster.local:8080", + "bpelAuth": "786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1", + "camundaURL": "http://mso.onap-mso.svc.cluster.local:8080", + "camundaAuth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1" + }, + + "asdc-connections": + { + "asdc-controller1": + { + "user": "mso", "consumerGroup": "sdc-OpenSource-Env1", "consumerId": "sdc-COpenSource-Env11", "environmentName": "DMAAP_TOPIC_HERE", - "keyStorePassword": "", - "keyStorePath": "", + "asdcAddress": "sdc-be.onap-sdc.svc.cluster.local:8443", "password": "613AF3483E695524F9857643B697FA51C7A9A0951094F53791485BF3458F9EADA37DBACCCEBD0CB242B85B4062745247", "pollingInterval": 60, "pollingTimeout": 60, "relevantArtifactTypes": "HEAT,HEAT_ENV,HEAT_VOL", - "user": "mso" + "activateServerTLSAuth": "false", + "keyStorePassword": "", + "keyStorePath": "" + }, + + "asdc-controller2": + { + "user": "user", + "consumerGroup": "mso", + "consumerId": "mso", + "environmentName": "PROD", + "asdcAddress": "asdc_hostname2:8443", + "password": "f3895035812addbf115bfaf7d2dc850e", + "pollingInterval": 60, + "pollingTimeout": 60, + "relevantArtifactTypes": "HEAT,HEAT_ENV,HEAT_VOL", + "activateServerTLSAuth": "false", + "keyStorePassword": "", + "keyStorePath": "" } }, - "mso-api-handler-infra-config": { - "bpelAuth": "786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1", - "bpelURL": "http://mso:8080", - "camundaAuth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1", - "camundaURL": "http://mso:8080" + + "mso-sdnc-adapter-config": + { + "sdncurls": + [ + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/L3SDN-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/config/L3SDN-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/Firewall-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/config", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/VNF-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/NBNC-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/NORTHBOUND-API:service-topology-operation", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/GENERIC-RESOURCE-API:", + "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/VNFTOPOLOGYAIC-API:" + ], + + "bpelurl": "http://mso.onap-mso.svc.cluster.local:8080/mso/SDNCAdapterCallbackService", + "restbpelurl": "http://mso.onap-mso.svc.cluster.local:8080/mso/WorkflowMessage", + "myurl": "http://mso.onap-mso.svc.cluster.local:8080/adapters/rest/SDNCNotify", + "sdncauth": "263f7d5f944d4d0c76db74b4148bec67d0bc796a874bc0d2a2a12aae89a866aa69133f700f391f784719a37f6a68d29bf5a2fbae1dab0402db7788c800c5ba73", + "bpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1", + "sdncconnecttime": "5000" }, - "mso-bpmn-config": { + "mso-po-adapter-config": + { + "identity_services": + [ + { + "dcp_clli": "DEFAULT_KEYSTONE", + "identity_url": "OPENSTACK_KEYSTONE_IP_HERE/v2.0", + "mso_id": "OPENSTACK_USERNAME_HERE", + "mso_pass": "OPENSTACK_ENCRYPTED_PASSWORD_HERE", + "admin_tenant": "OPENSTACK_SERVICE_TENANT_NAME_HERE", + "member_role": "admin", + "tenant_metadata": "true", + "identity_server_type": "KEYSTONE", + "identity_authentication_type": "USERNAME_PASSWORD" + } + ], + + "cloud_sites": + [ + { + "id": "OPENSTACK_REGION_HERE", + "aic_version": "2.5", + "lcp_clli": "OPENSTACK_REGION_HERE", + "region_id": "OPENSTACK_REGION_HERE", + "identity_service_id": "DEFAULT_KEYSTONE" + } + ], + + "vnfbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1", + "checkrequiredparameters": "true", + "nwbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1" + }, + + "mso-bpmn-config": + { "urnFileSystemLoadingEnabled": "true" }, - "mso-bpmn-urn-config": { - "aaiAuth": "2630606608347B7124C244AB0FE34F6F", - "aaiEndpoint": "https://aai-service.onap-aai.svc.cluster.local:8443", - "adaptersCompletemsoprocessEndpoint": "http://mso:8080/CompleteMsoProcess", - "adaptersDbEndpoint": "http://mso:8080/dbadapters/RequestsDbAdapter", - "catalogDbEndpoint": "http://mso:8080/ecomp/mso/catalog", - "adaptersNetworkEndpoint": "http://mso:8080/networks/NetworkAdapter", - "adaptersNetworkRestEndpoint": "http://mso:8080/networks/rest/v1/networks", - "adaptersPoAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", - "adaptersSdncEndpoint": "http://mso:8080/adapters/SDNCAdapter", - "adaptersSdncRestEndpoint": "http://mso:8080/adapters/rest/v1/sdnc", - "adaptersTenantEndpoint": "http://mso:8080/tenants/TenantAdapter", - "adaptersVnfAsyncEndpoint": "http://mso:8080/vnfs/VnfAdapterAsync", - "adaptersVnfRestEndpoint": "http://mso:8080/vnfs/rest/v1/vnfs", - "adaptersDbAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", - "workflowMessageEndpoint": "http://mso:8080/mso/WorkflowMessage", - "workflowSdncAdapterCallback": "http://mso:8080/mso/SDNCAdapterCallbackService", - "callbackRetryAttempts": "30", - "callbackRetrySleepTime": "1000", - "logDebugAsyncQueryAAICustomer": "false", - "logDebugChangeFeatureActivateV1": "false", - "logDebugChangeLayer3ServiceActivateV1": "false", - "logDebugChangeLayer3ServiceProvV1": "false", - "logDebugCompleteMsoProcess": "false", - "logDebugCreateCinderVolumeV1": "false", - "logDebugCreateCustomerV1": "false", - "logDebugCreateNetworkInstanceInfra": "false", - "logDebugCreateNetworkV1": "false", - "logDebugCreateServiceInstanceInfra": "false", - "logDebugCreateTenantV1": "false", - "logDebugCreateVfModuleVolumeInfraV1": "false", - "logDebugDeleteCinderVolumeV1": "false", - "logDebugDeleteGenericVNFV1": "false", - "logDebugDeleteNetworkInstanceInfra": "false", - "logDebugDeleteNetworkV1": "false", - "logDebugDeleteServiceInstanceInfra": "false", - "logDebugDeleteTenantV1": "false", - "logDebugDeleteVCEV1": "false", - "logDebugDeleteVfModuleVolumeInfraV1": "false", - "logDebugDisconnectLayer3Service": "false", - "logDebugGetLayer3ServiceDetailsV1": "false", - "logDebugL3ToHigherLayerAddBonding": "false", - "logDebugL3ToHigherLayerDeleteBonding": "false", - "logDebugLayer3ServiceActivateV1": "false", - "logDebugLayer3TestAndTurnUpV1": "false", - "logDebugQueryAAICustomer": "false", - "logDebugQueryTenantInfo": "false", - "logDebugRemoveLayer3Service": "false", - "logDebugSdncAdapter": "false", - "logDebugUpdateCinderVolumeV1": "false", - "logDebugUpdateNetworkInstanceInfra": "false", - "logDebugUpdateNetworkV2": "false", - "logDebugUpdateVfModuleVolumeInfraV1": "true", - "logDebugVnfAdapterCreateV1": "true", - "logDebugVnfAdapterDeleteV1": "true", - "logDebugVnfAdapterQueryV1": "true", - "logDebugVnfAdapterRollbackV1": "true", + + "mso-bpmn-urn-config": + { "debug":"false", "invariantIdL3ToHigherLayerDeleteBonding": "50359538-066f-4a8d-807f-f2bc8eaa79dc", "versionIdL3ToHigherLayerDeleteBonding": "52dbec20-47aa-42e4-936c-331d8e350d44", "infraCustomerId": "21014aa2-526b-11e6-beb8-9e71128cae77", "sniroAuth": "test:testpwd", - "sniroCallback": "https://mso:8080/adapters/rest/SDNCNotify/SNIROResponse", + "sniroCallback": "https://mso.onap-mso.svc.cluster.local:8080/adapters/rest/SDNCNotify/SNIROResponse", "sniroEndpoint": "https://TODO.att.c om:14699/sniro/api/v1/placement", "sniroTimeout": "PT30M", "sniroPoliciesDHV2vvig": "SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1", @@ -99,66 +125,46 @@ "mso.sniro.endpoint": "/optimizationInstance/V1/create", "mso.sniro.callback": "/adapters/rest/SDNCNotify/SNIROResponse", "mso.infra.customer.id": "21014aa2-526b-11e6-beb8-9e71128cae77", + "aaiEndpoint": "https://aai-service.onap-aai.svc.cluster.local:8443", + "aaiAuth": "2630606608347B7124C244AB0FE34F6F", + "adaptersNamespace": "http://org.openecomp.mso", + "adaptersCompletemsoprocessEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/CompleteMsoProcess", + "adaptersDbEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/dbadapters/RequestsDbAdapter", + "catalogDbEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/ecomp/mso/catalog", + "adaptersSdncEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/adapters/SDNCAdapter", + "adaptersSdncRestEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/adapters/rest/v1/sdnc", + "adaptersTenantEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/tenants/TenantAdapter", + "adaptersDbAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", + "workflowMessageEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/mso/WorkflowMessage", + "workflowSdncAdapterCallback": "http://mso.onap-mso.svc.cluster.local:8080/mso/SDNCAdapterCallbackService", "msoKey": "07a7159d3bf51a0e53be7a8f89699be7", - "poTimeout": "PT5M", + "adaptersPoAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", + "sdncTimeout": "PT5M", "rollback": "true", + "adaptersNetworkEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/networks/NetworkAdapter", + "adaptersNetworkRestEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/networks/rest/v1/networks", + "adaptersVnfAsyncEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/vnfs/VnfAdapterAsync", + "workflowVnfAdapterDeleteCallback": "http://mso.onap-mso.svc.cluster.local:8080/mso/vnfAdapterNotify", + "workflowVnfAdapterCreateCallback": "http://mso.onap-mso.svc.cluster.local:8080/mso/vnfAdapterNotify", + "adaptersVnfRestEndpoint": "http://mso.onap-mso.svc.cluster.local:8080/vnfs/rest/v1/vnfs", + "workflowVnfAdapterRestCallback": "http://mso.onap-mso.svc.cluster.local:8080/mso/vnfAdapterRestNotify", + "poTimeout": "PT5M", "sdncFirewallYangModel": "http://com/att/svc/mis/firewall-lite-gui", "sdncFirewallYangModelVersion": "2015-05-15", - "sdncTimeout": "PT5M", "sdncTimeoutFirewall": "20", - "workflowSdncadapterCallback": "http://mso:8080/mso/SDNCAdapterCallbackService", - "workflowVnfAdapterCreateCallback": "http://mso:8080/mso/vnfAdapterNotify", - "workflowVnfAdapterDeleteCallback": "http://mso:8080/mso/vnfAdapterNotify", - "workflowVnfAdapterRestCallback": "http://mso:8080/mso/vnfAdapterRestNotify", + "callbackRetryAttempts": "30", + "callbackRetrySleepTime": "1000", "workflowL3ToHigherLayerAddBondingModelName" : "WAN Bonding", "workflowL3ToHigherLayerAddBondingModelVersion" : "2.0" - }, - "mso-po-adapter-config": { - "checkrequiredparameters": "true", - "cloud_sites": [{ - "aic_version": "2.5", - "id": "OPENSTACK_REGION_HERE", - "identity_service_id": "DEFAULT_KEYSTONE", - "lcp_clli": "OPENSTACK_REGION_HERE", - "region_id": "OPENSTACK_REGION_HERE" - }], - "identity_services": [{ - "admin_tenant": "OPENSTACK_SERVICE_TENANT_NAME_HERE", - "dcp_clli": "DEFAULT_KEYSTONE", - "identity_authentication_type": "USERNAME_PASSWORD", - "identity_server_type": "KEYSTONE", - "identity_url": "OPENSTACK_KEYSTONE_IP_HERE/v2.0", - "member_role": "admin", - "mso_id": "OPENSTACK_USERNAME_HERE", - "mso_pass": "OPENSTACK_ENCRYPTED_PASSWORD_HERE", - "tenant_metadata": "true" - }], - "nwbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1", - "vnfbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1" - }, - "mso-sdnc-adapter-config": { - "bpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1", - "bpelurl": "http://mso.onap-mso.svc.cluster.local:8080/mso/SDNCAdapterCallbackService", - "restbpelurl": "http://mso.onap-mso.svc.cluster.local:8080/mso/WorkflowMessage", - "myurl": "http://mso.onap-mso.svc.cluster.local:8080/adapters/rest/SDNCNotify", - "sdncauth": "263f7d5f944d4d0c76db74b4148bec67d0bc796a874bc0d2a2a12aae89a866aa69133f700f391f784719a37f6a68d29bf5a2fbae1dab0402db7788c800c5ba73", - "sdncconnecttime": "5000", - "sdncurls": [ - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/L3SDN-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/config/L3SDN-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/Firewall-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/config", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/VNF-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/NBNC-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/NORTHBOUND-API:service-topology-operation", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/GENERIC-RESOURCE-API:", - "http://sdnhost.onap-sdnc.svc.cluster.local:8282/restconf/operations/VNFTOPOLOGYAIC-API:" - ] - }, - "mso_config_path": "/etc/mso/config.d/" + } }, - "description": "MSO Docker Images", - "json_class": "Chef::Environment", - "name": "mso-docker", - "override_attributes": {} + + "override_attributes": + { + }, + + "cookbook_versions": + { + "mso-config": "~> 1.0.0" + } } 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/mso/templates/db-deployment.yaml b/kubernetes/mso/templates/db-deployment.yaml index 4722c4a0c5..d105744f7e 100644 --- a/kubernetes/mso/templates/db-deployment.yaml +++ b/kubernetes/mso/templates/db-deployment.yaml @@ -4,7 +4,6 @@ metadata: name: mariadb namespace: "{{ .Values.nsPrefix }}-mso" spec: - replicas: 1 selector: matchLabels: app: mariadb @@ -23,10 +22,6 @@ spec: env: - name: MYSQL_ROOT_PASSWORD value: password - - name: MARIADB_MAJOR - value: "10.1" - - name: MARIADB_VERSION - value: "10.1.11+maria-1~jessie" volumeMounts: - mountPath: /etc/localtime name: localtime diff --git a/kubernetes/mso/templates/mso-deployment.yaml b/kubernetes/mso/templates/mso-deployment.yaml index 8973db3e6f..862f572d3c 100644 --- a/kubernetes/mso/templates/mso-deployment.yaml +++ b/kubernetes/mso/templates/mso-deployment.yaml @@ -42,7 +42,7 @@ spec: spec: containers: - command: - - /docker-files/scripts/start-jboss-server.sh + - /tmp/start-jboss-server.sh image: {{ .Values.image.mso }} imagePullPolicy: {{ .Values.pullPolicy }} name: mso @@ -52,7 +52,7 @@ spec: readOnly: true - mountPath: /shared name: mso - - mountPath: /docker-files + - mountPath: /tmp/start-jboss-server.sh name: mso-docker-files env: - name: JBOSS_DEBUG @@ -77,6 +77,6 @@ spec: path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mso - name: mso-docker-files hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/docker-files + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/docker-files/scripts/start-jboss-server.sh imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index afe71af8e1..c8810aa615 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -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 a1aba3daf4..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=('consul' '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