INT-813 818, small multi-CPU images
[sdnc/oam.git] / installation / sdnc / src / main / docker / Dockerfile
old mode 100644 (file)
new mode 100755 (executable)
index 2e2140b..3565ff7
@@ -1,23 +1,43 @@
 # Base ubuntu with added packages needed for open ecomp
-FROM ecomp/ubuntu-sdnc-image:${project.version}
-MAINTAINER SDN-C Team (sdnc@lists.openecomp.org)
-ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
+FROM onap/ccsdk-odlsli-alpine-image:${ccsdk.docker.version}
+
+MAINTAINER SDN-C Team (sdnc@lists.onap.org)
+
+#ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
+ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
 ENV ODL_HOME /opt/opendaylight/current
-ENV SDNC_CONFIG_DIR /opt/openecomp/sdnc/data/properties
+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
+COPY AAF_RootCA.cer $SSL_CERTS_DIR
+COPY truststoreONAPall.jks $JAVA_SECURITY_DIR
+COPY AAF_RootCA.cer $SDNC_STORE_DIR
+COPY truststoreONAPall.jks $SDNC_STORE_DIR
 
-# copy the opendaylight tar and expand
-COPY distribution-karaf-0.4.2-Beryllium-SR2.tar.gz /tmp
-RUN mkdir /opt/opendaylight /opt/openecomp
-RUN tar zxvf /tmp/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz --directory /opt/opendaylight
-RUN ln -s /opt/opendaylight/distribution-karaf-0.4.2-Beryllium-SR2 /opt/opendaylight/current
-COPY idmlight.db.mv.db /opt/opendaylight/current
+RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts  -deststorepass changeit
 
-# copy openecomp
+# Overlay ODL credential database with pre-staged credentials
+COPY idmlight.db.mv.db /opt/opendaylight/current/data
+
+# copy onap
 COPY opt /opt
-RUN ln -s /opt/openecomp/sdnc /opt/sdnc
+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
+
 
-# workaround till we get proxy working
-COPY mysql.tgz /tmp
-RUN tar zxvf /tmp/mysql.tgz --directory /opt/opendaylight/current/system
 # ENTRYPOINT exec /opt/opendaylight/current/bin/karaf
 EXPOSE 8181