Merge "Update netbox deployment"
authorMike Elliott <mike.elliott@amdocs.com>
Thu, 18 Apr 2019 14:35:11 +0000 (14:35 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 18 Apr 2019 14:35:11 +0000 (14:35 +0000)
27 files changed:
docs/example-integration-override.yaml [new file with mode: 0644]
docs/helm-search.txt [new file with mode: 0644]
docs/oom_quickstart_guide.rst
kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-cached.properties [new file with mode: 0644]
kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-real.properties [new file with mode: 0644]
kubernetes/aai/charts/aai-graphadmin/templates/configmap.yaml
kubernetes/aai/charts/aai-graphadmin/templates/deployment.yaml
kubernetes/aai/charts/aai-graphadmin/templates/job.yaml
kubernetes/aai/charts/aai-graphadmin/templates/pv.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-graphadmin/templates/pvc.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-graphadmin/values.yaml
kubernetes/aai/charts/aai-resources/templates/configmap.yaml
kubernetes/aai/charts/aai-resources/templates/deployment.yaml
kubernetes/aai/charts/aai-traversal/templates/configmap.yaml
kubernetes/aai/charts/aai-traversal/templates/deployment.yaml
kubernetes/aai/charts/aai-traversal/templates/job.yaml
kubernetes/aai/values.yaml
kubernetes/dmaap/components/dmaap-bc/requirements.yaml
kubernetes/dmaap/components/dmaap-bc/resources/config/dmaapbc.properties
kubernetes/dmaap/components/dmaap-bc/templates/deployment.yaml
kubernetes/dmaap/components/dmaap-bc/values.yaml
kubernetes/dmaap/components/dmaap-dr-node/resources/config/node.properties
kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml
kubernetes/dmaap/components/dmaap-dr-node/values.yaml
kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties
kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml
kubernetes/dmaap/components/dmaap-dr-prov/values.yaml

diff --git a/docs/example-integration-override.yaml b/docs/example-integration-override.yaml
new file mode 100644 (file)
index 0000000..9c336d6
--- /dev/null
@@ -0,0 +1,36 @@
+global:
+  repository: 10.12.5.2:5000
+  pullPolicy: IfNotPresent
+robot:
+  enabled: true
+  flavor: large
+  appcUsername: "appc@appc.onap.org"
+  appcPassword: "APPC_PASSWORD_HERE"
+  openStackKeyStoneUrl: "http://10.12.25.2:5000"
+  openStackPublicNetId: "971040b2-7059-49dc-b220-4fab50cb2ad4"
+  openStackTenantId: "09d8566ea45e43aa974cf447ed591d77"
+  openStackUserName: "OPENSTACK_USERNAME_HERE"
+  ubuntu14Image: "ubuntu-14-04-cloud-amd64"
+  ubuntu16Image: "ubuntu-16-04-cloud-amd64"
+  openStackPrivateNetId: "d4ab89ff-c735-4ce4-93f6-cff445157b98"
+  openStackPrivateSubnetId: "46c2391c-ed98-4fb0-8ab7-88678bc55b9f"
+  openStackPrivateNetCidr: "10.0.0.0/16"
+  openStackSecurityGroup: "3914301b-2996-414f-ba0a-da4b2275a753"
+  openStackOamNetworkCidrPrefix: "10.0"
+  dcaeCollectorIp: "10.12.5.46"
+  vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
+  demoArtifactsVersion: "1.3.0"
+  demoArtifactsRepoUrl: "https://nexus.onap.org/content/repositories/releases"
+  scriptVersion: "1.3.0"
+  rancherIpAddress: "10.12.6.38"
+  config:
+    openStackEncryptedPasswordHere: "XXXXXXXXXXXXXXXXXXXXXXXX_OPENSTACK_ENCRYPTED_PASSWORD_HEREXXXXXXXXXXXXXXXX"
+so:
+  enabled: true
+  so-catalog-db-adapter:
+    config:
+      openStackUserName: "OPENSTACK_USERNAME_HERE"
+      openStackKeyStoneUrl: "http://10.12.25.2:5000/v2.0"
+      openStackEncryptedPasswordHere: "XXXXXXXXXXXXXXXXXXXXXXXX_OPENSTACK_ENCRYPTED_PASSWORD_HEREXXXXXXXXXXXXXXXX"
+
+
diff --git a/docs/helm-search.txt b/docs/helm-search.txt
new file mode 100644 (file)
index 0000000..db95e4f
--- /dev/null
@@ -0,0 +1,31 @@
+NAME                   CHART VERSION   APP VERSION     DESCRIPTION                                 
+local/onap             4.0.0           Dublin          Open Network Automation Platform (ONAP)     
+local/aaf              4.0.0                           ONAP Application Authorization Framework    
+local/aai              4.0.0                           ONAP Active and Available Inventory         
+local/cassandra        4.0.0                           ONAP cassandra                              
+local/cds              4.0.0                           ONAP Common Design Studio                   
+local/clamp            4.0.0                           ONAP Clamp                                  
+local/cli              4.0.0                           ONAP Command Line Interface                 
+local/consul           4.0.0                           ONAP Consul Agent                           
+local/contrib          4.0.0                           ONAP optional tools                         
+local/dcaegen2         4.0.0                           ONAP DCAE Gen2                              
+local/dmaap            4.0.1                           ONAP DMaaP components                       
+local/esr              4.0.0                           ONAP External System Register               
+local/log              4.0.0                           ONAP Logging ElasticStack                   
+local/msb              4.0.0                           ONAP MicroServices Bus                      
+local/multicloud       4.0.0                           ONAP multicloud broker                      
+local/nbi              4.0.0                           ONAP Northbound Interface                   
+local/oof              4.0.0                           ONAP Optimization Framework                 
+local/pnda             4.0.0                           ONAP DCAE PNDA                              
+local/policy           4.0.0                           ONAP Policy Administration Point            
+local/pomba            4.0.0                           ONAP Post Orchestration Model Based Audit   
+local/portal           4.0.0                           ONAP Web Portal                             
+local/postgres         4.0.0                           ONAP Postgres Server                        
+local/robot            4.0.0                           A helm Chart for kubernetes-ONAP Robot      
+local/sdnc-prom        4.0.0                           ONAP SDNC Policy Driven Ownership Management
+local/sniro-emulator   4.0.0                           ONAP Mock Sniro Emulator                    
+local/so               4.0.0                           ONAP Service Orchestrator                   
+local/uui              4.0.0                           ONAP uui                                    
+local/vfc              4.0.0                           ONAP Virtual Function Controller (VF-C)     
+local/vid              4.0.0                           ONAP Virtual Infrastructure Deployment      
+local/vnfsdk           4.0.0                           ONAP VNF SDK 
index a965603..0e1d359 100644 (file)
@@ -1,4 +1,5 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. This work is licensed under a
+.. Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
 .. Copyright 2018 Amdocs, Bell Canada
 
@@ -16,28 +17,79 @@ available), follow the following instructions to deploy ONAP.
 
 **Step 1.** Clone the OOM repository from ONAP gerrit::
 
