blob: 5dbf8d4c8c9370138129a90383fd4da89a209dc8 [file] [log] [blame]
Dan Timoney471dafa2017-08-21 14:44:05 -04001# Base ubuntu with added packages needed for open ecomp
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05002FROM ${base.image.name}:${project.docker.latestfulltag.version}
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -04003MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
Timoney, Dan (dt5972)b1ac7252018-12-14 13:00:43 -05004ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -04005ENV ODL_HOME /opt/opendaylight
Timoney, Dan (dt5972)21821db2018-03-13 19:26:40 -04006ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -04007ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features
8ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features
Alexis de Talhouët268c5e12018-09-12 15:27:33 -04009ENV CCSDK_FEATURES_REPO mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features
Herbert Eiselt4b054f92019-03-26 20:40:49 +010010ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040011ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features
12ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features
Timoney, Dan (dt5972)a92a8382019-04-02 10:35:09 -070013
Timoney, Dan (dt5972)be94cc12018-07-02 18:02:35 -040014ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
Timoney, Dan (dt5972)aa9d8252019-02-04 18:02:21 -050015ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra}
Timoney, Dan (dt5972)be94cc12018-07-02 18:02:35 -040016
Dan Timoney74e4e8d2017-08-22 11:51:54 -040017# copy the opendaylight credentials
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040018COPY idmlight.db.mv.db $ODL_HOME/data
19
20
21# copy CCSDK mvn artifacts to ODL repository
22COPY system /tmp/system
23RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system
24
25# Add CCSDK repositories to boot repositories
26RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig
Timoney, Dan (dt5972)34261272019-04-04 06:18:07 -070027
28RUN sed -i -e "\|featuresRepositories|s|$|, ${CCSDK_SLI_CORE_REPO}, ${CCSDK_SLI_ADAPTORS_REPO}, ${CCSDK_SLI_NORTHBOUND_REPO}, ${CCSDK_SLI_PLUGINS_REPO}, ${CCSDK_FEATURES_REPO}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
Timoney, Dan (dt5972)aa9d8252019-02-04 18:02:21 -050029RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040030
31# Create odl user
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050032RUN addgroup -S odl && adduser -S odl -G odl
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040033
Timoney, Dan (dt5972)be94cc12018-07-02 18:02:35 -040034# Install ansible
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040035#COPY ansible-sources.list /etc/apt/sources.list.d
36#RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv ${ANSIBLE_GPG_KEY} && \
37# gpg --export --armor ${ANSIBLE_GPG_KEY} | apt-key add - && \
Timoney, Dan (dt5972)b1ac7252018-12-14 13:00:43 -050038# apk update && \
39# apk add -y ansible
Alexis de Talhouët268c5e12018-09-12 15:27:33 -040040
41# Install ansible-opendaylight
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040042#RUN ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040043
44# Copy ccsdk install playbook
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040045#COPY install_ccsdk.yml /tmp
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040046
47# Install features in ODL
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040048#RUN ansible-playbook -i "localhost," -c local /tmp/install_ccsdk.yml
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040049
Dan Timoney471dafa2017-08-21 14:44:05 -040050
Dan Timoney74e4e8d2017-08-22 11:51:54 -040051# copy deliverables to opt
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050052COPY --chown=odl:odl opt /opt
53COPY --chown=odl:odl org.ops4j.pax.logging.cfg /opt/opendaylight/etc/org.ops4j.pax.logging.cfg
Dan Timoney471dafa2017-08-21 14:44:05 -040054
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050055RUN chown -R odl:odl /opt
Marcus G K Williamsdc299ed2017-09-14 15:15:45 -070056
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050057USER odl
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040058ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh
Dan Timoney471dafa2017-08-21 14:44:05 -040059EXPOSE 8181