aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
Diffstat (limited to 'ms')
-rwxr-xr-xms/blueprintsprocessor/application/etc/logback.xml36
-rwxr-xr-xms/blueprintsprocessor/application/opt/app/onap/config/application.properties40
-rwxr-xr-xms/blueprintsprocessor/application/opt/app/onap/config/logback.xml36
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application.properties79
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml3
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/Dockerfile17
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/distribution.xml30
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/run.source (renamed from ms/blueprintsprocessor/application/etc/run.source)0
-rw-r--r--ms/blueprintsprocessor/distribution/src/main/docker/startService.sh1
-rw-r--r--ms/controllerblueprints/application/etc/SecurityFilterExpressions.cfg71
-rw-r--r--ms/controllerblueprints/application/etc/SecurityFilterExpressionsPool.properties22
-rw-r--r--ms/controllerblueprints/application/etc/logback.xml44
-rwxr-xr-xms/controllerblueprints/application/opt/app/onap/config/application-dev.properties70
-rwxr-xr-xms/controllerblueprints/application/opt/app/onap/config/application.properties75
-rwxr-xr-xms/controllerblueprints/application/src/main/resources/application-dev.properties2
-rwxr-xr-xms/controllerblueprints/application/src/main/resources/application.properties19
-rw-r--r--[-rwxr-xr-x]ms/controllerblueprints/application/src/main/resources/logback.xml (renamed from ms/controllerblueprints/application/opt/app/onap/config/logback.xml)88
-rwxr-xr-xms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml3
-rwxr-xr-xms/controllerblueprints/distribution/src/main/docker/Dockerfile17
-rwxr-xr-xms/controllerblueprints/distribution/src/main/docker/distribution.xml38
-rwxr-xr-xms/controllerblueprints/distribution/src/main/docker/run.source (renamed from ms/controllerblueprints/application/etc/run.source)0
-rwxr-xr-xms/controllerblueprints/distribution/src/main/docker/startService.sh1
-rwxr-xr-xms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt34
-rw-r--r--ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/load/BluePrintCatalogLoadService.kt2
25 files changed, 127 insertions, 603 deletions
diff --git a/ms/blueprintsprocessor/application/etc/logback.xml b/ms/blueprintsprocessor/application/etc/logback.xml
deleted file mode 100755
index a97bb8c3..00000000
--- a/ms/blueprintsprocessor/application/etc/logback.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ 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.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.apps" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties b/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties
index 37a57082..e69de29b 100755
--- a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties
+++ b/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties
@@ -1,40 +0,0 @@
-#
-# Copyright � 2017-2018 AT&T Intellectual Property.
-# Modifications Copyright © 2019 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.
-#
-#logging.level.web=DEBUG
-
-# Web server config
-server.port=8080
-
-blueprintsprocessor.grpcEnable=false
-blueprintsprocessor.httpPort=8080
-blueprintsprocessor.grpcPort=9111
-# Blueprint Processor File Execution and Handling Properties
-blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
-# Primary Database Configuration
-blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl
-blueprintsprocessor.db.primary.username=sdnctl
-blueprintsprocessor.db.primary.password=sdnctl
-blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver
-blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=validate
-blueprintsprocessor.db.primary.hibernateDDLAuto=none
-blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
-blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
-
-# Python executor
-blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython
-blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml b/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml
deleted file mode 100755
index a97bb8c3..00000000
--- a/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ 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.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.apps" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
index a7ffc42b..d48aba50 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties
@@ -1,41 +1,40 @@
-#
-# Copyright � 2017-2018 AT&T Intellectual Property.
-#
-# Modifications Copyright © 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.
-#
-#logging.level.web=DEBUG
-
-# Web server config
-server.port=8080
-
-blueprintsprocessor.grpcEnable=false
-blueprintsprocessor.httpPort=8080
-blueprintsprocessor.grpcPort=9111
-# Blueprint Processor File Execution and Handling Properties
-blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
-# Primary Database Configuration
-blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl
-blueprintsprocessor.db.primary.username=sdnctl
-blueprintsprocessor.db.primary.password=sdnctl
-blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver
-blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=validate
-blueprintsprocessor.db.primary.hibernateDDLAuto=none
-blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
-blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
-
-# Python executor
-blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython
+#
+# Copyright � 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 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.
+#
+#logging.level.web=DEBUG
+
+# Web server config
+server.port=8080
+
+blueprintsprocessor.grpcEnable=false
+blueprintsprocessor.httpPort=8080
+blueprintsprocessor.grpcPort=9111
+# Blueprint Processor File Execution and Handling Properties
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
+# Primary Database Configuration
+blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl
+blueprintsprocessor.db.primary.username=sdnctl
+blueprintsprocessor.db.primary.password=sdnctl
+blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=none
+blueprintsprocessor.db.primary.hibernateDDLAuto=none
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
+
+# Python executor
+blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython
blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython \ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
index c0eade50..1e197442 100755
--- a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
+++ b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
@@ -22,9 +22,6 @@ services:
ports:
- "8000:8080"
restart: always
- volumes:
- - ~/share/vm_ms/blueprintsprocessor/config:/opt/app/onap/config
- - ~/share/vm_ms/blueprintsprocessor/logs:/logs
environment:
APPLICATIONNAME: BlueprintsProcessor
BUNDLEVERSION: 1.0.0
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
index bd6bcb3f..d3e10b76 100755
--- a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
@@ -3,19 +3,16 @@ FROM anapsix/alpine-java:8_jdk
ENV HTTP_PROXY ${HTTP_PROXY}
ENV HTTPS_PROXY ${HTTPS_PROXY}
-RUN apk add --no-cache curl
-
+# add entrypoint
+COPY run.source /etc/run.source
COPY startService.sh /startService.sh
RUN chmod 777 /startService.sh && dos2unix /startService.sh
+# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
-
-RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
-&& (mv /source/@project.build.finalName@ /source/app) \
-&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
-&& (cp -rf /source/app/etc /) \
-&& (cp -rf /source/app/config /) \
-&& (cp -rf /source/app/scripts /opt/app/onap/) \
-&& (rm -rf /source)
+RUN tar -xzf /source.tar.gz -C /tmp \
+ && cp -rf /tmp/@project.build.finalName@/opt / \
+ && rm -rf /source.tar.gz \
+ && rm -rf /tmp/@project.build.finalName@
ENTRYPOINT /startService.sh \ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
index f84ed2dc..3137eb49 100755
--- a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
@@ -38,36 +38,12 @@
<include>application.properties</include>
<include>logback.xml</include>
</includes>
- <outputDirectory>./</outputDirectory>
+ <outputDirectory>/opt/app/onap/config</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
- <directory>${project.basedir}/src/main/docker</directory>
- <includes>
- <include>Dockerfile</include>
- <include>startService.sh</include>
- </includes>
- <outputDirectory>./</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/src/main/resources</directory>
- <outputDirectory>src/main/resources</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/opt/app/onap/config</directory>
- <outputDirectory>./config</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../../../components/scripts/python/ccsdk_blueprints</directory>
- <outputDirectory>./scripts/jython</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/etc</directory>
- <outputDirectory>./etc</outputDirectory>
+ <directory>${project.basedir}/../../../components/scripts/python</directory>
+ <outputDirectory>/opt/app/onap/scripts/jython</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
diff --git a/ms/blueprintsprocessor/application/etc/run.source b/ms/blueprintsprocessor/distribution/src/main/docker/run.source
index 7557ab12..7557ab12 100755
--- a/ms/blueprintsprocessor/application/etc/run.source
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/run.source
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
index 5f75de8a..88497156 100644
--- a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
@@ -5,5 +5,4 @@ nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s
echo "APP Config HOME : ${APP_CONFIG_HOME}"
export APP_HOME=/opt/app/onap
-mv -rf /config /opt/app/onap/
source /etc/run.source
diff --git a/ms/controllerblueprints/application/etc/SecurityFilterExpressions.cfg b/ms/controllerblueprints/application/etc/SecurityFilterExpressions.cfg
deleted file mode 100644
index 8185daa0..00000000
--- a/ms/controllerblueprints/application/etc/SecurityFilterExpressions.cfg
+++ /dev/null
@@ -1,71 +0,0 @@
-(>)\d{3,4}(<\/.*security>) $1xxxx$2
-(>)\d{11,12}(\d{4}<\/.*creditCardNumber>) $1xxxxxxxxxxxx$2
-(>)\d+(\d{4}<\/.*socialSecurityNumber.*>) $1xxxxx$2
-(>)\d{5}(\d{4}<\/.*ssn>) $1xxxxx$2
-(>)\d*(\d{3}<\/.*idNumber>) $1xxxxxx$2
-(>)\d{11,12}(\d{4}<\/cardNumber>) $1xxxxxxxxxxxx$2
-(>)[^>]*(<\/[^>]*[pP]assword>) $1xxxxxx$2
-(>)\d{3,4}(<\/cvv>) $1xxx$2
-(Card\sNumber\s=\s)\d{11,12}(\d{4}) $1xxxxxxxxxxxx$2
-(CVV\s=\s)... $1xxx
-(SSN\s=\s)\d{9} $1xxxxxxxxx
-(>)\d{11,12}(\d{4}<\/ccNum>) $1xxxxxxxxxxxx$2
-(>)\d{3,4}(<\/cvvNumber>) $1xxx$2
-(ccNum\s*=\s*)\d{11,12}(\d{4}) $1xxxxxxxxxxxx$2
-(cvvNumber\s*=\s*)\d{3,4} $1xxx$2
-(>).*(<\/passcode>) $1xxxxxx$2
-(password\s*=\s*)\S+ $1xxxxxx
-(>)\d{5}(\d{4}<\/.*businessTaxId>) $1xxxxx$2
-(tax_id\sin\srecord=\s)\d{5}(\d{4}) $1xxxxx$2
-(tax_id\sin\srequest=\s)\d{5}(\d{4}) $1xxxxx$2
-(socialSecurityNumber\s*=\s*)\d+(\d{4}) $1xxxxx$2
-(SSN\sin\srecord=)\d+(\d{4}) $1xxxxx$2
-(ssn7\s*)\d+(\d{4}) $1xxxxx$2
-(>)\d+(\d{4}<\/cam:taxId>) $1xxxxx$2
-(>)\d+(\d{4}<\/.*routingNumber>) $1xxxxx$2
-(>)\d+(\d{4}<\/bankTRN>) $1xxxxx$2
-(>)\d+(\d{4}<\/draftAccount>) $1xxxxx$2
-(SSN\sin\srequest\s=)\d+(\d{4}) $1xxxxx$2
-(Input\sto\sCasTux\sCtrl:\sSSN\s)\d+(\d{4}) $1xxxxx$2
-(businessTaxId\s)\d+(\d{4}) $1xxxxx$2
-(InquireSingleCredit\sTax_ID_Input\sin\sresponse=\s)\d+(\d{4}) $1xxxxx$2
-(<com:ssNumber>)\d+(\d{4}<\/com:ssNumber>) $1xxxxx$2
-(SsNumber:\s)\d+(\d{4}) $1xxxxx$2
-(BusinessTaxId:\s)\d+(\d{4}) $1xxxxx$2
-(<acc:passcode>).*(<\/acc:passcode>) $1xxxxxx$2
-(>)\d{4}(<\/.*creditCardExpirationDate>) $1xxxx$2
-(birthDate>)\d+(-)\d+(-)\d+(<\/.*birthDate>) $1xxxx$2xx$3xx$4
-(photoIdNumber>)\d+(\d{4}<\/.*photoIdNumber) $1xxxxxxxxxxxxxxx$2
-(socialSecurityNumber>)\d+(\d{4}<\/.*socialSecurityNumber) $1xxxxx$2
-(cardExpirationDate>)\d+(-)\d+(-)\d+(<\/.*cardExpirationDate>) $1xxxx$2xx$3xx$4
-(securityCode>)\d+(<\/.*securityCode>) $1xxxx$2
-(photo_id_nbr>)\d+(\d{4}<\/.*photo_id_nbr) $1xxxxxxxxxxxxxxx$2
-(social_security_nbr>)\d+(\d{4}<\/.*social_security_nbr) $1xxxxx$2
-(birth_date>)\d+(/)\d+(/)\d+(<\/.*birth_date>) $1xx$2xx$3xxxx$4
-(dateOfBirth>)\d+(/)\d+(/)\d+(<\/.*dateOfBirth>) $1xx$2xx$3xxxx$4
-(dateOfBirth>)\d+(-)\d+(-)\d+(<\/.*dateOfBirth>) $1xxxx$2xx$3xx$4
-(dateOfBirth>)\d+(-)\d+(-)\d+(Z<\/.*dateOfBirth>) $1xxxx$2xx$3xx$4
-(dateOfBirth>)\d+(/)\d+(/)\d+(Z<\/.*dateOfBirth>) $1xx$2xx$3xxxx$4
-(>)\w*(\w{3}<\/.*idNumber>) $1xxxxxx$2
-(taxId>)\d+(\d{4}<\/.*taxId>) $1xxxxx$2
-(accountNumber>)\d{12,19}(\d{4}<\/.*accountNumber>) $1xxxxxxxxxxxxxxx$2
-(>)[^>]*(<\/[^>]*ethnicity>) $1xxxxxx$2
-(>)[^>]*(<\/[^>]*RACE>) $1x$2
-(>)[^>]*(<\/[^>]*minority>) $1x$2
-(>)[^>]*(<\/[^>]*MINORITY>) $1x$2
-(BIRTH_DATE>)\d+(-)\d+(-)\d+(<\/.*BIRTH_DATE>) $1xx$2xx$3xxxx$4
-(custom07>)\d+(-)\d+(-)\d+(<\/.*custom07>) $1xx$2xx$3xxxx$4
-(&gt;)\d{11,12}(\d{4}&lt;\/.*creditCardNumber&gt;) $1xxxxxxxxxxxx$2
-(&gt;)\d{3,4}(&lt;\/.*security&gt;) $1xxxx$2
-(&gt;)\d{11,12}(\d{4}&lt;\/.*:.*creditCardNumber&gt;) $1xxxxxxxxxxxx$2
-(&gt;)\d{3,4}(&lt;\/.*:.*security&gt;) $1xxxx$2
-(>)\d{3,4}(<\/.*cVVCode>) $1xxxx$2
-(&gt;)\d{3,4}(&lt;\/.*cVVCode&gt;) $1xxxx$2
-(&gt;)\d{3,4}(&lt;\/.*:.*cVVCode&gt;) $1xxxx$2
-(&gt;).*(&lt;\/userPassword&gt;) $1xxxxxxx$2
-(&gt;).*(&lt;\/.*:userPassword&gt;) $1xxxxxx$2
-(&gt;).*(&lt;\/userPassword&gt;) $1xxxxxxx$2
-(\"userPassword\"\s*:\s*\")(.*?)(\") $1xxxxxx$3
-(\"cng:userPassword\"\s*:\s*\")(.*?)(\") $1xxxxxx$3
-(\"userPassword\"\s*:\s*)(\d+)(,|\s|}|]) $1xxxxxx$3
-(\"cng:userPassword\"\s*:\s*)(\d+)(,|\s|}|]) $1xxxxxx$3 \ No newline at end of file
diff --git a/ms/controllerblueprints/application/etc/SecurityFilterExpressionsPool.properties b/ms/controllerblueprints/application/etc/SecurityFilterExpressionsPool.properties
deleted file mode 100644
index acfaa454..00000000
--- a/ms/controllerblueprints/application/etc/SecurityFilterExpressionsPool.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright © 2017-2018 AT&T Intellectual Property.
-#
-# 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.
-#
-
-MaxActive=150
-#TimeBetweenEvictionRunsMillis=10
-
-#Min and Max idle are only used if TimeBetweenEvictionRunsMillis is set to a value > 0
-#MaxIdle=10
-#MinIdle=5
diff --git a/ms/controllerblueprints/application/etc/logback.xml b/ms/controllerblueprints/application/etc/logback.xml
deleted file mode 100644
index 01ae4f6c..00000000
--- a/ms/controllerblueprints/application/etc/logback.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ 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.
- -->
-
-<configuration>
-
- <property name="localPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{100} - %msg%n" />
-
- <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
-
- <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|[%caller{3}]| %msg%n" />
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>${defaultPattern}</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
- <logger name="org.springframework.security.web.authentication" level="warn"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.apps" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
diff --git a/ms/controllerblueprints/application/opt/app/onap/config/application-dev.properties b/ms/controllerblueprints/application/opt/app/onap/config/application-dev.properties
deleted file mode 100755
index 1c9029d5..00000000
--- a/ms/controllerblueprints/application/opt/app/onap/config/application-dev.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright © 2017-2018 AT&T Intellectual Property.
-#
-# 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.
-#
-appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
-appVersion=1.0.0
-
-# Basic Authentication
-basic-auth.user-name=ccsdkapps
-basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y
-
-#logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp} responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex
-
-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
-spring.jackson.default-property-inclusion=non_null
-
-#Swagger Configuration
-swagger.contact.name=Brinda Santh Muthuramalingam
-swagger.contact.url=www.onap.com
-swagger.contact.email=brindasanth@onap.com
-
-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://localhost:3306/sdnctl
-spring.datasource.username=sdnctl
-spring.datasource.password=sdnctl
-spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
-spring.jpa.show-sql=true
-spring.jpa.hibernate.ddl-auto=none
-spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
-# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
-# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
-controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
-controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
-# Controller Blueprint Load Configurations
-controllerblueprints.loadInitialData=true
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/test-blueprint
-controllerblueprints.loadModelType=true
-controllerblueprints.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=true
-controllerblueprints.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
-
-# CBA file extension
-controllerblueprints.loadCbaExtension=zip
-
-# Web server config
-server.port=8080 \ No newline at end of file
diff --git a/ms/controllerblueprints/application/opt/app/onap/config/application.properties b/ms/controllerblueprints/application/opt/app/onap/config/application.properties
deleted file mode 100755
index 049d846e..00000000
--- a/ms/controllerblueprints/application/opt/app/onap/config/application.properties
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Copyright © 2017-2018 AT&T Intellectual Property.
-# Modifications Copyright © 2018 IBM.
-# Modifications Copyright © 2019 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.
-#
-appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
-appVersion=1.0.0
-
-# Basic Authentication
-basic-auth.user-name=ccsdkapps
-basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y
-
-#logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp} responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex
-
-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
-spring.jackson.default-property-inclusion=non_null
-
-#Swagger Configuration
-swagger.contact.name=Brinda Santh Muthuramalingam
-swagger.contact.url=www.onap.com
-swagger.contact.email=brindasanth@onap.com
-
-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://db:3306/sdnctl
-spring.datasource.username=sdnctl
-spring.datasource.password=sdnctl
-spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
-spring.jpa.show-sql=true
-spring.jpa.hibernate.ddl-auto=none
-spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
-
-# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
-
-# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
-controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
-controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
-# Controller Blueprint Load Configurations
-# blueprints.load.initial-data may be overridden by ENV variables
-controllerblueprints.loadInitialData=true
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=/model-catalog/blueprint-model/test-blueprint
-controllerblueprints.loadModelType=true
-controllerblueprints.loadModeTypePaths=/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=true
-controllerblueprints.loadResourceDictionaryPaths=/model-catalog/resource-dictionary/starter-dictionary
-
-# CBA file extension
-controllerblueprints.loadCbaExtension=zip
-
-# Web server config
-server.port=8080 \ No newline at end of file
diff --git a/ms/controllerblueprints/application/src/main/resources/application-dev.properties b/ms/controllerblueprints/application/src/main/resources/application-dev.properties
index 9a5e75d3..1c9029d5 100755
--- a/ms/controllerblueprints/application/src/main/resources/application-dev.properties
+++ b/ms/controllerblueprints/application/src/main/resources/application-dev.properties
@@ -49,7 +49,7 @@ spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# Load Resource Source Mappings
-resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest,capability=source-capability
+resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
diff --git a/ms/controllerblueprints/application/src/main/resources/application.properties b/ms/controllerblueprints/application/src/main/resources/application.properties
index 0c789364..03409388 100755
--- a/ms/controllerblueprints/application/src/main/resources/application.properties
+++ b/ms/controllerblueprints/application/src/main/resources/application.properties
@@ -1,5 +1,6 @@
#
# Copyright © 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 2018 IBM.
# Modifications Copyright © 2019 Bell Canada.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,16 +33,16 @@ logging.level.org.hibernate.type.descriptor.sql=debug
spring.jackson.default-property-inclusion=non_null
#Swagger Configuration
-swagger.contact.name=Brinda Santh Muthuramalingam
-swagger.contact.url=www.onap.com
-swagger.contact.email=brindasanth@onap.com
+swagger.contact.name=CCSDK team
+swagger.contact.url=www.onap.org
+swagger.contact.email=onap-discuss@lists.onap.org
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://localhost:3306/sdnctl
+spring.datasource.url=jdbc:mysql://db:3306/sdnctl
spring.datasource.username=sdnctl
spring.datasource.password=sdnctl
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
@@ -51,7 +52,7 @@ spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# Load Resource Source Mappings
-resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest,capability=source-capability
+resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
@@ -60,12 +61,12 @@ controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
# Controller Blueprint Load Configurations
# blueprints.load.initial-data may be overridden by ENV variables
controllerblueprints.loadInitialData=true
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=/model-catalog/blueprint-model/test-blueprint
+controllerblueprints.loadBluePrint=true
+controllerblueprints.loadBluePrintPaths=/opt/app/onap//model-catalog/blueprint-model/service-blueprint
controllerblueprints.loadModelType=true
-controllerblueprints.loadModeTypePaths=/model-catalog/definition-type/starter-type
+controllerblueprints.loadModeTypePaths=/opt/app/onap//model-catalog/definition-type/starter-type
controllerblueprints.loadResourceDictionary=true
-controllerblueprints.loadResourceDictionaryPaths=/model-catalog/resource-dictionary/starter-dictionary
+controllerblueprints.loadResourceDictionaryPaths=/opt/app/onap//model-catalog/resource-dictionary/starter-dictionary
# CBA file extension
controllerblueprints.loadCbaExtension=zip
diff --git a/ms/controllerblueprints/application/opt/app/onap/config/logback.xml b/ms/controllerblueprints/application/src/main/resources/logback.xml
index 01ae4f6c..2db82a12 100755..100644
--- a/ms/controllerblueprints/application/opt/app/onap/config/logback.xml
+++ b/ms/controllerblueprints/application/src/main/resources/logback.xml
@@ -1,44 +1,44 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ 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.
- -->
-
-<configuration>
-
- <property name="localPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{100} - %msg%n" />
-
- <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
-
- <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|[%caller{3}]| %msg%n" />
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>${defaultPattern}</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
- <logger name="org.springframework.security.web.authentication" level="warn"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.apps" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ 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.
+ -->
+
+<configuration>
+
+ <property name="localPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{100} - %msg%n" />
+
+ <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
+
+ <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|[%caller{3}]| %msg%n" />
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>${defaultPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="org.springframework" level="info"/>
+ <logger name="org.springframework.web" level="info"/>
+ <logger name="org.springframework.security.web.authentication" level="warn"/>
+ <logger name="org.hibernate" level="error"/>
+ <logger name="org.onap.ccsdk.apps" level="info"/>
+
+ <root level="warn">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration>
diff --git a/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml
index 232bfc01..450a3541 100755
--- a/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml
+++ b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml
@@ -22,9 +22,6 @@ services:
ports:
- "8080:8080"
restart: always
- volumes:
- - ~/share/vm_ms/controllerblueprints/config:/opt/app/onap/config
- - ~/share/vm_ms/controllerblueprints/logs:/logs
environment:
APPLICATIONNAME: ControllerBluePrints
BUNDLEVERSION: 1.0.0
diff --git a/ms/controllerblueprints/distribution/src/main/docker/Dockerfile b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile
index 88577f5a..d3e10b76 100755
--- a/ms/controllerblueprints/distribution/src/main/docker/Dockerfile
+++ b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile
@@ -3,19 +3,16 @@ FROM anapsix/alpine-java:8_jdk
ENV HTTP_PROXY ${HTTP_PROXY}
ENV HTTPS_PROXY ${HTTPS_PROXY}
-RUN apk add --no-cache curl
-
+# add entrypoint
+COPY run.source /etc/run.source
COPY startService.sh /startService.sh
RUN chmod 777 /startService.sh && dos2unix /startService.sh
+# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
-
-RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
-&& (mv /source/@project.build.finalName@ /source/app) \
-&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
-&& (cp -rf /source/app/etc /) \
-&& (cp -rf /source/app/model-catalog /) \
-&& (cp -rf /source/app/config /) \
-&& (rm -rf /source)
+RUN tar -xzf /source.tar.gz -C /tmp \
+ && cp -rf /tmp/@project.build.finalName@/opt / \
+ && rm -rf /source.tar.gz \
+ && rm -rf /tmp/@project.build.finalName@
ENTRYPOINT /startService.sh \ No newline at end of file
diff --git a/ms/controllerblueprints/distribution/src/main/docker/distribution.xml b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml
index 1555b43e..74dc4400 100755
--- a/ms/controllerblueprints/distribution/src/main/docker/distribution.xml
+++ b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml
@@ -17,8 +17,8 @@
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<!-- create a tar.gz file containing the projects dependencies -->
<id>${assembly.id}</id>
<formats>
@@ -27,8 +27,6 @@
<dependencySets>
<dependencySet>
<outputDirectory>/opt/app/onap/lib</outputDirectory>
- <excludes>
- </excludes>
</dependencySet>
</dependencySets>
<fileSets>
@@ -36,38 +34,18 @@
<directory>${project.basedir}/../application/src/main/resources</directory>
<includes>
<include>application.properties</include>
+ <include>logback.xml</include>
</includes>
- <outputDirectory>./</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/src/main/docker</directory>
- <includes>
- <include>Dockerfile</include>
- <include>startService.sh</include>
- </includes>
- <outputDirectory>./</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/src/main/resources</directory>
- <outputDirectory>src/main/resources</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/etc</directory>
- <outputDirectory>./etc</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/opt/app/onap/config</directory>
- <outputDirectory>./config</outputDirectory>
+ <outputDirectory>/opt/app/onap/config</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../../components/model-catalog</directory>
- <outputDirectory>./model-catalog</outputDirectory>
+ <outputDirectory>/opt/app/onap/model-catalog</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
+ <excludes>
+ <exclude>${project.basedir}/../../../components/model-catalog/proto-definition</exclude>
+ </excludes>
</fileSet>
</fileSets>
</assembly>
diff --git a/ms/controllerblueprints/application/etc/run.source b/ms/controllerblueprints/distribution/src/main/docker/run.source
index 1d0ac070..1d0ac070 100755
--- a/ms/controllerblueprints/application/etc/run.source
+++ b/ms/controllerblueprints/distribution/src/main/docker/run.source
diff --git a/ms/controllerblueprints/distribution/src/main/docker/startService.sh b/ms/controllerblueprints/distribution/src/main/docker/startService.sh
index 84b2e5ac..7077c224 100755
--- a/ms/controllerblueprints/distribution/src/main/docker/startService.sh
+++ b/ms/controllerblueprints/distribution/src/main/docker/startService.sh
@@ -5,5 +5,4 @@ nodeName=ControllerBlueprints_1.0.0_$(cat /proc/self/cgroup | grep docker | sed
echo "APP Config HOME : ${APP_CONFIG_HOME}"
export APP_HOME=/opt/app/onap
-cp -rf /config /opt/app/onap/
source /etc/run.source
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
index fe7929e8..f6bde1cc 100755
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
@@ -37,22 +37,6 @@ class BluePrintArchiveUtils {
companion object {
private val log = LoggerFactory.getLogger(BluePrintArchiveUtils::class.java)
- fun getFileContent(fileName: String): String = runBlocking {
- async {
- try {
- File(fileName).readText(Charsets.UTF_8)
- } catch (e: Exception) {
- throw BluePrintException("couldn't find file($fileName)")
- }
- }.await()
- }
-
- fun compress(source: String, destination: String, absolute: Boolean): Boolean {
- val rootDir = File(source)
- val saveFile = File(destination)
- return compress(rootDir, saveFile, absolute)
- }
-
/**
* Create a new Zip from a root directory
*
@@ -63,11 +47,12 @@ class BluePrintArchiveUtils {
*/
fun compress(source: File, destination: File, absolute: Boolean): Boolean {
try {
+ destination.createNewFile()
ZipArchiveOutputStream(destination).use {
recurseFiles(source, source, it, absolute)
}
} catch (e: Exception) {
- log.error("Fail to compress folder(:$source) to path(${destination.path}", e)
+ log.error("Fail to compress folder($source) to path(${destination.path}", e)
return false
}
return true
@@ -100,7 +85,10 @@ class BluePrintArchiveUtils {
val zae = ZipArchiveEntry(filename)
zae.size = file.length()
zaos.putArchiveEntry(zae)
- FileInputStream(file).use { IOUtils.copy(it, zaos) }
+ FileInputStream(file).use {
+ IOUtils.copy(it, zaos)
+ it.close()
+ }
zaos.closeArchiveEntry()
}
}
@@ -132,16 +120,6 @@ class BluePrintArchiveUtils {
return destinationDir
}
-
- /**
- * Get the first item in directory
- *
- * @param zipFile
- * @return string
- */
- fun getFirstItemInDirectory(dir: File): String {
- return dir.walk().map { it.name }.elementAt(1)
- }
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt b/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt
index 3ba729d1..cfde86aa 100644
--- a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt
+++ b/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt
@@ -41,7 +41,7 @@ abstract class BlueprintCatalogServiceImpl(private val blueprintValidator: BlueP
if (blueprintFile.isDirectory) {
extractedDirectory = blueprintFile
- archivedDirectory = File(":$blueprintFile.zip")
+ archivedDirectory = File("$blueprintFile.zip")
toDeleteDirectory = archivedDirectory
if (!BluePrintArchiveUtils.compress(blueprintFile, archivedDirectory, true)) {
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/load/BluePrintCatalogLoadService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
index 4fd66ed5..948601cf 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
@@ -61,7 +61,7 @@ open class BluePrintCatalogLoadService(private val bluePrintCatalogService: Blue
try {
bluePrintCatalogService.saveToDatabase(file)
} catch (e: Exception) {
- errorBuilder.appendln("Couldn't load DataType(${file.name}: ${e.message}")
+ errorBuilder.appendln("Couldn't load BlueprintModel(${file.name}: ${e.message}")
}
}