summaryrefslogtreecommitdiffstats
path: root/ms/cds-sdc-listener/application/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'ms/cds-sdc-listener/application/src/main')
-rw-r--r--ms/cds-sdc-listener/application/src/main/docker/Dockerfile13
-rw-r--r--ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml29
-rwxr-xr-xms/cds-sdc-listener/application/src/main/docker/start.sh6
-rw-r--r--ms/cds-sdc-listener/application/src/main/resources/application.yml46
-rw-r--r--ms/cds-sdc-listener/application/src/main/resources/logback.xml33
5 files changed, 104 insertions, 23 deletions
diff --git a/ms/cds-sdc-listener/application/src/main/docker/Dockerfile b/ms/cds-sdc-listener/application/src/main/docker/Dockerfile
new file mode 100644
index 000000000..062f65767
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/main/docker/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:8-jdk-alpine
+
+ENV HTTP_PROXY ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+
+RUN mkdir -p /opt/app/onap/ /opt/app/onap/config
+WORKDIR /opt/app/onap/
+COPY start.sh /opt/app/onap/
+COPY application.yml /opt/app/onap/config
+RUN chmod 751 /opt/app/onap/start.sh
+COPY cds-sdc-listener-application-0.4.2-SNAPSHOT.jar /opt/app/onap/cds-sdc-listener-distribution.jar
+EXPOSE 9000
+ENTRYPOINT /opt/app/onap/start.sh
diff --git a/ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml b/ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml
new file mode 100644
index 000000000..1e7384744
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml
@@ -0,0 +1,29 @@
+version: '3.3'
+
+services:
+ cds-sdc-listener:
+ image: onap/cdssdclistener: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/cds-sdc-listener/application/src/main/docker/start.sh b/ms/cds-sdc-listener/application/src/main/docker/start.sh
new file mode 100755
index 000000000..f24d15618
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/main/docker/start.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+extraArgs=$@
+java -jar /opt/app/onap/cds-sdc-listener-distribution.jar \
+-Dspring.config=/opt/app/onap/config/application.yml \
+-Djava.security.egd=file:/dev/./urandom \
+${extraArgs}
diff --git a/ms/cds-sdc-listener/application/src/main/resources/application.yml b/ms/cds-sdc-listener/application/src/main/resources/application.yml
index 0c2c60dca..b3f8443eb 100644
--- a/ms/cds-sdc-listener/application/src/main/resources/application.yml
+++ b/ms/cds-sdc-listener/application/src/main/resources/application.yml
@@ -1,27 +1,27 @@
listenerservice:
- config:
- asdcAddress: localhost:8443
- messageBusAddress: localhost
- user: vid
- password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- pollingInterval: 15
- pollingTimeout: 60
- 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==
+ config:
+ asdcAddress: ${asdcAddress:localhost:8443}
+ messageBusAddress: ${messageBusAddress:localhost}
+ user: ${sdcusername:vid}
+ password: ${password:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+ pollingInterval: ${pollingInterval:15}
+ pollingTimeout: ${pollingTimeout:60}
+ relevantArtifactTypes: ${relevantArtifactTypes:TOSCA_CSAR}
+ consumerGroup: ${consumerGroup:cds-id-local}
+ environmentName: ${environmentName:AUTO}
+ consumerId: ${consumerId:cds-id-local}
+ keyStorePassword: ${keyStorePassword}
+ keyStorePath: ${keyStorePath}
+ activateServerTLSAuth : ${activateServerTLSAuth:false}
+ isUseHttpsWithDmaap: ${isUseHttpsWithDmaap:false}
+ archivePath: ${archivePath:/opt/app/onap/cds-sdc-listener/}
+ grpcAddress: ${grpcAddress:localhost}
+ grpcPort: ${grpcPort:9111}
+ authHeader: ${authHeader:Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==}
#port needed by Liveness probe
server:
- port: 9000
+ port: ${healthcheckPort:9000}
#set spring.main.web-environment=false if you want to NOT to open a port for healthcheck.
-#spring:
-# main:
-# web-environment: false \ No newline at end of file
+spring:
+ main:
+ web-environment: ${sprintWebListenerEnabled:true}
diff --git a/ms/cds-sdc-listener/application/src/main/resources/logback.xml b/ms/cds-sdc-listener/application/src/main/resources/logback.xml
new file mode 100644
index 000000000..b26cbcbe4
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/main/resources/logback.xml
@@ -0,0 +1,33 @@
+<!--
+Copyright (C) 2019 Bell Canada
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software 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">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+ <logger name="org.springframework" level="info"/>
+ <logger name="org.springframework.web" level="info"/>
+ <logger name="org.onap.ccsdk.cds" level="info"/>
+
+</configuration>