-  > git clone -b casablanca http://gerrit.onap.org/r/oom
+  > git clone -b 4.0.0-ONAP http://gerrit.onap.org/r/oom
   > cd oom/kubernetes
 
 **Step 2.** Install Helm Plugins required to deploy the ONAP Casablanca release::
 
   > sudo cp -R ~/oom/kubernetes/helm/plugins/ ~/.helm
 
-**Step 3.** Customize the onap/values.yaml file to suit your deployment. You
-may want to selectively enable or disable ONAP components by changing the
-`enabled: true/false` flags as shown below:
+
+**Step 3.** Customize the helm charts like onap.values.yaml or an override.yaml
+like integration-override.yaml file to suit your deployment with items like the
+OpenStack tenant information.
+
+
+ a. You may want to selectively enable or disable ONAP components by changing
+    the `enabled: true/false` flags.
+
+
+ b. Encyrpt the OpenStack password using the shell tool for robot and put it in
+    the robot helm charts or robot section of integration-override.yaml
+
+
+ c. Encrypt the OpenStack password using the java based script for SO helm charts
+    or SO section of integration-override.yaml.
+
+
+ d. Update the OpenStack parameters that will be used by robot, SO and APPC helm
+    charts or use an override file to replace them.
+
+
+
+
+a. Enabling/Disabling Components:
+Here is an example of the nominal entries that need to be provided. We have different
+values file available for different contexts.
 
 .. literalinclude:: onap-values.yaml
    :language: yaml
 
+
+b. Generating ROBOT Encrypted Password:
+The ROBOT encrypted Password uses the same encryption.key as SO but an
+openssl algorithm that works with the python based Robot Framework.
+
 .. note::
-  To generate openStackEncryptedPasswordHere :
+  To generate ROBOT openStackEncryptedPasswordHere :
 
   ``root@olc-rancher:~# cd so/resources/config/mso/``
 
   ``root@olc-rancher:~/oom/kubernetes/so/resources/config/mso# echo -n "<openstack tenant password>" | openssl aes-128-ecb -e -K `cat encryption.key` -nosalt | xxd -c 256 -p``
 
-**Step 3.** To setup a local Helm server to server up the ONAP charts::
+c. Generating SO Encrypted Password:
+The SO Encrypted Password uses a java based encryption utility since the
+Java encryption library is not easy to integrate with openssl/python that
+ROBOT uses in Dublin.
+
+.. note::
+  To generate SO openStackEncryptedPasswordHere :
+
+  SO_ENCRYPTION_KEY=`cat ~/oom/kubenertes/so/resources/config/mso/encrypt.key`
+  OS_PASSWORD=XXXX_OS_CLEARTESTPASSWORD_XXXX
+
+  git clone http://gerrit.onap.org/r/integration
+  cd integration/deployment/heat/onap-oom/scripts
+  javac Crypto.java
+  java Crypto "$OS_PASSWORD" "$SO_ENCRYPTION_KEY"
+
+
+d. Update the OpenStack parameters:
+
+.. literalinclude:: example-integration-override.yaml
+   :language: yaml
+
+**Step 4.** To setup a local Helm server to server up the ONAP charts::
 
   > helm serve &
 
@@ -46,31 +98,48 @@ follows::
 
   > helm repo add local http://127.0.0.1:8879
 
-**Step 4.** Verify your Helm repository setup with::
+**Step 5.** Verify your Helm repository setup with::
 
   > helm repo list
   NAME   URL
   local  http://127.0.0.1:8879
 
-**Step 5.** Build a local Helm repository (from the kubernetes directory)::
+**Step 6.** Build a local Helm repository (from the kubernetes directory)::
 
   > make all; make onap
 
-**Step 6.** Display the charts that available to be deployed::
+**Step 7.** Display the onap charts that available to be deployed::
+
+  > helm search onap -l
 
