summaryrefslogtreecommitdiffstats
path: root/odlsli/src/main/docker/Dockerfile
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2018-06-22 17:05:16 -0400
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-06-22 17:05:16 -0400
commite14a02086c9119532f9153c78346d5c1d6789ca9 (patch)
tree05b612b7b008fc947dc2a11e315df70b1d045afd /odlsli/src/main/docker/Dockerfile
parent6f0c0101dcb421c75a1a49bea02d1dc7479ef7d1 (diff)
Improve odlsli startup time
Improved odlsli startup time by moving feature installation to build time, using ansible-opendaylight. Change-Id: I3f846da70e9aa0b8ce818ff83811c1b52aef1436 Issue-ID: CCSDK-285 Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'odlsli/src/main/docker/Dockerfile')
-rw-r--r--odlsli/src/main/docker/Dockerfile41
1 files changed, 35 insertions, 6 deletions
diff --git a/odlsli/src/main/docker/Dockerfile b/odlsli/src/main/docker/Dockerfile
index f6aeda6d..4d4d3737 100644
--- a/odlsli/src/main/docker/Dockerfile
+++ b/odlsli/src/main/docker/Dockerfile
@@ -1,17 +1,46 @@
# Base ubuntu with added packages needed for open ecomp
FROM onap/ccsdk-odl-oxygen-image:${project.version}
-MAINTAINER CCSDK Team (onap-ccsdk@lists.openecomp.org)
+MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
-ENV ODL_HOME /opt/opendaylight/current
+ENV ODL_HOME /opt/opendaylight
ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties
-
+ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features
+ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features
+ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features
+ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features
# copy the opendaylight credentials
-COPY idmlight.db.mv.db /opt/opendaylight/current
+COPY idmlight.db.mv.db $ODL_HOME/data
+
+
+# copy CCSDK mvn artifacts to ODL repository
+COPY system /tmp/system
+RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system
+
+# Add CCSDK 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|$|, ${CCSDK_SLI_CORE_REPO}, ${CCSDK_SLI_ADAPTORS_REPO}, ${CCSDK_SLI_NORTHBOUND_REPO}, ${CCSDK_SLI_PLUGINS_REPO}|" > $ODL_HOME/etc/org.apache.karaf.features.cfg
+
+# Create odl user
+RUN useradd odl
+
+# Install ansible-opendaylight
+RUN apt install -y software-properties-common && \
+ apt-add-repository -y ppa:ansible/ansible && \
+ apt update && \
+ apt install -y ansible && \
+ ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
+
+# Copy ccsdk install playbook
+COPY install_ccsdk.yml /tmp
+
+# Install features in ODL
+RUN ansible-playbook -i "localhost," -c local /tmp/install_ccsdk.yml
+
# copy deliverables to opt
COPY opt /opt
+COPY org.ops4j.pax.logging.cfg /opt/opendaylight/etc/org.ops4j.pax.logging.cfg
-COPY org.ops4j.pax.logging.cfg /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
-# ENTRYPOINT exec /opt/opendaylight/current/bin/karaf
+ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh
EXPOSE 8181