mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-01-08 21:21:28 +00:00
TW-343, TW-339: Creating docker images for Provisioning Service and SSC Service
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>portal-process-docker</artifactId>
|
||||
<artifactId>portal-docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>portal-process-docker</name>
|
||||
<name>portal-docker</name>
|
||||
<description>Docker definition for process definition for portal.</description>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -8,13 +8,18 @@
|
||||
<!-- http://www.qos.ch/shop/products/professionalSupport -->
|
||||
<!-- -->
|
||||
<configuration>
|
||||
<conversionRule conversionWord="filteredStack"
|
||||
converterClass="com.telecominfraproject.wlan.server.exceptions.logback.ExceptionCompressingConverter" />
|
||||
|
||||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-DD HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<pattern>%d{yyyy-MM-DD HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%filteredStack%nopex</pattern>
|
||||
<!-- See http://logback.qos.ch/manual/layouts.html for details -->
|
||||
<!-- %ex{5} - add at the end to display only 5 levels of the exception stack trace -->
|
||||
<!-- %nopex - add at the end to not display any of the exception stack traces -->
|
||||
<!-- %ex{full} - add at the end to display all the levels of the exception stack trace -->
|
||||
</encoder>
|
||||
<!--
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>myApp.log</file>
|
||||
|
||||
@@ -23,7 +28,8 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
-->
|
||||
|
||||
|
||||
</appender>
|
||||
<appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>/app/logs/portalservice.log</file>
|
||||
<append>true</append>
|
||||
@@ -39,35 +45,30 @@
|
||||
<maxFileSize>20MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
details: http://logback.qos.ch/manual/configuration.html#auto_configuration
|
||||
|
||||
runtime configuration, if need to override the defaults:
|
||||
-Dlogback.configurationFile=/path/to/logback.xml
|
||||
|
||||
for log configuration debugging - use
|
||||
|
||||
runtime configuration, if need to override the defaults:
|
||||
-Dlogging.config=file:///home/ec2-user/opensync/logback.xml
|
||||
|
||||
for log configuration debugging - use
|
||||
-Dlogback.statusListenerClass=ch.qos.logback.core.status.OnConsoleStatusListener
|
||||
|
||||
|
||||
log levels:
|
||||
OFF ERROR WARN INFO DEBUG TRACE
|
||||
OFF ERROR WARN INFO DEBUG TRACE
|
||||
-->
|
||||
<logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
|
||||
<logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" level="INFO"/>
|
||||
<logger name="org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer" level="INFO"/>
|
||||
|
||||
<logger name="com.telecominfraproject.wlan" level="DEBUG"/>
|
||||
<logger name="ai.connectus" level="DEBUG"/>
|
||||
<logger name="com.netflix.servo.tag.aws.AwsInjectableTag" level="OFF"/>
|
||||
<logger name="com.vmware.ovsdb.service.OvsdbConnectionInfo" level="OFF"/>
|
||||
<logger name="com.vmware.ovsdb.netty.OvsdbConnectionHandler" level="ERROR"/>
|
||||
|
||||
<!--
|
||||
<logger name="org.springframework.security.web.authentication.preauth" level="DEBUG"/>
|
||||
-->
|
||||
|
||||
<logger name="com.telecominfraproject" level="INFO"/>
|
||||
<logger name="com.telecominfraproject.wlan" level="DEBUG"/>
|
||||
<logger name="com.telecominfraproject.wlan.core.server.webconfig.WebGenericConverter" level="OFF"/>
|
||||
|
||||
<root level="WARN">
|
||||
<!-- <appender-ref ref="stdout"/>-->
|
||||
<!-- <appender-ref ref="stdout"/>-->
|
||||
<appender-ref ref="logfile"/>
|
||||
</root>
|
||||
|
||||
|
||||
94
prov-docker/pom.xml
Normal file
94
prov-docker/pom.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>prov-docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>prov-docker</name>
|
||||
<description>Docker definition for process definition for provisioning service.</description>
|
||||
|
||||
<properties>
|
||||
<docker.fabric.version>0.28.0</docker.fabric.version>
|
||||
<docker.push.registry>tip-tip-wlan-cloud-docker-repo.jfrog.io</docker.push.registry>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>prov-process</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.fabric.version}</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<apiVersion>1.23</apiVersion>
|
||||
<images>
|
||||
<image>
|
||||
<name>wlan-prov-service:${project.version}</name>
|
||||
<build>
|
||||
<filter>@</filter>
|
||||
<cleanup>try</cleanup>
|
||||
<dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
|
||||
<dockerFile>Dockerfile</dockerFile>
|
||||
<assembly>
|
||||
<inline>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<includes>
|
||||
<include>com.telecominfraproject.wlan:prov-process:jar</include>
|
||||
</includes>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputFileNameMapping>app.jar</outputFileNameMapping>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
</inline>
|
||||
</assembly>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-images</id>
|
||||
<phase>pre-clean</phase>
|
||||
<goals>
|
||||
<goal>remove</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<removeAll>true</removeAll>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-images</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>push-images</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
15
prov-docker/src/main/docker/Dockerfile
Normal file
15
prov-docker/src/main/docker/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM adoptopenjdk/openjdk13:alpine-jre
|
||||
MAINTAINER ConnectUs
|
||||
|
||||
# Update the package list and upgrade installed packages
|
||||
RUN apk update && apk upgrade && apk add bash
|
||||
RUN mkdir /app && mkdir /app/logs && mkdir /app/prov
|
||||
|
||||
COPY maven/app.jar /app
|
||||
COPY app/run.sh /app
|
||||
COPY app/logback.xml /app/prov/logback.xml
|
||||
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/app/run.sh"]
|
||||
75
prov-docker/src/main/docker/app/logback.xml
Normal file
75
prov-docker/src/main/docker/app/logback.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- For assistance related to logback-translator or configuration -->
|
||||
<!-- files in general, please contact the logback user mailing list -->
|
||||
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
|
||||
<!-- -->
|
||||
<!-- For professional support please see -->
|
||||
<!-- http://www.qos.ch/shop/products/professionalSupport -->
|
||||
<!-- -->
|
||||
<configuration>
|
||||
<conversionRule conversionWord="filteredStack"
|
||||
converterClass="com.telecominfraproject.wlan.server.exceptions.logback.ExceptionCompressingConverter" />
|
||||
|
||||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-DD HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%filteredStack%nopex</pattern>
|
||||
<!-- See http://logback.qos.ch/manual/layouts.html for details -->
|
||||
<!-- %ex{5} - add at the end to display only 5 levels of the exception stack trace -->
|
||||
<!-- %nopex - add at the end to not display any of the exception stack traces -->
|
||||
<!-- %ex{full} - add at the end to display all the levels of the exception stack trace -->
|
||||
</encoder>
|
||||
<!--
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>myApp.log</file>
|
||||
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
-->
|
||||
|
||||
</appender>
|
||||
<appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>/app/logs/provservice.log</file>
|
||||
<append>true</append>
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{36} [%file:%line] %msg%n</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>/app/logs/provservice.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>3</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>20MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--
|
||||
details: http://logback.qos.ch/manual/configuration.html#auto_configuration
|
||||
|
||||
runtime configuration, if need to override the defaults:
|
||||
-Dlogging.config=file:///home/ec2-user/opensync/logback.xml
|
||||
|
||||
for log configuration debugging - use
|
||||
-Dlogback.statusListenerClass=ch.qos.logback.core.status.OnConsoleStatusListener
|
||||
|
||||
log levels:
|
||||
OFF ERROR WARN INFO DEBUG TRACE
|
||||
-->
|
||||
<logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
|
||||
<logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" level="INFO"/>
|
||||
<logger name="org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer" level="INFO"/>
|
||||
|
||||
<logger name="com.telecominfraproject" level="INFO"/>
|
||||
<logger name="com.telecominfraproject.wlan" level="DEBUG"/>
|
||||
<logger name="com.telecominfraproject.wlan.core.server.webconfig.WebGenericConverter" level="OFF"/>
|
||||
|
||||
<root level="WARN">
|
||||
<!-- <appender-ref ref="stdout"/>-->
|
||||
<appender-ref ref="logfile"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
7
prov-docker/src/main/docker/app/run.sh
Normal file
7
prov-docker/src/main/docker/app/run.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOGGING_PROPS=" -Dlogging.config=file:/app/prov/logback.xml"
|
||||
|
||||
export ALL_PROPS="$LOGGING_PROPS"
|
||||
|
||||
java $ALL_PROPS -jar app.jar
|
||||
94
ssc-docker/pom.xml
Normal file
94
ssc-docker/pom.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>ssc-docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>ssc-docker</name>
|
||||
<description>Docker definition for process definition of Scalable Service container.</description>
|
||||
|
||||
<properties>
|
||||
<docker.fabric.version>0.28.0</docker.fabric.version>
|
||||
<docker.push.registry>tip-tip-wlan-cloud-docker-repo.jfrog.io</docker.push.registry>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>ssc-process</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.fabric.version}</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<apiVersion>1.23</apiVersion>
|
||||
<images>
|
||||
<image>
|
||||
<name>wlan-ssc-service:${project.version}</name>
|
||||
<build>
|
||||
<filter>@</filter>
|
||||
<cleanup>try</cleanup>
|
||||
<dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
|
||||
<dockerFile>Dockerfile</dockerFile>
|
||||
<assembly>
|
||||
<inline>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<includes>
|
||||
<include>com.telecominfraproject.wlan:ssc-process:jar</include>
|
||||
</includes>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputFileNameMapping>app.jar</outputFileNameMapping>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
</inline>
|
||||
</assembly>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-images</id>
|
||||
<phase>pre-clean</phase>
|
||||
<goals>
|
||||
<goal>remove</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<removeAll>true</removeAll>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-images</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>push-images</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
15
ssc-docker/src/main/docker/Dockerfile
Normal file
15
ssc-docker/src/main/docker/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM adoptopenjdk/openjdk13:alpine-jre
|
||||
MAINTAINER ConnectUs
|
||||
|
||||
# Update the package list and upgrade installed packages
|
||||
RUN apk update && apk upgrade && apk add bash
|
||||
RUN mkdir /app && mkdir /app/logs && mkdir /app/prov
|
||||
|
||||
COPY maven/app.jar /app
|
||||
COPY app/run.sh /app
|
||||
COPY app/logback.xml /app/prov/logback.xml
|
||||
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/app/run.sh"]
|
||||
75
ssc-docker/src/main/docker/app/logback.xml
Normal file
75
ssc-docker/src/main/docker/app/logback.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- For assistance related to logback-translator or configuration -->
|
||||
<!-- files in general, please contact the logback user mailing list -->
|
||||
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
|
||||
<!-- -->
|
||||
<!-- For professional support please see -->
|
||||
<!-- http://www.qos.ch/shop/products/professionalSupport -->
|
||||
<!-- -->
|
||||
<configuration>
|
||||
<conversionRule conversionWord="filteredStack"
|
||||
converterClass="com.telecominfraproject.wlan.server.exceptions.logback.ExceptionCompressingConverter" />
|
||||
|
||||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-DD HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%filteredStack%nopex</pattern>
|
||||
<!-- See http://logback.qos.ch/manual/layouts.html for details -->
|
||||
<!-- %ex{5} - add at the end to display only 5 levels of the exception stack trace -->
|
||||
<!-- %nopex - add at the end to not display any of the exception stack traces -->
|
||||
<!-- %ex{full} - add at the end to display all the levels of the exception stack trace -->
|
||||
</encoder>
|
||||
<!--
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>myApp.log</file>
|
||||
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
-->
|
||||
|
||||
</appender>
|
||||
<appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>/app/logs/sscservice.log</file>
|
||||
<append>true</append>
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{36} [%file:%line] %msg%n</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>/app/logs/sscservice.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>3</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>20MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--
|
||||
details: http://logback.qos.ch/manual/configuration.html#auto_configuration
|
||||
|
||||
runtime configuration, if need to override the defaults:
|
||||
-Dlogging.config=file:///home/ec2-user/opensync/logback.xml
|
||||
|
||||
for log configuration debugging - use
|
||||
-Dlogback.statusListenerClass=ch.qos.logback.core.status.OnConsoleStatusListener
|
||||
|
||||
log levels:
|
||||
OFF ERROR WARN INFO DEBUG TRACE
|
||||
-->
|
||||
<logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
|
||||
<logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" level="INFO"/>
|
||||
<logger name="org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer" level="INFO"/>
|
||||
|
||||
<logger name="com.telecominfraproject" level="INFO"/>
|
||||
<logger name="com.telecominfraproject.wlan" level="DEBUG"/>
|
||||
<logger name="com.telecominfraproject.wlan.core.server.webconfig.WebGenericConverter" level="OFF"/>
|
||||
|
||||
<root level="WARN">
|
||||
<!-- <appender-ref ref="stdout"/>-->
|
||||
<appender-ref ref="logfile"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
7
ssc-docker/src/main/docker/app/run.sh
Normal file
7
ssc-docker/src/main/docker/app/run.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOGGING_PROPS=" -Dlogging.config=file:/app/prov/logback.xml"
|
||||
|
||||
export ALL_PROPS="$LOGGING_PROPS"
|
||||
|
||||
java $ALL_PROPS -jar app.jar
|
||||
Reference in New Issue
Block a user