-  > helm search -l
 .. literalinclude:: helm-search.txt
 
 .. note::
   The setup of the Helm repository is a one time activity. If you make changes to your deployment charts or values be sure to use `make` to update your local Helm repository.
 
-**Step 7.** Once the repo is setup, installation of ONAP can be done with a
-single command::
+**Step 8.** Once the repo is setup, installation of ONAP can be done with a
+single command
+
+ a. If you updated the values directly use this command::
+
+    > helm deploy dev local/onap --namespace onap
+
+
+ b. If you are using an integration-override.yaml file use this command::
+
+    > helm deploy dev local/onap -f /root/integration-override.yaml --namespace onap
+
+
+ c. If you have a slower cloud environment you may want to use the public-cloud.yaml
+    which has longer delay intervals on database updates.::
+
+    > helm deploy dev local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap
 
-  > helm deploy dev local/onap --namespace onap
 
+**Step 9.** Commands to interact with the OOM installation
 
-Use the following to monitor your deployment and determine when ONAP is ready for use::
+Use the following to monitor your deployment and determine when ONAP is
+ready for use::
 
   > kubectl get pods --all-namespaces -o=wide
 
@@ -79,4 +148,4 @@ Undeploying onap can be done using the following command::
   > helm undeploy dev --purge
 
 
-More examples of using the deploy and undeploy plugins can be found here: https://wiki.onap.org/display/DW/OOM+Helm+%28un%29Deploy+plugins
\ No newline at end of file
+More examples of using the deploy and undeploy plugins can be found here: https://wiki.onap.org/display/DW/OOM+Helm+%28un%29Deploy+plugins
diff --git a/kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-cached.properties b/kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-cached.properties
new file mode 100644 (file)
index 0000000..28e3089
--- /dev/null
@@ -0,0 +1,70 @@
+#
+# ============LICENSE_START=======================================================
+# Copyright © 2018 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=========================================================
+
+query.fast-property=true
+query.smart-limit=false
+
+{{- if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
+
+storage.backend=cassandra
+
+#In case of upgrades from Casablanca provide the override aai.global.cassandra.existingInstServiceName=aai-cassandra
+storage.hostname={{ .Values.global.cassandra.existingInstServiceName | default .Values.global.cassandra.serviceName }}
+
+storage.cassandra.keyspace=aaigraph
+storage.cassandra.read-consistency-level=LOCAL_QUORUM
+storage.cassandra.write-consistency-level=LOCAL_QUORUM
+storage.cassandra.replication-factor=3
+storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
+{{- else }}
+{{- if .Values.global.jobs.migration.remoteCassandra.storage }}
+storage.backend={{ .Values.global.jobs.migration.remoteCassandra.storage.backend }}
+storage.hostname={{ .Values.global.jobs.migration.remoteCassandra.storage.hostname }}
+{{- if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "cassandra" }}
+storage.cassandra.keyspace={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+storage.cassandra.read-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.readConsistency }}
+storage.cassandra.write-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.writeConsistency }}
+storage.cassandra.replication-factor={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.replicationFactor | int }}
+storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
+
+{{- else if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "cql" }}
+storage.cql.keyspace={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+storage.cql.read-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.readConsistency }}
+storage.cql.write-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.readConsistency }}
+storage.cql.replication-factor={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.replicationFactor | int }}
+storage.cql.only-use-local-consistency-for-system-operations={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.localConsistencyForSysOps }}
+storage.cql.cluster-name={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.clusterName }}
+storage.cql.local-datacenter={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.localDataCenter }}
+
+{{- else if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "hbase" }}
+storage.hbase.table={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+{{- end }}
+storage.connection-timeout={{ .Values.global.jobs.migration.remoteCassandra.storage.connectionTimeout | int }}
+cache.tx-cache-size={{ .Values.global.jobs.migration.remoteCassandra.storage.cacheSize | int }}
+log.tx.key-consistent={{ .Values.global.jobs.migration.remoteCassandra.storage.keyConsistent }}
+{{- end }}
+{{- end }}
+storage.lock.wait-time=300
+
+#caching on
+cache.db-cache = true
+cache.db-cache-clean-wait = 20
+cache.db-cache-time = 180000
+cache.db-cache-size = 0.3
+
+#load graphson file on startup
+load.snapshot.file=false
diff --git a/kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-real.properties b/kubernetes/aai/charts/aai-graphadmin/resources/config/migration/janusgraph-migration-real.properties
new file mode 100644 (file)
index 0000000..4c28b20
--- /dev/null
@@ -0,0 +1,65 @@
+#
+# ============LICENSE_START=======================================================
+# Copyright © 2018 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=========================================================
+
+query.fast-property=true
+query.smart-limit=false
+
+{{- if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
+
+storage.backend=cassandra
+
+#In case of upgrades from Casablanca provide the override aai.global.cassandra.existingInstServiceName=aai-cassandra
+storage.hostname={{ .Values.global.cassandra.existingInstServiceName | default .Values.global.cassandra.serviceName }}
+
+storage.cassandra.keyspace=aaigraph
+storage.cassandra.read-consistency-level=LOCAL_QUORUM
+storage.cassandra.write-consistency-level=LOCAL_QUORUM
+storage.cassandra.replication-factor=3
+storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
+{{- else }}
+{{- if .Values.global.jobs.migration.remoteCassandra.storage }}
+storage.backend={{ .Values.global.jobs.migration.remoteCassandra.storage.backend }}
+storage.hostname={{ .Values.global.jobs.migration.remoteCassandra.storage.hostname }}
+{{- if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "cassandra" }}
+storage.cassandra.keyspace={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+storage.cassandra.read-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.readConsistency }}
+storage.cassandra.write-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.writeConsistency }}
+storage.cassandra.replication-factor={{ .Values.global.jobs.migration.remoteCassandra.storage.cassandra.replicationFactor | int }}
+storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
+
+{{- else if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "cql" }}
+storage.cql.keyspace={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+storage.cql.read-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.readConsistency }}
+storage.cql.write-consistency-level={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.readConsistency }}
+storage.cql.replication-factor={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.replicationFactor | int }}
+storage.cql.only-use-local-consistency-for-system-operations={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.localConsistencyForSysOps }}
+storage.cql.cluster-name={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.clusterName }}
+storage.cql.local-datacenter={{ .Values.global.jobs.migration.remoteCassandra.storage.cql.localDataCenter }}
+
+{{- else if eq .Values.global.jobs.migration.remoteCassandra.storage.backend "hbase" }}
+storage.hbase.table={{ .Values.global.jobs.migration.remoteCassandra.storage.name }}
+{{- end }}
+storage.connection-timeout={{ .Values.global.jobs.migration.remoteCassandra.storage.connectionTimeout | int }}
+cache.tx-cache-size={{ .Values.global.jobs.migration.remoteCassandra.storage.cacheSize | int }}
+log.tx.key-consistent={{ .Values.global.jobs.migration.remoteCassandra.storage.keyConsistent }}
+{{- end }}
+{{- end }}
+storage.lock.wait-time=300
+# Setting db-cache to false ensure the fastest propagation of changes across servers
+cache.db-cache = false
+#load graphson file on startup
+load.snapshot.file=false
index 281bac6..bd229d3 100644 (file)
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-log
+  name: {{ include "common.fullname" . }}-configmap
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+  {{- if .Values.global.jobs.migration.enabled }}
+  annotations:
+    "helm.sh/hook": pre-upgrade,pre-install
+    "helm.sh/hook-weight": "0"
+    "helm.sh/hook-delete-policy": before-hook-creation
+  {{- end }}
 data:
 {{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-real-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-cached-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-aaiconfig-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-springapp-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }}
