From 85947fd27e2c0cee9cbc237cfd2c8a440b913832 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Mon, 11 Jun 2018 14:46:33 -0400 Subject: Create base ODL Oxygen docker Create base docker image of OpenDaylight Oxygen SR1 Change-Id: I53fa3a824cb7d69bb638da7eb85b4f3d2643a65d Issue-ID: CCSDK-284 Signed-off-by: Timoney, Dan (dt5972) --- opendaylight/oxygen/pom.xml | 220 +++++++++++++++++++++++++ opendaylight/oxygen/src/main/docker/Dockerfile | 19 +++ opendaylight/pom.xml | 1 + 3 files changed, 240 insertions(+) create mode 100644 opendaylight/oxygen/pom.xml create mode 100644 opendaylight/oxygen/src/main/docker/Dockerfile (limited to 'opendaylight') diff --git a/opendaylight/oxygen/pom.xml b/opendaylight/oxygen/pom.xml new file mode 100644 index 00000000..4ecc62b3 --- /dev/null +++ b/opendaylight/oxygen/pom.xml @@ -0,0 +1,220 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-opendaylight + 0.3.0-SNAPSHOT + + + distribution-odl-oxygen + 0.3.0-SNAPSHOT + pom + + ccsdk-distribution :: opendaylight :: ${project.artifactId} + Creates OpenDaylight container + + ONAP + + + + onap/ccsdk-odl-oxygen-image + ${project.version} + 0.8.1 + 2.1.1 + ${https_proxy} + + + + + + org.opendaylight.integration + karaf + ${ccsdk.opendaylight.version} + tar.gz + + + org.mariadb.jdbc + mariadb-java-client + ${ccsdk.mariadb-connector-java.version} + jar + + + + + + + + + + org.codehaus.groovy.maven + gmaven-plugin + + + validate + + execute + + + + println project.properties['ccsdk.project.version']; + def versionArray; + if (project.properties['ccsdk.project.version'] != null ) { + versionArray = project.properties['ccsdk.project.version'].split('\\.'); + } + + if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) + { + project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + } else { + project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest"; + } + + println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']; + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + get-odl-distribution + validate + + copy + + + + + org.opendaylight.integration + karaf + ${ccsdk.opendaylight.version} + tar.gz + + true + ${basedir}/target/docker-stage + + + false + true + true + + + + + get-mariadb-connector-jar + validate + + copy + + + + + org.mariadb.jdbc + mariadb-java-client + ${ccsdk.mariadb-connector-java.version} + jar + true + ${basedir}/target/docker-stage + + + false + true + true + + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + Dockerfile + + true + + + + + + + + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.16.5 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + ${basedir}/target/docker-stage/Dockerfile + + ${project.version} + ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} + + + + + + + + generate-images + package + + build + + + + + push-images + install + + build + push + + + + + + + + + + + diff --git a/opendaylight/oxygen/src/main/docker/Dockerfile b/opendaylight/oxygen/src/main/docker/Dockerfile new file mode 100644 index 00000000..f5c2324c --- /dev/null +++ b/opendaylight/oxygen/src/main/docker/Dockerfile @@ -0,0 +1,19 @@ +# Base ubuntu with added packages needed for open ecomp +FROM onap/ccsdk-ubuntu-image:${project.version} +MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 +ENV ODL_HOME /opt/opendaylight/current + +# copy the opendaylight tar and expand +COPY karaf-${ccsdk.opendaylight.version}.tar.gz /tmp/ +RUN mkdir /opt/opendaylight \ + && tar zxvf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz --directory /opt/opendaylight \ + && rm -rf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz \ + && mv /opt/opendaylight/karaf-${ccsdk.opendaylight.version} /opt/opendaylight/current \ + && ln -s /opt/opendaylight/current /opt/opendaylight/karaf-${ccsdk.opendaylight.version} + +# workaround till we get proxy working +RUN mkdir -p /opt/opendaylight/current/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} +COPY mariadb-java-client-${ccsdk.mariadb-connector-java.version}.jar /opt/opendaylight/current/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} +# ENTRYPOINT exec /opt/opendaylight/current/bin/karaf +EXPOSE 8181 diff --git a/opendaylight/pom.xml b/opendaylight/pom.xml index 1f8765c1..a72076d1 100644 --- a/opendaylight/pom.xml +++ b/opendaylight/pom.xml @@ -17,5 +17,6 @@ nitrogen + oxygen -- cgit 1.2.3-korg