Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame] | 1 | # Base ubuntu with added packages needed for open ecomp |
Timoney, Dan (dt5972) | 268c4ba | 2019-02-12 14:35:10 -0500 | [diff] [blame] | 2 | FROM ${base.image.name}:${project.docker.latestfulltag.version} |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 3 | MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) |
Timoney, Dan (dt5972) | b1ac725 | 2018-12-14 13:00:43 -0500 | [diff] [blame] | 4 | ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 5 | ENV ODL_HOME /opt/opendaylight |
Timoney, Dan (dt5972) | 21821db | 2018-03-13 19:26:40 -0400 | [diff] [blame] | 6 | ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 7 | ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features |
| 8 | ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features |
Alexis de Talhouët | 268c5e1 | 2018-09-12 15:27:33 -0400 | [diff] [blame] | 9 | ENV CCSDK_FEATURES_REPO mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features |
Herbert Eiselt | 4b054f9 | 2019-03-26 20:40:49 +0100 | [diff] [blame] | 10 | ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 11 | ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features |
| 12 | ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features |
Timoney, Dan (dt5972) | a92a838 | 2019-04-02 10:35:09 -0700 | [diff] [blame] | 13 | |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 14 | ENV ANSIBLE_GPG_KEY ${ansible.gpg.key} |
Timoney, Dan (dt5972) | aa9d825 | 2019-02-04 18:02:21 -0500 | [diff] [blame] | 15 | ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra} |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 16 | |
Dan Timoney | 74e4e8d | 2017-08-22 11:51:54 -0400 | [diff] [blame] | 17 | # copy the opendaylight credentials |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 18 | COPY idmlight.db.mv.db $ODL_HOME/data |
| 19 | |
| 20 | |
| 21 | # copy CCSDK mvn artifacts to ODL repository |
| 22 | COPY system /tmp/system |
| 23 | RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system |
| 24 | |
| 25 | # Add CCSDK repositories to boot repositories |
| 26 | RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig |
Timoney, Dan (dt5972) | 3426127 | 2019-04-04 06:18:07 -0700 | [diff] [blame] | 27 | |
| 28 | RUN 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) | aa9d825 | 2019-02-04 18:02:21 -0500 | [diff] [blame] | 29 | RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 30 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 31 | # Install sudo and IP utilities |
| 32 | RUN apk update && apk add sudo iputils openssl |
| 33 | |
| 34 | # Enable wheel group |
| 35 | RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers |
| 36 | |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 37 | # Create odl user |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 38 | RUN addgroup -S odl && adduser -S odl -G odl |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 39 | RUN addgroup odl wheel |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 40 | |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 41 | # Install ansible |
Timoney, Dan (dt5972) | ea56542 | 2018-07-06 10:25:44 -0400 | [diff] [blame] | 42 | #COPY ansible-sources.list /etc/apt/sources.list.d |
| 43 | #RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv ${ANSIBLE_GPG_KEY} && \ |
| 44 | # gpg --export --armor ${ANSIBLE_GPG_KEY} | apt-key add - && \ |
Timoney, Dan (dt5972) | b1ac725 | 2018-12-14 13:00:43 -0500 | [diff] [blame] | 45 | # apk update && \ |
| 46 | # apk add -y ansible |
Alexis de Talhouët | 268c5e1 | 2018-09-12 15:27:33 -0400 | [diff] [blame] | 47 | |
| 48 | # Install ansible-opendaylight |
Timoney, Dan (dt5972) | ea56542 | 2018-07-06 10:25:44 -0400 | [diff] [blame] | 49 | #RUN ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 50 | |
| 51 | # Copy ccsdk install playbook |
Timoney, Dan (dt5972) | ea56542 | 2018-07-06 10:25:44 -0400 | [diff] [blame] | 52 | #COPY install_ccsdk.yml /tmp |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 53 | |
| 54 | # Install features in ODL |
Timoney, Dan (dt5972) | ea56542 | 2018-07-06 10:25:44 -0400 | [diff] [blame] | 55 | #RUN ansible-playbook -i "localhost," -c local /tmp/install_ccsdk.yml |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 56 | |
Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame] | 57 | |
Dan Timoney | 74e4e8d | 2017-08-22 11:51:54 -0400 | [diff] [blame] | 58 | # copy deliverables to opt |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 59 | COPY --chown=odl:odl opt /opt |
| 60 | COPY --chown=odl:odl org.ops4j.pax.logging.cfg /opt/opendaylight/etc/org.ops4j.pax.logging.cfg |
Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame] | 61 | |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 62 | RUN chown -R odl:odl /opt |
Marcus G K Williams | dc299ed | 2017-09-14 15:15:45 -0700 | [diff] [blame] | 63 | |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 64 | USER odl |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 65 | ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh |
Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame] | 66 | EXPOSE 8181 |