blob: fd95cba6f722b5f1a5e6216c3cb9612cb41d7558 [file] [log] [blame]
Dan Timoney471dafa2017-08-21 14:44:05 -04001# Base ubuntu with added packages needed for open ecomp
Timoney, Dan (dt5972)e7cfae52019-01-03 15:14:58 -05002FROM ${base.image.name}:${project.version}
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -04003MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
Dan Timoney471dafa2017-08-21 14:44:05 -04004ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
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
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040010ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features
11ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features
Timoney, Dan (dt5972)be94cc12018-07-02 18:02:35 -040012ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
13
Dan Timoney74e4e8d2017-08-22 11:51:54 -040014# copy the opendaylight credentials
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040015COPY idmlight.db.mv.db $ODL_HOME/data
16
17
18# copy CCSDK mvn artifacts to ODL repository
19COPY system /tmp/system
20RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system
21
22# Add CCSDK repositories to boot repositories
23RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig
Timoney, Dan (dt5972)aa9d8252019-02-04 18:02:21 -050024RUN 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
25RUN 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 -040026
27# Create odl user
28RUN useradd odl
29
Timoney, Dan (dt5972)be94cc12018-07-02 18:02:35 -040030# Install ansible
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040031#COPY ansible-sources.list /etc/apt/sources.list.d
32#RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv ${ANSIBLE_GPG_KEY} && \
33# gpg --export --armor ${ANSIBLE_GPG_KEY} | apt-key add - && \
34# apt-get update && \
35# apt-get install -y ansible
Alexis de Talhouët268c5e12018-09-12 15:27:33 -040036
37# Install ansible-opendaylight
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040038#RUN ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040039
40# Copy ccsdk install playbook
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040041#COPY install_ccsdk.yml /tmp
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040042
43# Install features in ODL
Timoney, Dan (dt5972)ea565422018-07-06 10:25:44 -040044#RUN ansible-playbook -i "localhost," -c local /tmp/install_ccsdk.yml
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040045
Dan Timoney471dafa2017-08-21 14:44:05 -040046
Dan Timoney74e4e8d2017-08-22 11:51:54 -040047# copy deliverables to opt
Dan Timoney471dafa2017-08-21 14:44:05 -040048COPY opt /opt
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040049COPY org.ops4j.pax.logging.cfg /opt/opendaylight/etc/org.ops4j.pax.logging.cfg
Dan Timoney471dafa2017-08-21 14:44:05 -040050
Marcus G K Williamsdc299ed2017-09-14 15:15:45 -070051
Timoney, Dan (dt5972)e14a0202018-06-22 17:05:16 -040052ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh
Dan Timoney471dafa2017-08-21 14:44:05 -040053EXPOSE 8181