From 6e99580c2a69d2cbd2994dc51e6f305313248a91 Mon Sep 17 00:00:00 2001 From: Michael DÜrre Date: Wed, 19 Jan 2022 14:29:29 +0100 Subject: migrate dist to phosphorus-sr1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add odl phosphorus image and switch for odlsli Issue-ID: CCSDK-3569 Signed-off-by: Michael DÜrre Change-Id: Ib9f06fe9170996b1d5d295808b42d1a6f9838a82 Signed-off-by: Michael DÜrre --- dependencies/pom.xml | 8 +- odlsli/odlsli-alpine/pom.xml | 2 +- opendaylight/phosphorus/phosphorus-alpine/pom.xml | 243 +++++++++++++++++++++ .../phosphorus-alpine/src/main/docker/Dockerfile | 60 +++++ .../main/resources/framework-4.3.3-features.xml | 74 +++++++ .../src/main/resources/startup.properties | 25 +++ opendaylight/phosphorus/pom.xml | 35 +++ opendaylight/pom.xml | 1 + pom.xml | 2 +- 9 files changed, 446 insertions(+), 4 deletions(-) create mode 100644 opendaylight/phosphorus/phosphorus-alpine/pom.xml create mode 100644 opendaylight/phosphorus/phosphorus-alpine/src/main/docker/Dockerfile create mode 100644 opendaylight/phosphorus/phosphorus-alpine/src/main/resources/framework-4.3.3-features.xml create mode 100755 opendaylight/phosphorus/phosphorus-alpine/src/main/resources/startup.properties create mode 100644 opendaylight/phosphorus/pom.xml diff --git a/dependencies/pom.xml b/dependencies/pom.xml index d3cf064b..1a1f4321 100755 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.parent dependencies-odl-bom - 2.3.1 + 2.3.3-SNAPSHOT import pom @@ -125,6 +125,10 @@ org.codehaus.jettison jettison + + org.dom4j + dom4j + org.glassfish.jersey.bundles.repackaged jersey-guava @@ -196,7 +200,7 @@ com.google.errorprone error_prone_annotations - 2.3.4 + 2.5.1 diff --git a/odlsli/odlsli-alpine/pom.xml b/odlsli/odlsli-alpine/pom.xml index 785c8f4d..7f8a4ac6 100644 --- a/odlsli/odlsli-alpine/pom.xml +++ b/odlsli/odlsli-alpine/pom.xml @@ -18,7 +18,7 @@ - onap/ccsdk-odl-silicon-alpine-image + onap/ccsdk-odl-phosphorus-alpine-image onap/ccsdk-odlsli-alpine-image ${project.version} diff --git a/opendaylight/phosphorus/phosphorus-alpine/pom.xml b/opendaylight/phosphorus/phosphorus-alpine/pom.xml new file mode 100644 index 00000000..8c674270 --- /dev/null +++ b/opendaylight/phosphorus/phosphorus-alpine/pom.xml @@ -0,0 +1,243 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-odl-phosphorus + 1.3.1-SNAPSHOT + + + distribution-odl-phosphorus-docker + pom + + ccsdk-distribution :: opendaylight :: phosphorus :: docker + Creates OpenDaylight container + + ONAP + + + + onap/ccsdk-odl-phosphorus-alpine-image + onap-karaf + 0.14.7 + 2.0.11 + 7.3.19 + 2.0.10 + 2.0.14 + 4.3.3 + + + + + + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + ${basedir}/../../../src/main/scripts/TagVersion.groovy + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + get-odl-distribution + validate + + copy + + + + + org.opendaylight.integration + ${odl.karaf.artifactId} + ${ccsdk.opendaylight.version} + tar.gz + true + ${basedir}/target/docker-stage + + + false + true + true + + + + copy-with-alternalte-repo-2 + generate-sources + + copy + + + + + com.highstreet-technologies.aaa + aaa-authn-api + ${odl.shiro.version} + ${project.build.directory}/docker-stage/system/org/opendaylight/aaa/aaa-authn-api/${odl.shiro.version} + aaa-authn-api-${odl.shiro.version}.jar + * + + + com.highstreet-technologies.ops4j.pax.web + pax-web-jetty + ${odl.ops4j.version} + ${project.build.directory}/docker-stage/system/org/ops4j/pax/web/pax-web-jetty/${odl.ops4j.version} + pax-web-jetty-${odl.ops4j.version}.jar + * + + + com.highstreet-technologies.netconf + sal-netconf-connector + ${odl.netconf.version} + ${project.build.directory}/docker-stage/system/org/opendaylight/netconf/sal-netconf-connector/${odl.netconf.version} + sal-netconf-connector-${odl.netconf.version}.jar + * + + + org.ops4j.pax.logging + pax-logging-log4j2 + ${patch.pax.logging.version} + ${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-log4j2/${patch.pax.logging.version} + pax-logging-log4j2-${patch.pax.logging.version}.jar + * + + + org.ops4j.pax.logging + pax-logging-logback + ${patch.pax.logging.version} + ${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-logback/${patch.pax.logging.version} + pax-logging-logback-${patch.pax.logging.version}.jar + * + + + org.ops4j.pax.logging + pax-logging-api + ${patch.pax.logging.version} + ${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-api/${patch.pax.logging.version} + pax-logging-api-${patch.pax.logging.version}.jar + * + + + false + true + true + + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + Dockerfile + + true + + + src/main/odlscripts + + * + + false + + + + + + copy-karaf-framework-features + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/resources + + framework-${odl.karaf.framework.version}-features.xml + startup.properties + + true + + + + + + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.34.0 + false + + + + ${image.name} + + try + true + ${basedir}/target/docker-stage + Dockerfile + + ${project.docker.latestminortag.version} + ${project.docker.latestfulltag.version} + ${project.docker.latesttagtimestamp.version} + + + + + ${docker.verbose} + ${docker.skip.push} + + + + build-push-images + + build + push + + + + + + + + + diff --git a/opendaylight/phosphorus/phosphorus-alpine/src/main/docker/Dockerfile b/opendaylight/phosphorus/phosphorus-alpine/src/main/docker/Dockerfile new file mode 100644 index 00000000..19cd55f6 --- /dev/null +++ b/opendaylight/phosphorus/phosphorus-alpine/src/main/docker/Dockerfile @@ -0,0 +1,60 @@ +# Prepare stage for multistage image build +## START OF STAGE0 ## +FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version} AS stage0 +USER root + +ENV ODL_HOME /opt/opendaylight/current + +# copy the opendaylight tar and expand +COPY ${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz /tmp/ +RUN mkdir -p /opt/odl \ + && tar xzf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \ + && rm -rf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz \ + && mv /opt/odl/${odl.karaf.artifactId}-${ccsdk.opendaylight.version} /opt/opendaylight \ + && ln -s /opt/opendaylight /opt/opendaylight/${odl.karaf.artifactId}-${ccsdk.opendaylight.version} \ + && ln -s /opt/opendaylight /opt/opendaylight/current + +# Enable wheel and create a group and user +RUN sed -i -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \ + && addgroup -S odl \ + && adduser -S odl -G odl \ + && addgroup odl wheel + +# Patch some opendaylight artifacts +COPY system $ODL_HOME/system + +# Add missing scripts see SDNC-1056 +#COPY configure_cluster.sh configure-cluster-ipdetect.sh custom_shard_config.txt set_persistence.sh $ODL_HOME/bin/ +#RUN chmod 755 $ODL_HOME/bin/configure_cluster.sh $ODL_HOME/bin/configure-cluster-ipdetect.sh $ODL_HOME/bin/set_persistence.sh $ODL_HOME/bin/custom_shard_config.txt + + +# Remove vulnerable version of ops4j logging +COPY framework-${odl.karaf.framework.version}-features.xml $ODL_HOME/system/org/apache/karaf/features/framework/${odl.karaf.framework.version}/framework-${odl.karaf.framework.version}-features.xml +COPY startup.properties $ODL_HOME/etc/startup.properties +RUN rm -rf $ODL_HOME/system/org/ops4j/pax/logging/pax-logging-log4j2/${odl.pax.logging.version} +RUN rm -rf $ODL_HOME/system/org/ops4j/pax/logging/pax-logging-logback/${odl.pax.logging.version} +RUN rm -rf $ODL_HOME/system/org/ops4j/pax/logging/pax-logging-api/${odl.pax.logging.version} + +# Changing ownership and permission of /opt +RUN chown -R odl:odl /opt && chmod -R 755 /opt + +## END OF STAGE0 ## + +################################################# + +## This will create actual image +FROM scratch +MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) +USER root + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH=$PATH:/opt/java/openjdk/bin \ + ODL_HOME=/opt/opendaylight/current + +# Copy Everything from stage0 +COPY --from=stage0 / / + +USER odl +EXPOSE 8181 +WORKDIR $ODL_HOME +# ENTRYPOINT exec /opt/opendaylight/bin/karaf diff --git a/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/framework-4.3.3-features.xml b/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/framework-4.3.3-features.xml new file mode 100644 index 00000000..6f2ad09e --- /dev/null +++ b/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/framework-4.3.3-features.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + diff --git a/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/startup.properties b/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/startup.properties new file mode 100755 index 00000000..c097c8af --- /dev/null +++ b/opendaylight/phosphorus/phosphorus-alpine/src/main/resources/startup.properties @@ -0,0 +1,25 @@ +# Bundles to be started on startup, with startlevel +mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.3.3 = 1 +mvn\:org.ops4j.pax.url/pax-url-aether/2.6.7 = 5 +mvn\:org.ops4j.pax.logging/pax-logging-log4j2/${patch.pax.logging.version} = 8 +mvn\:org.fusesource.jansi/jansi/1.18 = 8 +mvn\:org.ops4j.pax.logging/pax-logging-api/${patch.pax.logging.version} = 8 +mvn\:org.osgi/org.osgi.util.promise/1.1.1 = 9 +mvn\:org.apache.felix/org.apache.felix.coordinator/1.0.2 = 9 +mvn\:org.apache.felix/org.apache.felix.converter/1.0.14 = 9 +mvn\:org.osgi/org.osgi.util.function/1.1.0 = 9 +mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.22 = 10 +mvn\:org.apache.felix/org.apache.felix.configurator/1.0.14 = 11 +mvn\:org.apache.sling/org.apache.sling.commons.johnzon/1.2.6 = 11 +mvn\:org.apache.felix/org.apache.felix.configadmin.plugin.interpolation/1.1.4 = 11 +mvn\:org.apache.felix/org.apache.felix.cm.json/1.0.6 = 11 +mvn\:org.apache.felix/org.apache.felix.fileinstall/3.7.0 = 12 +mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.3.3 = 15 +# The following are added by opendaylight-karaf-resources +mvn\:org.osgi/org.osgi.service.event/1.4.0 = 7 +mvn\:org.apache.felix/org.apache.felix.metatype/1.2.4 = 8 +mvn\:org.opendaylight.odlparent/bcprov-framework-ext/9.0.8 = 14 +mvn\:org.opendaylight.odlparent/bcutil-framework-ext/9.0.8 = 14 +mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/9.0.8 = 14 +mvn\:org.opendaylight.odlparent/logging-markers/9.0.8 = 14 +mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14 \ No newline at end of file diff --git a/opendaylight/phosphorus/pom.xml b/opendaylight/phosphorus/pom.xml new file mode 100644 index 00000000..e91f2bb1 --- /dev/null +++ b/opendaylight/phosphorus/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-opendaylight + 1.3.1-SNAPSHOT + + + distribution-odl-phosphorus + pom + + ccsdk-distribution :: opendaylight :: phosphorus + Creates OpenDaylight container + + + phosphorus-alpine + + + + 0.15.1 + + + + + + org.opendaylight.integration + onap-karaf + ${ccsdk.opendaylight.version} + tar.gz + + + + diff --git a/opendaylight/pom.xml b/opendaylight/pom.xml index cdc3ba79..a70fdf00 100644 --- a/opendaylight/pom.xml +++ b/opendaylight/pom.xml @@ -16,5 +16,6 @@ silicon + phosphorus diff --git a/pom.xml b/pom.xml index 2ac515cd..757fbc69 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent oparent - 2.3.2 + 2.3.3-SNAPSHOT org.onap.ccsdk.distribution -- cgit 1.2.3-korg