From 4ec03269604e3bd897207552127f94b4d1f30850 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 12 Dec 2019 10:35:10 -0500 Subject: Update to use ONAP specific ODL distro Updated CCSDK dockers to use ONAP-specific OpenDaylight Neon SR1 distribution. Change-Id: I602ace48c00b78ac6e2b5e80a9403330790e3487 Issue-ID: CCSDK-1753 Signed-off-by: Timoney, Dan (dt5972) --- dependencies/pom.xml | 8 + opendaylight/neon/neon-alpine/pom.xml | 184 +++++++++++++++++++++ .../neon/neon-alpine/src/main/docker/Dockerfile | 22 +++ opendaylight/neon/neon-docker/pom.xml | 183 -------------------- .../neon/neon-docker/src/main/docker/Dockerfile | 22 --- opendaylight/neon/neon-karaf/pom.xml | 178 -------------------- .../main/assembly/etc/org.ops4j.pax.url.mvn.cfg | 96 ----------- .../src/main/assembly/etc/shell.init.script | 66 -------- opendaylight/neon/pom.xml | 3 +- 9 files changed, 215 insertions(+), 547 deletions(-) create mode 100644 opendaylight/neon/neon-alpine/pom.xml create mode 100644 opendaylight/neon/neon-alpine/src/main/docker/Dockerfile delete mode 100644 opendaylight/neon/neon-docker/pom.xml delete mode 100644 opendaylight/neon/neon-docker/src/main/docker/Dockerfile delete mode 100644 opendaylight/neon/neon-karaf/pom.xml delete mode 100644 opendaylight/neon/neon-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg delete mode 100644 opendaylight/neon/neon-karaf/src/main/assembly/etc/shell.init.script diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 9c696046..bd0f1c05 100755 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -63,6 +63,14 @@ org.apache.commons commons-text + + org.apache.httpcomponents + httpclient + + + org.apache.httpcomponents + httpcore + org.apache.tomcat tomcat-jdbc diff --git a/opendaylight/neon/neon-alpine/pom.xml b/opendaylight/neon/neon-alpine/pom.xml new file mode 100644 index 00000000..08c131bb --- /dev/null +++ b/opendaylight/neon/neon-alpine/pom.xml @@ -0,0 +1,184 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-odl-neon + 0.7.0-SNAPSHOT + + + distribution-odl-neon-docker + 0.7.0-SNAPSHOT + pom + + ccsdk-distribution :: opendaylight :: neon :: docker + Creates OpenDaylight container + + ONAP + + + + onap/ccsdk-odl-neon-alpine-image + onap-karaf + + + + + + + org.codehaus.groovy.maven + gmaven-plugin + + + 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 + + + + + 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.28.0 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + Dockerfile + + ${project.docker.latestminortag.version} + ${project.docker.latestfulltag.version} + ${project.docker.latesttagtimestamp.version} + + + + + + + + generate-images + package + + build + + + + + push-images + ${docker.push.phase} + + build + push + + + + + + + + + + + diff --git a/opendaylight/neon/neon-alpine/src/main/docker/Dockerfile b/opendaylight/neon/neon-alpine/src/main/docker/Dockerfile new file mode 100644 index 00000000..950dba69 --- /dev/null +++ b/opendaylight/neon/neon-alpine/src/main/docker/Dockerfile @@ -0,0 +1,22 @@ +# Base ubuntu with added packages needed for open ecomp +FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version} +MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) +ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk +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 zxvf /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 + + +# workaround till we get proxy working +RUN mkdir -p /opt/opendaylight/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} +COPY mariadb-java-client-${ccsdk.mariadb-connector-java.version}.jar /opt/opendaylight/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} + +# ENTRYPOINT exec /opt/opendaylight/bin/karaf +EXPOSE 8181 diff --git a/opendaylight/neon/neon-docker/pom.xml b/opendaylight/neon/neon-docker/pom.xml deleted file mode 100644 index c8228eec..00000000 --- a/opendaylight/neon/neon-docker/pom.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - 4.0.0 - - - org.onap.ccsdk.distribution - distribution-odl-neon - 0.7.0-SNAPSHOT - - - distribution-odl-neon-docker - 0.7.0-SNAPSHOT - pom - - ccsdk-distribution :: opendaylight :: neon :: docker - Creates OpenDaylight container - - ONAP - - - - onap/ccsdk-odl-neon-alpine-image - - - - - - - org.codehaus.groovy.maven - gmaven-plugin - - - 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 - 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.28.0 - false - - - - ${image.name} - - try - ${basedir}/target/docker-stage - Dockerfile - - ${project.docker.latestminortag.version} - ${project.docker.latestfulltag.version} - ${project.docker.latesttagtimestamp.version} - - - - - - - - generate-images - package - - build - - - - - push-images - ${docker.push.phase} - - build - push - - - - - - - - - - - diff --git a/opendaylight/neon/neon-docker/src/main/docker/Dockerfile b/opendaylight/neon/neon-docker/src/main/docker/Dockerfile deleted file mode 100644 index a043e1e9..00000000 --- a/opendaylight/neon/neon-docker/src/main/docker/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# Base ubuntu with added packages needed for open ecomp -FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version} -MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) -ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk -ENV ODL_HOME /opt/opendaylight/current - -# copy the opendaylight tar and expand -COPY karaf-${ccsdk.opendaylight.version}.tar.gz /tmp/ -RUN mkdir -p /opt/odl \ - && tar zxvf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \ - && rm -rf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz \ - && mv /opt/odl/karaf-${ccsdk.opendaylight.version} /opt/opendaylight \ - && ln -s /opt/opendaylight /opt/opendaylight/karaf-${ccsdk.opendaylight.version} \ - && ln -s /opt/opendaylight /opt/opendaylight/current - - -# workaround till we get proxy working -RUN mkdir -p /opt/opendaylight/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} -COPY mariadb-java-client-${ccsdk.mariadb-connector-java.version}.jar /opt/opendaylight/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version} - -# ENTRYPOINT exec /opt/opendaylight/bin/karaf -EXPOSE 8181 diff --git a/opendaylight/neon/neon-karaf/pom.xml b/opendaylight/neon/neon-karaf/pom.xml deleted file mode 100644 index 7f294dfd..00000000 --- a/opendaylight/neon/neon-karaf/pom.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - org.onap.ccsdk.parent - karaf4-parent - 1.5.1-SNAPSHOT - - - - org.onap.ccsdk.distribution - odl-neon-karaf - 0.7.0-SNAPSHOT - ccsdk-distribution :: onap :: opendaylight :: neon :: karaf - 4.0.0 - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - OpenDaylight distribution build specific for ONAP projects. - - - - - 0.10.1 - false - true - - - - - - org.opendaylight.integration - all-artifacts - ${opendaylight.version} - import - pom - - - - - - - - - org.opendaylight.aaa - features-aaa - features - xml - runtime - - - - - org.opendaylight.controller - features-extras - features - xml - runtime - - - org.opendaylight.controller - features-mdsal - features - xml - runtime - - - org.opendaylight.controller - features-mdsal-benchmark - features - xml - runtime - - - org.opendaylight.controller - features-mdsal-trace - features - xml - runtime - - - - - org.opendaylight.daexim - daexim-features - features - xml - runtime - - - - - org.opendaylight.netconf - features-netconf - features - xml - runtime - - - org.opendaylight.netconf - features-netconf-connector - features - xml - runtime - - - org.opendaylight.netconf - features-restconf - features - xml - runtime - - - org.opendaylight.netconf - features-yanglib - features - xml - runtime - - - - - org.opendaylight.odlparent - features-akka - features - xml - runtime - - - org.opendaylight.odlparent - features-odlparent - features - xml - runtime - - - - org.opendaylight.aaa - aaa-cli-jar - - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-aaa-cli-jar - prepare-package - - copy-dependencies - - - ${project.build.directory}/assembly/bin - aaa-cli-jar - true - true - true - true - - true - - - - - - - - diff --git a/opendaylight/neon/neon-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg b/opendaylight/neon/neon-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg deleted file mode 100644 index cdd58378..00000000 --- a/opendaylight/neon/neon-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg +++ /dev/null @@ -1,96 +0,0 @@ -################################################################################ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -# -# If set to true, the following property will not allow any certificate to be used -# when accessing Maven repositories through SSL -# -#org.ops4j.pax.url.mvn.certificateCheck= - -# -# Path to the local Maven settings file. -# The repositories defined in this file will be automatically added to the list -# of default repositories if the 'org.ops4j.pax.url.mvn.repositories' property -# below is not set. -# The following locations are checked for the existence of the settings.xml file -# * 1. looks for the specified url -# * 2. if not found looks for ${user.home}/.m2/settings.xml -# * 3. if not found looks for ${maven.home}/conf/settings.xml -# * 4. if not found looks for ${M2_HOME}/conf/settings.xml -# -#org.ops4j.pax.url.mvn.settings= - -# -# Path to the local Maven repository which is used to avoid downloading -# artifacts when they already exist locally. -# The value of this property will be extracted from the settings.xml file -# above, or defaulted to: -# System.getProperty( "user.home" ) + "/.m2/repository" -# -org.ops4j.pax.url.mvn.localRepository=${karaf.home}/${karaf.default.repository} - -# -# Default this to false. It's just weird to use undocumented repos -# -org.ops4j.pax.url.mvn.useFallbackRepositories=false - -# -# Uncomment if you don't wanna use the proxy settings -# from the Maven conf/settings.xml file -# -# org.ops4j.pax.url.mvn.proxySupport=false - -# -# Comma separated list of repositories scanned when resolving an artifact. -# Those repositories will be checked before iterating through the -# below list of repositories and even before the local repository -# A repository url can be appended with zero or more of the following flags: -# @snapshots : the repository contains snaphots -# @noreleases : the repository does not contain any released artifacts -# -# The following property value will add the system folder as a repo. -# -org.ops4j.pax.url.mvn.defaultRepositories=\ - file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots,\ - file:${karaf.data}/kar@id=kar.repository@multi@snapshots,\ - file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots - -# Use the default local repo (e.g.~/.m2/repository) as a "remote" repo -#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote=false - -# -# Comma separated list of repositories scanned when resolving an artifact. -# The default list includes the following repositories: -# http://repo1.maven.org/maven2@id=central -# http://repository.springsource.com/maven/bundles/release@id=spring.ebr -# http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external -# http://zodiac.springsource.com/maven/bundles/release@id=gemini -# http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases -# https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases -# https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases -# To add repositories to the default ones, prepend '+' to the list of repositories -# to add. -# A repository url can be appended with zero or more of the following flags: -# @snapshots : the repository contains snapshots -# @noreleases : the repository does not contain any released artifacts -# @id=repository.id : the id for the repository, just like in the settings.xml this is optional but recommended -# -org.ops4j.pax.url.mvn.repositories= - -### ^^^ No remote repositories. This is the only ODL change compared to Karaf defaults. \ No newline at end of file diff --git a/opendaylight/neon/neon-karaf/src/main/assembly/etc/shell.init.script b/opendaylight/neon/neon-karaf/src/main/assembly/etc/shell.init.script deleted file mode 100644 index ccc9d2a7..00000000 --- a/opendaylight/neon/neon-karaf/src/main/assembly/etc/shell.init.script +++ /dev/null @@ -1,66 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// -// This script is run each time a shell is created. -// You can define here closures or variables that will be available -// in each session. -// -ld = { log:display $args } ; -lde = { log:exception-display $args } ; -la = { bundle:list -t 0 $args } ; -ls = { service:list $args } ; -cl = { config:list "(service.pid=$args)" } ; -halt = { system:shutdown -h -f $args } ; -help = { *:help $args | more } ; -man = { help $args } ; -log:list = { log:get ALL } ; -service:get = { $.context getService ($.context getServiceReference $args) }; - -env = { shell:set $args } -edit = { shell:nano $args } -more = { shell:less -F $args } - -// \#prompt = { "${USER}@${APPLICATION}(${SUBSHELL})> "?}; - -__load_class = { - (($.reader class) classLoader) loadClass $1 -} - -// make sure that we catch exceptions -// as they do occur if the session is headless / non-interactive -jlineReader = $.reader -if { %(jlineReader != null) } { - - # On 256 colors terminal, add a right prompt - max_colors = ($.jline.terminal getNumericCapability max_colors) - if { %(max_colors >= 256) } { - __rprompt_formatter = (((__load_class java.text.SimpleDateFormat) getConstructor (__load_class java.lang.String)) newInstance \'$'\u001B\[90m'\'HH:mm:ss) - __date_class = (__load_class java.util.Date) -// Do not use right prompt by default -// \#rprompt = { $__rprompt_formatter format ($__date_class newInstance) } - } - - setopt group - setopt auto-fresh-line - unsetopt insert-tab - keymap "^[OA" up-line-or-search - keymap "^[[A" up-line-or-search - keymap "^[OB" down-line-or-search - keymap "^[[B" down-line-or-search - -} diff --git a/opendaylight/neon/pom.xml b/opendaylight/neon/pom.xml index ca517995..ef13ead7 100644 --- a/opendaylight/neon/pom.xml +++ b/opendaylight/neon/pom.xml @@ -43,7 +43,6 @@ - neon-karaf - neon-docker + neon-alpine -- cgit 1.2.3-korg