+
+{{- if .Values.global.jobs.migration.enabled }}
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-realm-configmap
+  name: {{ include "common.fullname" . }}-migration-configmap
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+  annotations:
+    "helm.sh/hook": pre-upgrade,pre-install
+    "helm.sh/hook-weight": "0"
+    "helm.sh/hook-delete-policy": before-hook-creation
 data:
-{{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/migration/*").AsConfig . | indent 2 }}
+{{- end }}
index 2888a64..f768603 100644 (file)
@@ -16,7 +16,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ============LICENSE_END=========================================================
-
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
@@ -45,7 +44,12 @@ spec:
     {{ if .Values.global.initContainers.enabled }}
       initContainers:
       - command:
-      {{  if .Values.global.jobs.createSchema.enabled  }}
+      {{ if .Values.global.jobs.migration.enabled }}
+        - /root/job_complete.py
+        args:
+        - --job-name
+        - {{ .Release.Name }}-aai-graphadmin-migration
+      {{  else if .Values.global.jobs.createSchema.enabled  }}
         - /root/job_complete.py
         args:
         - --job-name
@@ -86,27 +90,27 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-RES
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/realm.properties
-          name: {{ include "common.fullname" . }}-realm-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: realm.properties
         - mountPath: /opt/app/aai-graphadmin/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -166,27 +170,9 @@ spec:
         emptyDir: {}
       - name: {{ include "common.fullname" . }}-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
-      - name: {{ include "common.fullname" . }}-springapp-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-springapp-configmap
-      - name: {{ include "common.fullname" . }}-realm-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-realm-configmap
+         name: {{ include "common.fullname" . }}-configmap
       - name: {{ include "common.fullname" . }}-auth-truststore-sec
         secret:
          secretName: aai-common-truststore
index 55fce01..e5b673b 100644 (file)
@@ -29,8 +29,7 @@
 # If you are using an existing cassandra cluster not coming from oom
 # then it is your job to ensure that there are no connections to the database
 
-{{ if .Values.global.jobs.createSchema.enabled }}
-
+{{- if and ( not .Values.global.jobs.migration.enabled ) ( .Values.global.jobs.createSchema.enabled ) }}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -89,24 +88,24 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-GA
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-graphadmin/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -134,29 +133,179 @@ spec:
       - name: {{ include "common.fullname" . }}-logs
         hostPath:
           path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}-create-db-schema
-      - name: {{ include "common.fullname" . }}-filebeat
-        emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
-      - name: {{ include "common.fullname" . }}-springapp-conf
+         name: {{ include "common.fullname" . }}-configmap
+      - name: {{ include "common.fullname" . }}-auth-truststore-sec
+        secret:
+         secretName: aai-common-truststore
+         items:
+          {{ range $job := .Values.global.config.auth.files }}
+           - key: {{ . }}
+             path: {{ . }}
+          {{ end }}
+      restartPolicy: Never
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+{{ end }}
+{{- if .Values.global.jobs.migration.enabled }}
+---
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ include "common.fullname" . }}-migration
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}-job
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    "helm.sh/hook": post-upgrade,post-rollback,post-install
+    "helm.sh/hook-weight": "1"
+    "helm.sh/hook-delete-policy": before-hook-creation
+spec:
+  backoffLimit: 20
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}-job
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        {{- if .Values.global.cassandra.localCluster }}
+        - aai-cassandra
+        {{- else }}
+        - cassandra
+        {{- end }}
+        - --container-name
+        - aai-schema-service
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
+      - command:
+        - /bin/bash
+        - -c
+        - bash docker-entrypoint.sh dataRestoreFromSnapshot.sh `ls -t /opt/app/aai-graphadmin/logs/data/dataSnapshots|head -1|awk -F".P" '{ print $1 }'`
+        env:
+        - name: LOCAL_USER_ID
+          value: {{ .Values.global.config.userId | quote }}
+        - name: LOCAL_GROUP_ID
+          value: {{ .Values.global.config.groupId | quote }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: janusgraph-realtime.properties
+        - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
+          name: {{ include "common.fullname" . }}-snapshots
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: janusgraph-cached.properties
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: aaiconfig.properties
+        - mountPath: /opt/aai/logroot/AAI-GA
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: localhost-access-logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/application.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: application.properties
+          {{ $global := . }}
+          {{ range $job := .Values.global.config.auth.files }}
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
+          name: {{ include "common.fullname" $global }}-auth-truststore-sec
+          subPath: {{ . }}
+          {{ end }}
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-restore-backup
+      containers:
+      - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-perform-migration
+        command:
+        - /bin/bash
+        - -c
+        - bash docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges
+        env:
+        - name: LOCAL_USER_ID
+          value: {{ .Values.global.config.userId | quote }}
+        - name: LOCAL_GROUP_ID
+          value: {{ .Values.global.config.groupId | quote }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: janusgraph-realtime.properties
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: janusgraph-cached.properties
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: aaiconfig.properties
+        - mountPath: /opt/aai/logroot/AAI-GA
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: localhost-access-logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/application.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: application.properties
+          {{ $global := . }}
+          {{ range $job := .Values.global.config.auth.files }}
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
+          name: {{ include "common.fullname" $global }}-auth-truststore-sec
+          subPath: {{ . }}
+          {{ end }}
+        resources:
+{{ include "common.resources" . }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: filebeat-conf
         configMap:
-         name: {{ include "common.fullname" . }}-springapp-configmap
-      - name: {{ include "common.fullname" . }}-realm-conf
+          name: aai-filebeat
+      - name: {{ include "common.fullname" . }}-logs
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-realm-configmap
+         name: {{ include "common.fullname" . }}-configmap
+      - name: {{ include "common.fullname" . }}-snapshots
+        persistentVolumeClaim:
+          claimName: {{ include "common.fullname" . }}-migration
       - name: {{ include "common.fullname" . }}-auth-truststore-sec
         secret:
          secretName: aai-common-truststore
@@ -168,4 +317,112 @@ spec:
       restartPolicy: Never
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
+---
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ include "common.fullname" . }}-db-backup-job
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}-db-backup-job
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+  annotations:
+    "helm.sh/hook": pre-upgrade,pre-install
+    "helm.sh/hook-weight": "2"
+    "helm.sh/hook-delete-policy": before-hook-creation
+spec:
+  backoffLimit: 20
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}-db-backup-job
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      {{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
+      initContainers:
+      - command:
+        - /bin/bash
+        - -c
+        - /root/ready.py --container-name aai-cassandra --timeout 1 || /root/ready.py --container-name cassandra
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-db-backup-readiness
+      {{- end }}
+      containers:
+      - name: {{ include "common.name" . }}-db-backup-job
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - /bin/bash
+        - docker-entrypoint.sh
+        - dataSnapshot.sh
+        env:
+        - name: LOCAL_USER_ID
+          value: {{ .Values.global.config.userId | quote }}
+        - name: LOCAL_GROUP_ID
+          value: {{ .Values.global.config.groupId | quote }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
+          name: {{ include "common.fullname" . }}-snapshots
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
+          name: {{ include "common.fullname" . }}-migration
+          subPath: janusgraph-migration-real.properties
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
+          name: {{ include "common.fullname" . }}-migration
+          subPath: janusgraph-migration-cached.properties
+        - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: aaiconfig.properties
+        - mountPath: /opt/aai/logroot/AAI-RES/
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
+          name: {{ include "common.fullname" . }}-config
+          subPath: localhost-access-logback.xml
+        - mountPath: /opt/app/aai-graphadmin/resources/application.properties
+          name: {{ include "common.fullname" . }}-config
+          subPath: application.properties
+        resources:
+{{ include "common.resources" . | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-logs
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-config
+        configMap:
+         name: {{ include "common.fullname" . }}-configmap
+      - name: {{ include "common.fullname" . }}-migration
+        configMap:
+         name: {{ include "common.fullname" . }}-migration-configmap
+      - name: {{ include "common.fullname" . }}-snapshots
+        persistentVolumeClaim:
+          claimName: {{ include "common.fullname" . }}-migration
+      restartPolicy: Never
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
 {{ end }}
+
diff --git a/kubernetes/aai/charts/aai-graphadmin/templates/pv.yaml b/kubernetes/aai/charts/aai-graphadmin/templates/pv.yaml
new file mode 100644 (file)
index 0000000..f678331
--- /dev/null
@@ -0,0 +1,42 @@
+{{/*
+# Copyright ▒ 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{- if .Values.global.jobs.migration.enabled -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    name: {{ include "common.fullname" . }}
+  annotations:
+    "helm.sh/hook": pre-upgrade,pre-install
+    "helm.sh/hook-weight": "0"
+    "helm.sh/hook-delete-policy": before-hook-creation
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath1 }}
+{{- end -}}
+
diff --git a/kubernetes/aai/charts/aai-graphadmin/templates/pvc.yaml b/kubernetes/aai/charts/aai-graphadmin/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..582afe9
--- /dev/null
@@ -0,0 +1,51 @@
+{{/*
+# Copyright ▒ 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{- if .Values.global.jobs.migration.enabled -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-migration
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+  annotations:
+    "helm.sh/hook": pre-upgrade,pre-install
+    "helm.sh/hook-weight": "-1"
+    "helm.sh/hook-delete-policy": before-hook-creation
+{{- if .Values.persistence.annotations }}
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
index bdd6033..498c3c1 100644 (file)
@@ -108,8 +108,26 @@ ingress:
   enabled: false
 
 persistence:
+  enabled: true
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+
   mountPath: /dockerdata-nfs
   mountSubPath: aai/aai-graphadmin
+  mountSubPath1: aai/migration
 
 resources:
   small:
index 0f40d04..a4c2e31 100644 (file)
@@ -15,7 +15,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-log
+  name: {{ include "common.fullname" . }}-configmap
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
@@ -24,83 +24,11 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-real-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-cached-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-aaiconfig-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-springapp-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-realm-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }}
 ---
 apiVersion: v1
index 84438c1..d530c3d 100644 (file)
@@ -805,7 +805,12 @@ spec:
       {{ end }}
       initContainers:
       - command:
-      {{  if .Values.global.jobs.createSchema.enabled  }}
+      {{ if .Values.global.jobs.migration.enabled }}
+        - /root/job_complete.py
+        args:
+        - --job-name
+        - {{ .Release.Name }}-aai-graphadmin-migration
+      {{  else if .Values.global.jobs.createSchema.enabled  }}
         - /root/job_complete.py
         args:
         - --job-name
@@ -853,24 +858,24 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-RES
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-resources/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-resources/resources/etc/auth/realm.properties
-          name: {{ include "common.fullname" . }}-realm-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: realm.properties
         {{ if .Values.global.installSidecarSecurity }}
         - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_policy.json
@@ -902,7 +907,7 @@ spec:
           name: aai-common-aai-auth-mount
           subPath: truststoreONAPall.jks
         - mountPath: /opt/app/aai-resources/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -1046,33 +1051,15 @@ spec:
         emptyDir: {}
       - name: {{ include "common.fullname" . }}-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
+         name: {{ include "common.fullname" . }}-configmap
       - name: {{ include "common.fullname" . }}-aaf-properties
         configMap:
          name: {{ include "common.fullname" . }}-aaf-props
       - name: {{ include "common.fullname" . }}-aaf-certs
         secret:
          secretName: {{ include "common.fullname" . }}-aaf-keys
-      - name: {{ include "common.fullname" . }}-springapp-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-springapp-configmap
-      - name: {{ include "common.fullname" . }}-realm-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-realm-configmap
       - name: {{ include "common.fullname" . }}-auth-truststore-sec
         secret:
          secretName: aai-common-truststore
index 106031e..1a92199 100644 (file)
@@ -15,7 +15,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-log
+  name: {{ include "common.fullname" . }}-configmap
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
@@ -24,83 +24,11 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-real-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-db-cached-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-aaiconfig-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-springapp-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-realm-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
 {{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }}
 ---
 apiVersion: v1
index c783f7d..b94389f 100644 (file)
@@ -440,7 +440,12 @@ spec:
     {{ if .Values.global.initContainers.enabled }}
       initContainers:
       - command:
-      {{  if .Values.global.jobs.createSchema.enabled  }}
+      {{ if .Values.global.jobs.migration.enabled }}
+        - /root/job_complete.py
+        args:
+        - --job-name
+        - {{ .Release.Name }}-aai-graphadmin-migration
+      {{  else if .Values.global.jobs.createSchema.enabled  }}
         - /root/job_complete.py
         args:
         - --job-name
@@ -483,24 +488,24 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-GQ
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-traversal/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-traversal/resources/etc/auth/realm.properties
-          name: {{ include "common.fullname" . }}-realm-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: realm.properties
         - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.keyfile
           name: {{ include "common.fullname" . }}-aaf-certs
@@ -527,7 +532,7 @@ spec:
           name: aai-common-aai-auth-mount
           subPath: truststoreONAPall.jks
         - mountPath: /opt/app/aai-traversal/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -588,21 +593,9 @@ spec:
         emptyDir: {}
       - name: {{ include "common.fullname" . }}-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
+         name: {{ include "common.fullname" . }}-configmap
       - name: {{ include "common.fullname" . }}-aaf-properties
         configMap:
          name: {{ include "common.fullname" . }}-aaf-props
@@ -612,12 +605,6 @@ spec:
       - name: aai-common-aai-auth-mount
         secret:
           secretName: aai-common-aai-auth
-      - name: {{ include "common.fullname" . }}-springapp-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-springapp-configmap
-      - name: {{ include "common.fullname" . }}-realm-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-realm-configmap
       - name: {{ include "common.fullname" . }}-auth-truststore-sec
         secret:
          secretName: aai-common-truststore
index a746f54..31db068 100644 (file)
@@ -25,6 +25,12 @@ metadata:
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+{{ if .Values.global.jobs.migration.enabled }}
+  annotations:
+    "helm.sh/hook": post-upgrade,post-rollback,post-install
+    "helm.sh/hook-weight": "2"
+    "helm.sh/hook-delete-policy": before-hook-creation
+{{ end }}
 spec:
   template:
     metadata:
@@ -74,24 +80,24 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-GQ/
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-traversal/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-traversal/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -113,27 +119,9 @@ spec:
           path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}-update-query
       - name: {{ include "common.fullname" . }}-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
-      - name: {{ include "common.fullname" . }}-springapp-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-springapp-configmap
-      - name: {{ include "common.fullname" . }}-realm-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-realm-configmap
+         name: {{ include "common.fullname" . }}-configmap
       - name: {{ include "common.fullname" . }}-auth-truststore-sec
         secret:
          secretName: aai-common-truststore
index 1b359fc..3d13c2b 100644 (file)
@@ -104,6 +104,69 @@ global: # global defaults
     # When enabled, it will create the widget models via REST API to haproxy
     updateQueryData:
       enabled: true
+    #migration using helm hooks
+    migration:
+      enabled: false
+      remoteCassandra:
+        enabled: false
+        storage:
+          backend: cassandra
+          hostname: 10.10.10.10
+          connectionTimeout: 100000
+          cacheSize: 1000000
+          keyConsistent: true
+
+          #If backend is cql or cassandra it should be keyspace name
+          #else backend is hbase it should be hbase table name
+          name: aaigraph
+
+       ## CQL driver specific properties for janusgraph
+       #  cql:
+       #    #Name of the Cassandra Cluster
+       #    cluster: someclustername
+       #    readConsistency: QUORUM
+       #    writeConsistency: QUORUM
+       #    replicationFactor: 3
+       #    localConsistencyForSysOps: true
+
+       ## Cassandra driver specific properties for janusgraph
+          cassandra:
+            #Name of the Cassandra Cluster
+            clusterName: aai-cluster
+            localDataCenter: Pod lab
+            readConsistency: LOCAL_QUORUM
+            writeConsistency: LOCAL_QUORUM
+            replicationFactor: 3
+
+        #storage:
+        #  backend: cassandra
+        #  hostname: somehost1,somehost2,somehost3
+        #  connectionTimeout: 100000
+        #  cacheSize: 1000000
+        #  clusterName: someClusterName
+        #  localDataCenter: someDataCenter
+        #  keyConsistent: true
+        #  #If backend is cql or cassandra it should be keyspace name
+        #  #else backend is hbase it should be hbase table name
+        #  name: your_hbase_table_or_keyspace_name
+
+        ## CQL driver specific properties for janusgraph
+        #  cql:
+        #    #Name of the Cassandra Cluster
+        #    cluster: someclustername
+        #    readConsistency: QUORUM
+        #    writeConsistency: QUORUM
+        #    replicationFactor: 3
+        #    localConsistencyForSysOps: true
+
+        ## Cassandra driver specific properties for janusgraph
+        #  cassandra:
+        #    #Name of the Cassandra Cluster
+        #    cluster: someclustername
+        #    readConsistency: LOCAL_QUORUM
+        #    writeConsistency: LOCAL_QUORUM
+        #    replicationFactor: 3
+
 
   # Common configuration for resources traversal and graphadmin
   config:
index 61c265f..ff249ee 100644 (file)
@@ -19,3 +19,4 @@ dependencies:
   - name: postgres
     version: ~4.x-0
     repository: '@local'
+    condition: PG.enabled
index 294ffa6..f9c4d9e 100644 (file)
@@ -54,8 +54,8 @@ Feed.deleteHandling: SimulateDelete
 # Settings for Soutbound API: Postgresql
 #
 #####################################################
-# flag indieonapdemodbates if we are using postgresql
-UsePGSQL: true
+# flag indicates if we are using postgresql
+UsePGSQL: {{ .Values.PG.enabled  }}
 
 # postgres host name
 # Need to connect to PG primary service, designated by service.name2
index 0ecdc1c..fb31454 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2018  AT&T Intellectual Property.  All rights reserved.
+
 # Modifications Copyright © 2018 Amdocs,Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,10 +32,25 @@ spec:
         release: {{ .Release.Name }}
     spec:
       hostAliases:
-      - ip: "10.12.6.214"
+      - ip: "10.12.5.145"
         hostnames:
         - "aaf-onap-test.osaaf.org"
       initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - aaf-locate
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-aaf-readiness
+{{ if .Values.PG.enabled }}
       - command:
         - /root/ready.py
         args:
@@ -49,7 +64,8 @@ spec:
               fieldPath: metadata.namespace
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+        name: {{ include "common.name" . }}-postgres-readiness
+{{- end}}
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
index a7fc3d8..e59c4d6 100644 (file)
@@ -36,11 +36,11 @@ image: onap/dmaap/dmaap-bc:1.1.2
 # application configuration
 dmaapMessageRouterService: message-router
 # change the following value to point to Windriver instance maintained
-# but AAF team.
+# by AAF team.
 # e.g.
 #aafURL: https://aaf-onap-test.osaaf.org:8095/proxy/
 aafURL: https://aaf-service:8100/
-topicMgrUser: dmaap-bc-topic-mgr@dmaap-bc-topic-mgr.onap.org
+topicMgrUser: dmaap-bc@dmaap-bc.onap.org
 topicMgrPwd: demo123456!
 adminUser: aaf_admin@people.osaaf.org
 adminPwd: demo123456!
@@ -50,6 +50,10 @@ adminPwd: demo123456!
 # it will compose the topic namespace using the kubernetes namespace value
 fixedTopicNamespace: true
 
+# for quicker deployments in dev, ability to disable using postgres
+PG:
+  enabled: true
+
 nodeSelector: {}
 
 affinity: {}
index f2896cc..08e3fd0 100644 (file)
@@ -83,11 +83,11 @@ KeyStoreFile=/opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks
 #
 #    The password for the https keystore
 #
-KeyStorePassword=]3V)($O&.Mv]W{f8^]6SxGNL
+KeyStorePassword=WGxd2P6MDo*Bi4+UdzWs{?$8
 #
 #    The password for the private key in the https keystore
 #
-KeyPassword=]3V)($O&.Mv]W{f8^]6SxGNL
+KeyPassword=WGxd2P6MDo*Bi4+UdzWs{?$8
 #
 #    The type of truststore for https
 #
@@ -99,7 +99,7 @@ TrustStoreFile=/opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks
 #
 #    The password for the https truststore
 #
-TrustStorePassword=(Rd,&{]%ePdp}4JZjqoJ2G+g
+TrustStorePassword=)OBvCd{e{aWq.^mJJdX:S:1&
 #
 #    The path to the file used to trigger an orderly shutdown
 #
index ec31f3f..a508886 100644 (file)
@@ -45,6 +45,15 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
+        - name: {{ include "common.name" . }}-permission-fixer
+          image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - mountPath: {{ .Values.persistence.spoolPath }}
+            name: {{ include "common.fullname" . }}-spool-data-pvc
+          - mountPath: {{ .Values.persistence.eventLogsPath }}
+            name: {{ include "common.fullname" . }}-event-logs-pvc
+          command: ["chown","-Rf","1000:1001", "/opt/app/datartr"]
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -100,7 +109,7 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
         # Filebeat sidecar container
-        - name: {{ include "common.fullname" . }}-filebeat-onap
+        - name: {{ include "common.name" . }}-filebeat-onap
           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           volumeMounts:
@@ -139,7 +148,7 @@ spec:
             name: {{ include "common.fullname" . }}-log
         - name: {{ include "common.fullname" . }}-filebeat-conf
           configMap:
-            name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap
+            name: {{ .Release.Name }}-dmaap-filebeat-configmap
         - name: {{ include "common.fullname" . }}-data-filebeat
           emptyDir: {}
         - name:  {{ include "common.fullname" . }}-event-logs-pvc
index c6087e8..3b1532f 100644 (file)
@@ -21,13 +21,15 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
   loggingDirectory: /opt/app/datartr/logs
+  busyBoxImage: busybox:1.30
+  busyBoxRepository: docker.io
 
 #################################################################
 # Application configuration defaults.
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/dmaap/datarouter-node:2.0.2
+image: onap/dmaap/datarouter-node:2.1.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 2b78b8e..6a6f49c 100644 (file)
 #Jetty Server properties
 org.onap.dmaap.datarouter.provserver.http.port           = {{.Values.config.dmaapDrProv.externalPort}}
 org.onap.dmaap.datarouter.provserver.https.port          = {{.Values.config.dmaapDrProv.externalPort2}}
-org.onap.dmaap.datarouter.provserver.https.relaxation   = true
+org.onap.dmaap.datarouter.provserver.https.relaxation    = true
 
-org.onap.dmaap.datarouter.provserver.keymanager.password = AT{];bvaDiytVD&oWhMZj0N5
+org.onap.dmaap.datarouter.provserver.keymanager.password = FZNkU,B%NJzcT1v7;^v]M#ZX
 org.onap.dmaap.datarouter.provserver.keystore.type       = jks
 org.onap.dmaap.datarouter.provserver.keystore.path       = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks
-org.onap.dmaap.datarouter.provserver.keystore.password   = AT{];bvaDiytVD&oWhMZj0N5
+org.onap.dmaap.datarouter.provserver.keystore.password   = FZNkU,B%NJzcT1v7;^v]M#ZX
 org.onap.dmaap.datarouter.provserver.truststore.path     = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks
-org.onap.dmaap.datarouter.provserver.truststore.password = ljlS@Y}0]{UO(TnwvEWkgJ%]
+org.onap.dmaap.datarouter.provserver.truststore.password = +mzf@J.D^;3!![*Xr.z$c#?b
 org.onap.dmaap.datarouter.provserver.accesslog.dir       = /opt/app/datartr/logs
 org.onap.dmaap.datarouter.provserver.spooldir            = /opt/app/datartr/spool
 org.onap.dmaap.datarouter.provserver.dbscripts           = /opt/app/datartr/etc/misc
index afd34d9..b9c144d 100644 (file)
@@ -87,7 +87,7 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
         # Filebeat sidecar container
-        - name: {{ include "common.fullname" . }}-filebeat-onap
+        - name: {{ include "common.name" . }}-filebeat-onap
           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           volumeMounts:
@@ -115,7 +115,7 @@ spec:
           name: {{ include "common.fullname" . }}-log
       - name: {{ include "common.fullname" . }}-filebeat-conf
         configMap:
-          name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap
+          name: {{ .Release.Name }}-dmaap-filebeat-configmap
       - name: {{ include "common.fullname" . }}-data-filebeat
         emptyDir: {}
       - name:  {{ include "common.fullname" . }}-logs
index 3d65e91..7dca42e 100644 (file)
@@ -28,7 +28,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/dmaap/datarouter-prov:2.0.2
+image: onap/dmaap/datarouter-prov:2.1.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required