Changing AAIService Bundle to use AAI Properties 73/7773/2
authorHector Anapan <ha076r@att.com>
Wed, 16 Aug 2017 18:56:54 +0000 (14:56 -0400)
committerPatrick Brady <pb071s@att.com>
Wed, 16 Aug 2017 22:09:46 +0000 (22:09 +0000)
This code changes the docker-compose.yml's SDNC_CONFIG_DIR env.variable in the "appc" service that deploys the appc container to point to appc's aaiclient.properties instead of the sdnc's aiiclient.properties. In doing so, some properties had to be moved to the new SDNC_CONFIG_DIR's appc properties folder path so SDNC karaf features are installed correctly. Also, replacing the AAIClient p12 keystore by converting the validated jks file to this new p12 keystore certificate.

Change-Id: I6ee5bd56f4403cb575fdc93ded8eebc6a7a5cc4b
Signed-off-by: Hector Anapan <ha076r@att.com>
Issue: [APPC-129]

docker-compose/docker-compose.yml
installation/src/main/properties/mdsal-resource.properties [new file with mode: 0644]
installation/src/main/properties/sql-resource.properties [new file with mode: 0644]
installation/src/main/properties/svclogic.properties [new file with mode: 0644]
installation/src/main/stores/keystore.client.p12 [deleted file]
installation/src/main/stores/keystore.clientnew.p12 [new file with mode: 0644]
platform-logic/installer/src/main/scripts/setenv.sh

index d431e66..11e4669 100644 (file)
@@ -21,7 +21,9 @@ services:
         max-size: "30m"
         max-file: "5"
 
-      
+# Tweaking SDNC_CONFIG_DIR temporarily from ../sdnc/.. to ../appc/.. since it may be needed in this script
+#    to map to SDN-C AAI Service Bundle's AAI Activator class inside the gerrit sdnc/adaptors repo, so that
+#    the AAI Service bundle loads APP-C's aaiclient.properties instead of SDN-C's aaiclient.properties.
   appc:
     image: "openecomp/appc-image:latest"
     depends_on :
@@ -37,7 +39,7 @@ services:
       - db:sdnctldb02
     environment:
       - MYSQL_ROOT_PASSWORD=openECOMP1.0
-      - SDNC_CONFIG_DIR=/opt/openecomp/sdnc/data/properties
+      - SDNC_CONFIG_DIR=/opt/openecomp/appc/data/properties
       - APPC_CONFIG_DIR=/opt/openecomp/appc/data/properties
       - DMAAP_TOPIC_ENV=SUCCESS
     logging:
@@ -66,9 +68,9 @@ services:
     environment:
       - MYSQL_ROOT_PASSWORD=openECOMP1.0
       - SDNC_CONFIG_DIR=/opt/openecomp/sdnc/data/properties
-      - APPC_CONFIG_DIR=/opt/openecomp/appc/data/properties
     logging:
       driver: "json-file"
       options:
         max-size: "30m"
         max-file: "5"
+
diff --git a/installation/src/main/properties/mdsal-resource.properties b/installation/src/main/properties/mdsal-resource.properties
new file mode 100644 (file)
index 0000000..7f015f4
--- /dev/null
@@ -0,0 +1,25 @@
+###
+# ============LICENSE_START=======================================================
+# APPC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-user=admin
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-passwd=admin
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-host=localhost
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-protocol=http
+org.openecomp.sdnc.sli.resource.mdsal.sdnc-port=8181
diff --git a/installation/src/main/properties/sql-resource.properties b/installation/src/main/properties/sql-resource.properties
new file mode 100644 (file)
index 0000000..e1f4e38
--- /dev/null
@@ -0,0 +1,21 @@
+###
+# ============LICENSE_START=======================================================
+# APPC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.resource.sql.cryptkey=QtfJMKggVk
diff --git a/installation/src/main/properties/svclogic.properties b/installation/src/main/properties/svclogic.properties
new file mode 100644 (file)
index 0000000..83ebae9
--- /dev/null
@@ -0,0 +1,28 @@
+###
+# ============LICENSE_START=======================================================
+# APPC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = dblib
+#Note : the next 4 fields are only used if org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+
+org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
diff --git a/installation/src/main/stores/keystore.client.p12 b/installation/src/main/stores/keystore.client.p12
deleted file mode 100644 (file)
index 5efffb3..0000000
Binary files a/installation/src/main/stores/keystore.client.p12 and /dev/null differ
diff --git a/installation/src/main/stores/keystore.clientnew.p12 b/installation/src/main/stores/keystore.clientnew.p12
new file mode 100644 (file)
index 0000000..932889e
Binary files /dev/null and b/installation/src/main/stores/keystore.clientnew.p12 differ
index 5484048..fbbdefa 100644 (file)
 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
 ###
 
-SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/data/properties}
+# Tweaking SDNC_CONFIG_DIR temporarily from ../sdnc/.. to ../appc/.. since it may be needed in this script
+#    to map to SDN-C AAI Service Bundle's AAI Activator class inside the gerrit sdnc/adaptors repo, so that
+#    the AAI Service bundle loads APP-C's aaiclient.properties instead of SDN-C's aaiclient.properties.
+SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/appc/data/properties}
 APPC_CONFIG_DIR=${APPC_CONFIG_DIR:-/opt/appc/data/properties}
 
-AAIURI=$(grep org.openecomp.sdnc.sli.aai.uri ${APPC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2)
+AAIURI=$(grep org.openecomp.sdnc.sli.aai.uri ${SDNC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2)
 
-MYSQL_USER=$(grep org.openecomp.sdnc.sli.jdbc.user ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
-MYSQL_PWD=$(grep org.openecomp.sdnc.sli.jdbc.password ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
-MYSQL_DB=$(grep org.openecomp.sdnc.sli.jdbc.database ${APPCC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
-MYSQL_SERVER=$(grep org.openecomp.sdnc.sli.jdbc.hosts ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1)
+MYSQL_USER=$(grep org.openecomp.sdnc.sli.jdbc.user ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_PWD=$(grep org.openecomp.sdnc.sli.jdbc.password ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_DB=$(grep org.openecomp.sdnc.sli.jdbc.database ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
+MYSQL_SERVER=$(grep org.openecomp.sdnc.sli.jdbc.hosts ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1)
 
 ODLUSER=$(grep controllerUser ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
 ODLPWD=$(grep controllerPass ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)