Rework CDS chart 91/82791/6
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Wed, 20 Mar 2019 12:17:58 +0000 (08:17 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Wed, 20 Mar 2019 14:41:26 +0000 (14:41 +0000)
- use shared DB
- remove unused properties

Change-Id: I1b45f4046180167d47aa1a8db6f34a118ae64209
Issue-ID: OOM-1743
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
13 files changed:
kubernetes/cds/charts/blueprints-processor/requirements.yaml
kubernetes/cds/charts/blueprints-processor/resources/config/application.properties
kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml
kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml [deleted file]
kubernetes/cds/charts/blueprints-processor/templates/service.yaml
kubernetes/cds/charts/blueprints-processor/values.yaml
kubernetes/cds/charts/controller-blueprints/requirements.yaml
kubernetes/cds/charts/controller-blueprints/resources/config/application.properties
kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml
kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml [deleted file]
kubernetes/cds/charts/controller-blueprints/values.yaml
kubernetes/cds/requirements.yaml
kubernetes/cds/values.yaml

index 1d06a38..9f92507 100755 (executable)
@@ -13,9 +13,6 @@
 # limitations under the License.
 
 dependencies:
-  - name: mariadb-galera
-    version: ~4.x-0
-    repository: file://../mariadb-galera/
   - name: common
     version: ~4.x-0
     repository: '@local'
\ No newline at end of file
index 9d1c957..c25176f 100755 (executable)
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
 #  See the License for the specific language governing permissions and\r
 #  limitations under the License.\r
-#logging.level.web=DEBUG\r
-appName={{.Values.config.applicationName}}\r
-ms_name={{.Values.config.msName}}\r
-appVersion={{.Values.config.bundleVersion}}\r
-blueprintsprocessor.grpcEnable={{.Values.config.grpcEnabled}}\r
-blueprintsprocessor.httpPort={{.Values.service.http.internalPort}}\r
-blueprintsprocessor.grpcPort={{.Values.service.grpc.internalPort}}\r
-#Blueprint Processor File Execution and Handling Properties\r
+\r
+# Functionality config\r
+blueprintsprocessor.grpcEnable=true\r
+blueprintsprocessor.restconfEnabled=true\r
+blueprintsprocessor.httpPort=8080\r
+blueprintsprocessor.grpcPort=9111\r
+\r
+# Basic Authentication\r
+security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu\r
+security.user.name: ccsdkapps\r
+\r
+# Blueprint Processor File Execution and Handling Properties\r
 blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy\r
 blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive\r
-#Primary Database Configuration\r
-blueprintsprocessor.db.primary.url=jdbc:mysql://blueprints-processor-db:3306/sdnctl\r
+\r
+# Primary Database Configuration\r
+blueprintsprocessor.db.primary.url=jdbc:mysql://cds-db:3306/sdnctl\r
 blueprintsprocessor.db.primary.username=sdnctl\r
 blueprintsprocessor.db.primary.password=sdnctl\r
 blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver\r
@@ -30,5 +35,13 @@ blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update
 blueprintsprocessor.db.primary.hibernateDDLAuto=update\r
 blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy\r
 blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect\r
-# Web server config\r
-server.port=8080
\ No newline at end of file
+\r
+# Python executor\r
+blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints\r
+blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf\r
+\r
+# SDN-C's ODL Restconf Connection Details\r
+blueprintsprocessor.restclient.sdncodl.type=basic-auth\r
+blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/\r
+blueprintsprocessor.restclient.sdncodl.username=admin\r
+blueprintsprocessor.restclient.sdncodl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
\ No newline at end of file
index 5629913..94f2fd9 100755 (executable)
@@ -35,7 +35,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ index .Values "mariadb-galera" "nameOverride" }}
+        - cds-db
         env:
         - name: NAMESPACE
           valueFrom:
diff --git a/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml b/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml
deleted file mode 100755 (executable)
index f21363d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2019 IBM, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-type: Opaque
-data:
-  db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
index 4c1c32c..5c8bc8c 100755 (executable)
@@ -31,15 +31,13 @@ spec:
       {{- if eq .Values.service.type "NodePort"}}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
       {{- end}}
-      name: {{ .Values.service.portName | default "http" }}
-    {{- if .Values.config.grpcEnabled}}
+      name: {{ .Values.service.http.portName | default "http" }}
     - port: {{ .Values.service.grpc.externalPort }}
       targetPort: {{ .Values.service.grpc.internalPort }}
       {{- if eq .Values.service.type "NodePort"}}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
       {{- end}}
-      name: {{ .Values.service.portName | default "http" }}
-    {{- end}}
+      name: {{ .Values.service.grpc.portName | default "grpc" }}
   selector:
     app: {{ include "common.name" . }}
     release: {{ .Release.Name }}
\ No newline at end of file
index 2edcc8a..10169d5 100755 (executable)
@@ -40,7 +40,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/ccsdk-blueprintsprocessor:0.4.1
+image: onap/ccsdk-blueprintsprocessor:0.4-STAGING-latest
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -48,28 +48,7 @@ debugEnabled: false
 
 # application configuration
 config:
