summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-09 18:33:55 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-12 13:02:59 -0500
commit45b260c81451f74bfd763186d5ff42e777077d2b (patch)
treefa0fc9649d6f30e1226ad065272b93f2e25602b1
parent6cd702b68bb4e0a479dcaf27b5d75a65982f6fe5 (diff)
Multiple fixes & enhancement
- Rework docker image build - Fix compress function - Fix node type name for source-primary-db Change-Id: Ide38e17036e76047d9f850b714ba0da4add5cd9d Issue-ID: CCSDK-414 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
-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
9 files changed, 49 insertions, 193 deletions
diff --git a/ms/blueprintsprocessor/application/etc/logback.xml b/ms/blueprintsprocessor/application/etc/logback.xml
deleted file mode 100755
index a97bb8c3d..000000000
--- 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 37a570821..e69de29bb 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 a97bb8c3d..000000000
--- 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 a7ffc42ba..d48aba502 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 c0eade509..1e1974427 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 bd6bcb3f4..d3e10b76d 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 f84ed2dc1..3137eb493 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 7557ab126..7557ab126 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 5f75de8ab..88497156f 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