diff options
Diffstat (limited to 'ms/sdclistener/distribution/src')
4 files changed, 104 insertions, 0 deletions
diff --git a/ms/sdclistener/distribution/src/main/dc/docker-compose.yaml b/ms/sdclistener/distribution/src/main/dc/docker-compose.yaml new file mode 100755 index 000000000..1c68f6cf3 --- /dev/null +++ b/ms/sdclistener/distribution/src/main/dc/docker-compose.yaml @@ -0,0 +1,29 @@ +version: '3.3' + +services: + cds-sdc-listener: + image: onap/ccsdk-sdclistener:latest + container_name: cdssdclistener + restart: always + environment: + asdcAddress: localhost:8443 + messageBusAddress: localhost + sdcusername: vid + password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + pollingInterval: 15 + pollingTimeout: 15 + relevantArtifactTypes: TOSCA_CSAR + consumerGroup: cds-id-local + environmentName: AUTO + consumerId: cds-id-local + keyStorePassword: + keyStorePath: + activateServerTLSAuth: "false" + isUseHttpsWithDmaap: "false" + archivePath: /opt/app/onap/cds-sdc-listener/ + grpcAddress: localhost + grpcPort: 9111 + authHeader: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== + #port needed by Liveness probe + healthcheckPort: "9000" + sprintWebListenerEnabled: "true" diff --git a/ms/sdclistener/distribution/src/main/docker/Dockerfile b/ms/sdclistener/distribution/src/main/docker/Dockerfile new file mode 100755 index 000000000..e945188a8 --- /dev/null +++ b/ms/sdclistener/distribution/src/main/docker/Dockerfile @@ -0,0 +1,16 @@ +FROM openjdk:8-jdk-alpine + +ENV HTTP_PROXY ${HTTP_PROXY} +ENV HTTPS_PROXY ${HTTPS_PROXY} + +# add entrypoint +COPY startService.sh /startService.sh +RUN chmod 751 /startService.sh +# add application +COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz +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 diff --git a/ms/sdclistener/distribution/src/main/docker/distribution.xml b/ms/sdclistener/distribution/src/main/docker/distribution.xml new file mode 100755 index 000000000..e9e8eefa5 --- /dev/null +++ b/ms/sdclistener/distribution/src/main/docker/distribution.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Copyright © 2018-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. + --> + +<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"> + <!-- create a tar.gz file containing the projects dependencies --> + <id>${assembly.id}</id> + <formats> + <format>tar.gz</format> + </formats> + <dependencySets> + <dependencySet> + <outputDirectory>/opt/app/onap/lib</outputDirectory> + <outputFileNameMapping>${artifact.groupId}-${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping> + <excludes> + <exclude>org.slf4j:slf4j-simple</exclude> + </excludes> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.basedir}/../application/src/main/resources</directory> + <includes> + <include>application.properties</include> + <include>application.yml</include> + <include>logback.xml</include> + </includes> + <outputDirectory>/opt/app/onap/config</outputDirectory> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/ms/sdclistener/distribution/src/main/docker/startService.sh b/ms/sdclistener/distribution/src/main/docker/startService.sh new file mode 100644 index 000000000..7ad6171b8 --- /dev/null +++ b/ms/sdclistener/distribution/src/main/docker/startService.sh @@ -0,0 +1,12 @@ +#!/bin/sh +echo "Starting SDC Listener" + +export APP_HOME=/opt/app/onap +export APP_CONFIG_HOME=${APP_HOME}/config +echo "APP Config HOME : ${APP_CONFIG_HOME}" + +java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \ +-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \ +-Djava.security.egd=file:/dev/./urandom \ +-Dspring.config.location=${APP_CONFIG_HOME}/ \ +org.onap.ccsdk.cds.sdclistener.SdcListenerApplication |