-  applicationName: BlueprintsProcessor
-  msName: "org.onap.ccsdk.apps.blueprintsprocessor"
-  bundleVersion: "1.0.0"
   appConfigDir: /opt/app/onap/config
-  grpcEnabled: false
-  stickySelectorKey:
-  envContext: DEV
-
-mariadb-galera:
-  config:
-    userName: sdnctl
-    userPassword: sdnctl
-    mariadbRootPassword: sdnctl
-    mysqlDatabase: sdnctl
-  nameOverride: blueprints-processor-db
-  service:
-    name: blueprints-processor-db
-    portName: bp-db
-  replicaCount: 1
-  persistence:
-    enabled: true
-    mountSubPath: blueprints-processor/data
 
 # default number of instances
 replicaCount: 1
@@ -92,11 +71,12 @@ readiness:
 
 service:
   type: ClusterIP
-  portName: blueprints-processor
   http:
+    portName: blueprints-processor-http
     internalPort: 8080
     externalPort: 8080
   grpc:
+    portName: blueprints-processor-grpc
     internalPort: 9111
     externalPort: 9111
 
index cefe3d3..857a963 100644 (file)
@@ -13,9 +13,6 @@
 # limitations under the License.
 
 dependencies:
-  - name: mariadb-galera
-    version: ~4.x-0
-    repository: file://../mariadb-galera/
   - name: common
     version: ~4.x-0
     repository: '@local'
\ No newline at end of file
index 7eec7f9..80fdaf5 100755 (executable)
 # 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.
-#
-appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
-appVersion=1.0.0
 
 # Basic Authentication
 basic-auth.user-name=ccsdkapps
@@ -26,20 +22,19 @@ logging.level.org.springframework.web=INFO
 logging.level.org.hibernate.SQL=warn
 logging.level.org.hibernate.type.descriptor.sql=debug
 
-#To Remove Null in JSON API Response
+# To Remove Null in JSON API Response
 spring.jackson.default-property-inclusion=non_null
 
-#Swagger Configuration
+# Swagger Configuration
 swagger.contact.name=CCSDK team
 swagger.contact.url=www.onap.org
 swagger.contact.email=onap-discuss@lists.onap.org
 
+# DB information
 spring.jpa.properties.hibernate.show_sql=true
 spring.jpa.properties.hibernate.use_sql_comments=true
 spring.jpa.properties.hibernate.format_sql=true
-
-# spring.datasource.url, spring.datasource.username,spring.datasource.password  may be overridden by ENV variables
-spring.datasource.url=jdbc:mysql://controller-blueprints-db:3306/sdnctl
+spring.datasource.url=jdbc:mysql://cds-db:3306/sdnctl
 spring.datasource.username=sdnctl
 spring.datasource.password=sdnctl
 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
index ef8b38f..4cd2e18 100755 (executable)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ index .Values "mariadb-galera" "nameOverride" }}
+        - cds-db
         env:
         - name: NAMESPACE
           valueFrom:
diff --git a/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml b/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml
deleted file mode 100644 (file)
index b4ab161..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-type: Opaque
-data:
-  db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
-  restUser: {{ .Values.config.restUser | b64enc | quote }}
-  restPassword: {{ .Values.config.restPassword | b64enc | quote }}
index 02b5685..246aae4 100755 (executable)
@@ -48,23 +48,6 @@ debugEnabled: false
 config:
   appConfigDir: /opt/app/onap/config
   initDataLoad: true
-  restUser: ccsdkapps
-  restPassword: ccsdkapps
-
-mariadb-galera:
-  config:
-      userName: sdnctl
-      userPassword: sdnctl
-      mariadbRootPassword: sdnctl
-      mysqlDatabase: sdnctl
-  nameOverride: controller-blueprints-db
-  service:
-    name: controller-blueprints-db
-    portName: cb-db
-  replicaCount: 1
-  persistence:
-    enabled: true
-    mountSubPath: controller-blueprints/data
 
 # default number of instances
 replicaCount: 1
index d7b38dc..51a4e3f 100644 (file)
@@ -17,3 +17,6 @@ dependencies:
   - name: common
     version: ~4.x-0
     repository: '@local'
+  - name: mariadb-galera
+    version: ~4.x-0
+    repository: '@local'
\ No newline at end of file
index 3815d9a..06b7cd1 100644 (file)
@@ -34,6 +34,20 @@ pullPolicy: Always
 # application configuration
 config:
 
+mariadb-galera:
+  config:
+      userName: sdnctl
+      userPassword: sdnctl
+      mariadbRootPassword: sdnctl
+      mysqlDatabase: sdnctl
+  nameOverride: cds-db
+  service:
+    name: cds-db
+    portName: cds-db
+  replicaCount: 1
+  persistence:
+    enabled: true
+    mountSubPath: cds/data
 
 # default number of instances
 replicaCount: 1