summaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-11-19 10:09:21 -0500
committerDan Timoney <dtimoney@att.com>2020-11-19 10:09:27 -0500
commit6993520f6d1ad135999d43cb717c37e6dedc4a28 (patch)
tree43e028238307661ee7c8e6d0a8fd55fb067a0335 /installation
parentfd4ef91177bb087ea31e60d7f4247e5a4f6c820b (diff)
Update installation to handle case /etc/ssl/certs not found
Updated ca cert installation to handle case correctly where /etc/ssl/certs directory is not found. Alsp, added integration testing of standalone sdnc container. Change-Id: Iabb3b6f921f52e533f1a920c3afa68a024788667 Issue-ID: SDNC-1419 Signed-off-by: Dan Timoney <dtimoney@att.com> Former-commit-id: 3ee44123de572df9ff2990ef2aedc0891b658285
Diffstat (limited to 'installation')
-rw-r--r--installation/sdnc/pom.xml96
-rwxr-xr-xinstallation/sdnc/src/main/docker/Dockerfile5
-rwxr-xr-xinstallation/sdnc/src/main/docker/standalone.Dockerfile5
3 files changed, 99 insertions, 7 deletions
diff --git a/installation/sdnc/pom.xml b/installation/sdnc/pom.xml
index a0c42a44..ae7c9dda 100644
--- a/installation/sdnc/pom.xml
+++ b/installation/sdnc/pom.xml
@@ -31,7 +31,8 @@
<sdnc.secureport>8443</sdnc.secureport>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
<docker.push.phase>deploy</docker.push.phase>
- <docker.verbose>true</docker.verbose>
+ <docker.verbose>true</docker.verbose>
+ <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
</properties>
@@ -117,6 +118,81 @@
</configuration>
</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>sdnc-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>sdnc</name>
+ <alias>dbhost</alias>
+ <alias>sdnctldb01</alias>
+ <alias>sdnctldb02</alias>
+ </network>
+ <ports>
+ <port>sdncdb.port:3306</port>
+ </ports>
+ <log>
+ <enabled>true</enabled>
+ </log>
+ </run>
+ </image>
+ <image>
+ <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
+ <alias>sdnc-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/sdnc/data/properties</SDNC_CONFIG_DIR>
+ <KARAF_CONSOLE_LOG_LEVEL>INFO</KARAF_CONSOLE_LOG_LEVEL>
+ </env>
+ <dependsOn>
+ <container>sdnc-db</container>
+ </dependsOn>
+ <network>
+ <mode>custom</mode>
+ <name>sdnc</name>
+ <alias>sdnc</alias>
+ </network>>
+ <ports>
+ <port>sdnc.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>
<goals>
@@ -401,6 +477,24 @@
</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>false</skipITs>
+ <environmentVariables>
+ <SDNC_PORT>${sdnc.port}</SDNC_PORT>
+ </environmentVariables>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile
index a4768ba5..4ff33ace 100755
--- a/installation/sdnc/src/main/docker/Dockerfile
+++ b/installation/sdnc/src/main/docker/Dockerfile
@@ -46,10 +46,9 @@ COPY aaa-app-config.xml $ODL_HOME/etc/opendaylight/datastore/initial/config/
RUN echo "cadi_prop_files=$SDNC_CONFIG_DIR/org.onap.sdnc.props" >> $ODL_HOME/etc/system.properties
# Install ssl and java certificates
-COPY truststoreONAPall.jks $JAVA_SECURITY_DIR
COPY truststoreONAPall.jks $SDNC_STORE_DIR
-RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit -noprompt
-RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore /opt/java/openjdk/lib/security/cacerts -deststorepass changeit -noprompt
+RUN if [ -f $JAVA_SECURITY_DIR}/cacerts ] ; then keytool -importkeystore -srckeystore $SDNC_STORE_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit -noprompt ; fi
+RUN keytool -importkeystore -srckeystore $SDNC_STORE_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore /opt/java/openjdk/lib/security/cacerts -deststorepass changeit -noprompt
# Secure with TLS
RUN echo org.osgi.service.http.secure.enabled=true >> $ODL_HOME/etc/custom.properties
diff --git a/installation/sdnc/src/main/docker/standalone.Dockerfile b/installation/sdnc/src/main/docker/standalone.Dockerfile
index 58907dc1..5f0f8254 100755
--- a/installation/sdnc/src/main/docker/standalone.Dockerfile
+++ b/installation/sdnc/src/main/docker/standalone.Dockerfile
@@ -44,10 +44,9 @@ RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,sdnc-northbound-all, sdnr-northbound
RUN sed -i "s/odl-restconf-all/odl-restconf-all,odl-netconf-topology/g" $ODL_HOME/etc/org.apache.karaf.features.cfg
# Install ssl and java certificates
-COPY truststoreONAPall.jks $JAVA_SECURITY_DIR
COPY truststoreONAPall.jks $SDNC_STORE_DIR
-RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit -noprompt
-RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore /opt/java/openjdk/lib/security/cacerts -deststorepass changeit -noprompt
+RUN if [ -f $JAVA_SECURITY_DIR}/cacerts ] ; then keytool -importkeystore -srckeystore $SDNC_STORE_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit -noprompt ; fi
+RUN keytool -importkeystore -srckeystore $SDNC_STORE_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore /opt/java/openjdk/lib/security/cacerts -deststorepass changeit -noprompt
# Secure with TLS