aboutsummaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2018-07-17 16:34:31 -0400
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-07-17 16:34:31 -0400
commit0941e45b7a5b986f74704fe964d051bd0c733c5c (patch)
treeefe509d3513401c272fc9039500f820ddf4ba422 /installation
parent48a2eaf2a009dce47f93f0e5feee912cfa53fef8 (diff)
Install features at build time
Update docker design to install features at docker build time instead of installing features on container start up. This avoids need to bounce container on startup. Change-Id: Iacfba1f8c36c7b03f23fb66e9aff910d09e7cfa4 Issue-ID: SDNC-394 Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com> Former-commit-id: 86a008a5b0f0f22356f64b86d9c4c51f9cf09cdc
Diffstat (limited to 'installation')
-rw-r--r--installation/sdnc/pom.xml87
-rwxr-xr-xinstallation/sdnc/src/main/docker/Dockerfile11
-rwxr-xr-xinstallation/sdnc/src/main/scripts/startODL.sh23
3 files changed, 56 insertions, 65 deletions
diff --git a/installation/sdnc/pom.xml b/installation/sdnc/pom.xml
index 3566e27e..538e1239 100644
--- a/installation/sdnc/pom.xml
+++ b/installation/sdnc/pom.xml
@@ -20,43 +20,43 @@
<properties>
<image.name>onap/sdnc-image</image.name>
<sdnc.project.version>${project.version}</sdnc.project.version>
- <sdnc.northbound.version>1.3.4</sdnc.northbound.version>
+ <sdnc.northbound.version>1.4.0-SNAPSHOT</sdnc.northbound.version>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+ <docker.push.phase>deploy</docker.push.phase>
+ <docker.verbose>true</docker.verbose>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>generic-resource-api-installer</artifactId>
- <version>${sdnc.northbound.version}</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>vnfapi-installer</artifactId>
- <version>${sdnc.northbound.version}</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>vnftools-installer</artifactId>
- <version>${sdnc.northbound.version}</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.adaptors</groupId>
- <artifactId>ansible-adapter-installer</artifactId>
- <version>${ccsdk.sli.adaptors.version}</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.northbound</groupId>
- <artifactId>lcm-installer</artifactId>
- <version>${ccsdk.sli.northbound.version}</version>
- <type>zip</type>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>generic-resource-api-installer</artifactId>
+ <version>${sdnc.northbound.version}</version>
+ <classifier>repo</classifier>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>vnfapi-installer</artifactId>
+ <version>${sdnc.northbound.version}</version>
+ <classifier>repo</classifier>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>vnftools-installer</artifactId>
+ <version>${sdnc.northbound.version}</version>
+ <classifier>repo</classifier>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>sdnc-northbound-features-installer</artifactId>
+ <version>${sdnc.northbound.version}</version>
+ <classifier>repo</classifier>
+ <type>zip</type>
+ </dependency>
+ </dependencies>
<build>
<plugins>
@@ -125,7 +125,7 @@
<execution>
<id>push-images</id>
- <phase>deploy</phase>
+ <phase>${docker.push.phase}</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
@@ -266,26 +266,13 @@
<version>3.0.2</version>
<executions>
<execution>
- <id>unpack-sdnc-features</id>
+ <id>unpack sdnc features</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/features</outputDirectory>
- <includeGroupIds>org.onap.sdnc</includeGroupIds>
- <excludeTransitive>true</excludeTransitive>
- </configuration>
- </execution>
- <execution>
- <id>unpack-extra-ccsdk-features</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/features</outputDirectory>
- <includeGroupIds>org.onap.ccsdk</includeGroupIds>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
@@ -343,6 +330,6 @@
</build>
<organization>
- <name>openECOMP</name>
+ <name>ONAP</name>
</organization>
</project>
diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile
index 3cd107dc..13a644e4 100755
--- a/installation/sdnc/src/main/docker/Dockerfile
+++ b/installation/sdnc/src/main/docker/Dockerfile
@@ -9,6 +9,8 @@ ENV SDNC_CONFIG_DIR /opt/onap/sdnc/data/properties
ENV SDNC_STORE_DIR /opt/onap/sdnc/data/stores
ENV SSL_CERTS_DIR /etc/ssl/certs
ENV JAVA_SECURITY_DIR $SSL_CERTS_DIR/java
+ENV SDNC_NORTHBOUND_REPO mvn:org.onap.sdnc.northbound/sdnc-northbound-all/${sdnc.northbound.version}/xml/features
+
# imstall ssl and java certificates
@@ -26,6 +28,15 @@ COPY idmlight.db.mv.db /opt/opendaylight/current/data
COPY opt /opt
RUN test -L /opt/sdnc || ln -s /opt/onap/sdnc /opt/sdnc
+# copy SDNC mvn artifacts to ODL repository
+COPY system /tmp/system
+RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system
+
+# Add SDNC repositories to boot repositories
+RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig
+RUN cat $ODL_HOME/etc/org.apache.karaf.features.cfg.orig | sed -e "\|featuresRepositories|s|$|,${SDNC_NORTHBOUND_REPO}|" > $ODL_HOME/etc/org.apache.karaf.features.cfg.1
+RUN cat $ODL_HOME/etc/org.apache.karaf.features.cfg.1 | sed -e "\|featuresBoot=config|s|$|,sdnc-northbound-all|" > $ODL_HOME/etc/org.apache.karaf.features.cfg
+
# ENTRYPOINT exec /opt/opendaylight/current/bin/karaf
EXPOSE 8181
diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh
index fa1810b3..55c04a15 100755
--- a/installation/sdnc/src/main/scripts/startODL.sh
+++ b/installation/sdnc/src/main/scripts/startODL.sh
@@ -28,8 +28,9 @@ function enable_odl_cluster(){
fi
echo "Installing Opendaylight cluster features"
- ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
- ${ODL_HOME}/bin/client feature:install odl-jolokia
+ cat $ODL_HOME/etc/org.apache.karaf.features.cfg | sed -e "\|featuresBoot=config|s|$|,odl-mdsal-clustering,odl-jolokia|" > $ODL_HOME/etc/org.apache.karaf.features.cfg
+ #${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
+ #${ODL_HOME}/bin/client feature:install odl-jolokia
echo "Update cluster information statically"
hm=$(hostname)
@@ -95,26 +96,18 @@ then
${SDNC_HOME}/bin/installSdncDb.sh
echo "Installing SDN-C keyStore"
${SDNC_HOME}/bin/addSdncKeyStore.sh
- echo "Starting OpenDaylight"
- ${CCSDK_HOME}/bin/installOdlHostKey.sh
- ${ODL_HOME}/bin/start
- echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
- sleep ${SLEEP_TIME}
- echo "Installing SDN-C platform features"
- ${SDNC_HOME}/bin/installFeatures.sh
+
+ #${CCSDK_HOME}/bin/installOdlHostKey.sh
+
if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
then
echo "Installing directed graphs"
${SDNC_HOME}/svclogic/bin/install.sh
fi
- if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
+ if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
- echo "Restarting OpenDaylight"
- ${ODL_HOME}/bin/stop
- echo "Waiting 60 seconds for OpenDaylight stop to complete"
- sleep 60
echo "Installed at `date`" > ${SDNC_HOME}/.installed
fi
-exec ${ODL_HOME}/bin/karaf
+exec ${ODL_HOME}/bin/karaf server