aboutsummaryrefslogtreecommitdiffstats
path: root/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2020-05-06 01:14:00 +0100
committerefiacor <fiachra.corcoran@est.tech>2020-05-12 13:37:28 +0100
commit125390ba301915c0829ad4c0b7eff0c935b6956c (patch)
treec49de4f058ebb4ce93fe90b72816246db7c938e4 /plans/usecases/pnf-sw-upgrade/so/simulator/package/docker
parent9c41697bdcef2eddd9af6436f3feb5821c238b44 (diff)
Seperating usecase test suite dependencies
# Refactoring BulkPM Dataplane test suite Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I4b2ad0dc5147e10ffc55f4ec210a29f073cd865b Issue-ID: INT-832 Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Diffstat (limited to 'plans/usecases/pnf-sw-upgrade/so/simulator/package/docker')
-rwxr-xr-xplans/usecases/pnf-sw-upgrade/so/simulator/package/docker/pom.xml95
-rwxr-xr-xplans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image34
-rwxr-xr-xplans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.workaround-job-container27
-rwxr-xr-xplans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml46
-rwxr-xr-xplans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/scripts/start-app.sh69
5 files changed, 0 insertions, 271 deletions
diff --git a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/pom.xml b/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/pom.xml
deleted file mode 100755
index b3d617d9..00000000
--- a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<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">
- <parent>
- <artifactId>package</artifactId>
- <groupId>org.onap.so.simulators</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>docker</artifactId>
- <packaging>pom</packaging>
- <name>${project.artifactId}</name>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.28.0</version>
- <configuration>
- <verbose>true</verbose>
- <apiVersion>1.23</apiVersion>
- <pullRegistry>${docker.pull.registry}</pullRegistry>
- <pushRegistry>${docker.push.registry}</pushRegistry>
- <images>
- <image>
- <name>jobs/workaround-job-container</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>docker-files</dockerFileDir>
- <dockerFile>Dockerfile.workaround-job-container</dockerFile>
- </build>
- </image>
- <image>
- <name>simulators/aai-simulator</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>docker-files</dockerFileDir>
- <dockerFile>Dockerfile.so-simulator-base-image</dockerFile>
- <tags>
- <tag>${project.version}</tag>
- </tags>
- <assembly>
- <inline>
- <dependencySets>
- <dependencySet>
- <includes>
- <include>${project.parent.groupId}:aai-simulator</include>
- </includes>
- <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>generate-sources</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>aai-simulator</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image b/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image
deleted file mode 100755
index efd7833f..00000000
--- a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image
+++ /dev/null
@@ -1,34 +0,0 @@
-FROM docker.io/openjdk:8-jdk-alpine
-
-ARG http_proxy
-ARG https_proxy
-ENV HTTP_PROXY=$http_proxy
-ENV HTTPS_PROXY=$https_proxy
-ENV http_proxy=$HTTP_PROXY
-ENV https_proxy=$HTTPS_PROXY
-
-# Update the package list and upgrade installed packages
-RUN apk update && apk upgrade
-
-# Install commonly needed tools
-RUN apk --no-cache add curl netcat-openbsd sudo nss
-
-# Create 'so' user
-RUN addgroup -g 1000 so && adduser -S -u 1000 -G so -s /bin/sh so
-
-RUN mkdir /app && mkdir /app/config && mkdir /app/logs && mkdir /app/ca-certificates
-
-COPY maven/app.jar /app
-COPY configs/logging/logback-spring.xml /app
-COPY scripts/start-app.sh /app
-
-RUN chown -R so:so /app && chmod 700 /app/*.sh
-
-# Springboot configuration (required)
-VOLUME /app/config
-
-# CA certificates
-VOLUME /app/ca-certificates
-
-WORKDIR /app
-CMD ["/app/start-app.sh"]
diff --git a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.workaround-job-container b/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.workaround-job-container
deleted file mode 100755
index faf8492c..00000000
--- a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/Dockerfile.workaround-job-container
+++ /dev/null
@@ -1,27 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# 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.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-#
-
-# @author Waqas Ikram (waqas.ikram@est.tech)
-
-FROM docker.io/alpine
-
-# Install packages
-RUN apk update && apk upgrade && apk add mysql-client && apk add bash
-
-RUN apk --no-cache add curl netcat-openbsd sudo nss
diff --git a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml b/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
deleted file mode 100755
index 13c91879..00000000
--- a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-
- <property name="LOGS" value="./logs" />
-
- <appender name="Console"
- class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
- %black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
- </Pattern>
- </layout>
- </appender>
-
- <appender name="RollingFile"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logs_dir:-.}/spring-boot-logger.log</file>
- <encoder
- class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
- <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
- </encoder>
-
- <rollingPolicy
- class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- rollover daily and when the file reaches 10 MegaBytes -->
- <fileNamePattern>${logs_dir:-.}/archived/spring-boot-logger-%d{yyyy-MM-dd}.%i.log
- </fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>10MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- </rollingPolicy>
- </appender>
-
- <!-- LOG everything at INFO level -->
- <root level="info">
- <appender-ref ref="RollingFile" />
- <appender-ref ref="Console" />
- </root>
-
- <logger name="org.onap" level="trace" additivity="false">
- <appender-ref ref="RollingFile" />
- <appender-ref ref="Console" />
- </logger>
-
-</configuration>
diff --git a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/scripts/start-app.sh b/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/scripts/start-app.sh
deleted file mode 100755
index eb8ee2e5..00000000
--- a/plans/usecases/pnf-sw-upgrade/so/simulator/package/docker/src/main/docker/docker-files/scripts/start-app.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# 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.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# @author Waqas Ikram (waqas.ikram@est.tech)
-
-touch /app/app.jar
-
-if [ "$(ls -1 /app/ca-certificates)" ]; then
- needUpdate=FALSE
- for certificate in `ls -1 /app/ca-certificates`; do
- echo "Installing $certificate in /usr/local/share/ca-certificates"
- cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
- needUpdate=TRUE
- done
- if [ $needUpdate = TRUE ]; then
- echo "Updating ca-certificates . . ."
- update-ca-certificates --fresh
- fi
-fi
-
-if [ -z "$APP" ]; then
- echo "CONFIG ERROR: APP environment variable not set"
- exit 1
-fi
-
-echo "Starting $APP simulator ... "
-
-if [ -z "${CONFIG_PATH}" ]; then
- export CONFIG_PATH=/app/config/override.yaml
-fi
-
-if [ -z "${LOG_PATH}" ]; then
- export LOG_PATH="logs/${APP}"
-fi
-
-if [ "${SSL_DEBUG}" = "log" ]; then
- export SSL_DEBUG="-Djavax.net.debug=all"
-else
- export SSL_DEBUG=
-fi
-
-
-jvmargs="${JVM_ARGS} -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
-
-echo "JVM Arguments: ${jvmargs}"
-
-java ${jvmargs} -jar app.jar
-rc=$?
-
-echo "Application exiting with status code $rc"
-
-exit $rc