diff options
-rw-r--r-- | odlsli/odlsli-alpine/pom.xml | 112 | ||||
-rw-r--r-- | odlsli/src/main/resources/org.ops4j.pax.logging.cfg | 2 | ||||
-rw-r--r-- | odlsli/src/main/scripts/installSdncDb.sh | 6 | ||||
-rw-r--r-- | odlsli/src/main/scripts/startODL.sh | 4 |
4 files changed, 115 insertions, 9 deletions
diff --git a/odlsli/odlsli-alpine/pom.xml b/odlsli/odlsli-alpine/pom.xml index a9d0629e..86b92eb1 100644 --- a/odlsli/odlsli-alpine/pom.xml +++ b/odlsli/odlsli-alpine/pom.xml @@ -44,6 +44,7 @@ <ccsdk.sli.northbound.version>1.1.0-SNAPSHOT</ccsdk.sli.northbound.version> <ccsdk.sli.plugins.version>1.1.0-SNAPSHOT</ccsdk.sli.plugins.version> <ccsdk.oran.a1adapter.version>1.1.0-SNAPSHOT</ccsdk.oran.a1adapter.version> + <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks> </properties> <dependencies> @@ -549,8 +550,21 @@ </execution> </executions> </plugin> - - + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + <configuration> + <skipITs>true</skipITs> + </configuration> + </plugin> </plugins> </build> @@ -560,6 +574,24 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + <configuration> + <skipITs>false</skipITs> + <environmentVariables> + <ODLSLI_PORT>${odlsli.port}</ODLSLI_PORT> + </environmentVariables> + </configuration> + </plugin> + <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.28.0</version> @@ -589,7 +621,81 @@ <goal>build</goal> </goals> </execution> - + <execution> + <id>start-it-instance</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + <configuration> + <images> + <image> + <name>mariadb:10.5</name> + <alias>odlsli-db</alias> + <run> + <env> + <MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD> + <MYSQL_USER>sdnctl</MYSQL_USER> + <MYSQL_PASSWORD>gamma</MYSQL_PASSWORD> + <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE> + </env> + <network> + <mode>custom</mode> + <name>onap</name> + <alias>dbhost</alias> + <alias>sdnctldb01</alias> + <alias>sdnctldb02</alias> + </network> + <ports> + <port>odlslidb.port:3306</port> + </ports> + <log> + <enabled>true</enabled> + </log> + </run> + </image> + <image> + <name>${image.name}:${project.docker.latesttagtimestamp.version}</name> + <alias>odlsli-container</alias> + <run> + <env> + <MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD> + <MYSQL_USER>sdnctl</MYSQL_USER> + <MYSQL_PASSWORD>gamma</MYSQL_PASSWORD> + <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE> + <SDNC_CONFIG_DIR>/opt/onap/ccsdk/data/properties</SDNC_CONFIG_DIR> + <KARAF_CONSOLE_LOG_LEVEL>INFO</KARAF_CONSOLE_LOG_LEVEL> + </env> + <dependsOn> + <container>odlsli-db</container> + </dependsOn> + <network> + <mode>custom</mode> + <name>onap</name> + <alias>odlsli</alias> + </network>> + <ports> + <port>odlsli.port:8181</port> + </ports> + <wait> + <log>all warp coils are now operating at peak efficiency</log> + <time>120000</time> + </wait> + <log> + <enabled>true</enabled> + </log> + </run> + </image> + </images> + </configuration> + </execution> + <execution> + <id>stop-it-instance</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> <execution> <id>push-images</id> <phase>${docker.push.phase}</phase> diff --git a/odlsli/src/main/resources/org.ops4j.pax.logging.cfg b/odlsli/src/main/resources/org.ops4j.pax.logging.cfg index ee35ef70..7e3aead5 100644 --- a/odlsli/src/main/resources/org.ops4j.pax.logging.cfg +++ b/odlsli/src/main/resources/org.ops4j.pax.logging.cfg @@ -29,7 +29,7 @@ log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi log4j2.rootLogger.appenderRef.Console.ref = Console log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter -log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} +log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${env:KARAF_CONSOLE_LOG_LEVEL\:-OFF} # Loggers configuration diff --git a/odlsli/src/main/scripts/installSdncDb.sh b/odlsli/src/main/scripts/installSdncDb.sh index efd7fe02..fb97b073 100644 --- a/odlsli/src/main/scripts/installSdncDb.sh +++ b/odlsli/src/main/scripts/installSdncDb.sh @@ -22,7 +22,7 @@ ### CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} -MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0} +MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0} SDNC_DB_USER=${SDNC_DB_USER:-sdnctl} SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma} @@ -30,7 +30,7 @@ SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl} # Create tablespace and user account -mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql <<-END +mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END CREATE DATABASE ${SDNC_DB_DATABASE}; CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWD}'; CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWD}'; @@ -41,5 +41,5 @@ END if [ -f ${CCSDK_HOME}/data/odlsli.dump ] then -mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < ${CCSDK_HOME}/data/odlsli.dump +mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWD} sdnctl < ${CCSDK_HOME}/data/odlsli.dump fi diff --git a/odlsli/src/main/scripts/startODL.sh b/odlsli/src/main/scripts/startODL.sh index 4d608577..310acfd7 100644 --- a/odlsli/src/main/scripts/startODL.sh +++ b/odlsli/src/main/scripts/startODL.sh @@ -28,7 +28,7 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} SLEEP_TIME=${SLEEP_TIME:-120} -MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0} +MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0} INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim} @@ -36,7 +36,7 @@ INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim} # Wait for database # echo "Waiting for mysql" -until mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql &> /dev/null +until mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWORD} mysql &> /dev/null do printf "." sleep 1 |