From 5fed19f93bdbacf1df3189b453c18c0991f80865 Mon Sep 17 00:00:00 2001 From: herbert Date: Wed, 11 Mar 2020 18:38:19 +0100 Subject: [PATCH] Add distribution nonrtric distribution based on sdnc frankfurt Issue-ID: OAM-61 Signed-off-by: herbert Change-Id: I0af2e38d2af5f41b10451772a2c60d80b0dc0a54 Signed-off-by: herbert --- distribution/README.md | 2 +- .../nonrtric-o1-controller-frankfurt/pom.xml | 163 +++++++++++++++++++++ .../src/main/docker/Dockerfile | 12 ++ .../src/main/scripts/TagVersion.groovy | 41 ++++++ distribution/nonrtric-o1-controller/README.md | 3 - distribution/pom.xml | 32 ---- features/devicemanager/o-ran/ru-fh/feature/pom.xml | 4 +- .../devicemanager/o-ran/ru-fh/installer/pom.xml | 4 +- features/devicemanager/o-ran/ru-fh/model/pom.xml | 4 +- .../devicemanager/o-ran/ru-fh/provider/pom.xml | 8 +- features/devicemanager/x-ran/ru-fh/pom.xml | 7 +- .../devicemanager/x-ran/ru-fh/provider/pom.xml | 1 - features/pom.xml | 11 +- 13 files changed, 239 insertions(+), 53 deletions(-) create mode 100644 distribution/nonrtric-o1-controller-frankfurt/pom.xml create mode 100644 distribution/nonrtric-o1-controller-frankfurt/src/main/docker/Dockerfile create mode 100644 distribution/nonrtric-o1-controller-frankfurt/src/main/scripts/TagVersion.groovy delete mode 100644 distribution/nonrtric-o1-controller/README.md delete mode 100644 distribution/pom.xml diff --git a/distribution/README.md b/distribution/README.md index 7fe48e3..8e6348e 100644 --- a/distribution/README.md +++ b/distribution/README.md @@ -1,3 +1,3 @@ # Distribution -This directory contains OAM related software artifacts realted to the packaging and distributing code. \ No newline at end of file +This directory contains OAM related software artifacts realted to the packaging and distributing code. diff --git a/distribution/nonrtric-o1-controller-frankfurt/pom.xml b/distribution/nonrtric-o1-controller-frankfurt/pom.xml new file mode 100644 index 0000000..ae18224 --- /dev/null +++ b/distribution/nonrtric-o1-controller-frankfurt/pom.xml @@ -0,0 +1,163 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.5.2-SNAPSHOT + + + + org.o-ran-sc.oam.distribution + nonrtric-o1-controller + 1.8.0-SNAPSHOT + pom + + sdnc-distribution :: o-ran-sc :: nonrtric-o1-controller + + nonrtric-o1-controller based on ONAP SDNC + + + O-RAN-SC/OAM + + + + nexus3.onap.org:10001/onap/sdnc-image:1.8.0-STAGING-20200225T124813Z + o-ran-sc/${project.artifactId} + ${maven.build.timestamp} + ${project.version} + 0.7.1-SNAPSHOT + mvn:org.o-ran-sc.oam.features.devicemanager/devicemanager-oran-ru-fh-feature/${o-ran-sc.features.version}/xml/features, mvn:org.o-ran-sc.oam.features.devicemanager/devicemanager-xran-ru-fh-feature/${o-ran-sc.features.version}/xml/features + sdnr-wt-feature-aggregator,devicemanager-oran-ru-fh-feature + ${project.version} + ${https_proxy} + yyyyMMdd'T'HHmmss'Z' + opt/opendaylight + deploy + true + + + + + + org.o-ran-sc.oam.features.devicemanager + devicemanager-oran-ru-fh-installer + ${o-ran-sc.features.version} + zip + repo + + + + + + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + ${basedir}/src/main/scripts/TagVersion.groovy + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + Dockerfile + + true + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack features + generate-sources + + unpack-dependencies + + + ${basedir}/target/docker-stage + true + false + true + true + + + + + + io.fabric8 + docker-maven-plugin + 0.28.0 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + + ${project.docker.latestminortag.version} + ${project.docker.latestfulltag.version} + ${project.docker.latesttagtimestamp.version} + + + + + + + + generate-images + package + + build + + + + push-images + ${docker.push.phase} + + build + push + + + + + + + + org.apache.maven.wagon + wagon-http-lightweight + 2.2 + + + + diff --git a/distribution/nonrtric-o1-controller-frankfurt/src/main/docker/Dockerfile b/distribution/nonrtric-o1-controller-frankfurt/src/main/docker/Dockerfile new file mode 100644 index 0000000..9df3280 --- /dev/null +++ b/distribution/nonrtric-o1-controller-frankfurt/src/main/docker/Dockerfile @@ -0,0 +1,12 @@ +# Base odl alpine with added packages needed for +FROM ${base.image.repo} +ENV SDNR_ORAN_REPO ${features.repo} +RUN sed -i -e "\|featuresRepositories|s|$|,${SDNR_ORAN_REPO}|" $ODL_HOME/etc/org.apache.karaf.features.cfg +ENV SDNRWT_BOOTFEATURES ${features.boot} + +USER root +# copy CCSDK mvn artifacts to ODL repository +COPY system /tmp/system +RUN rsync -a /tmp/system $ODL_HOME && rm -rf /tmp/system +RUN chown -R odl:odl $ODL_HOME +USER odl diff --git a/distribution/nonrtric-o1-controller-frankfurt/src/main/scripts/TagVersion.groovy b/distribution/nonrtric-o1-controller-frankfurt/src/main/scripts/TagVersion.groovy new file mode 100644 index 0000000..e2c317d --- /dev/null +++ b/distribution/nonrtric-o1-controller-frankfurt/src/main/scripts/TagVersion.groovy @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CCSDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.oransc.oam.distribution + + +def versionArray; +if ( project.properties['o-ran-sc.project.version'] != null ) { + versionArray = project.properties['o-ran-sc.project.version'].split('\\.'); +} + +if ( project.properties['o-ran-sc.project.version'].endsWith("-SNAPSHOT") ) { + patchArray = versionArray[2].split('-'); + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-"+project.properties['ccsdk.build.timestamp']; +} else { + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-"+project.properties['ccsdk.build.timestamp']; +} diff --git a/distribution/nonrtric-o1-controller/README.md b/distribution/nonrtric-o1-controller/README.md deleted file mode 100644 index c416175..0000000 --- a/distribution/nonrtric-o1-controller/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Distribution - - This directory contains OAM related software artifacts realted to the packaging and distributing code. \ No newline at end of file diff --git a/distribution/pom.xml b/distribution/pom.xml deleted file mode 100644 index eefca7c..0000000 --- a/distribution/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - 4.0.0 - - org.o-ran-sc.oam - nonrtric-o1 - 1.0.0-SNAPSHOT - pom - - nonrtric-o1 - - nonrtric-o1-controller - - diff --git a/features/devicemanager/o-ran/ru-fh/feature/pom.xml b/features/devicemanager/o-ran/ru-fh/feature/pom.xml index 9473e1b..a6eb0c9 100644 --- a/features/devicemanager/o-ran/ru-fh/feature/pom.xml +++ b/features/devicemanager/o-ran/ru-fh/feature/pom.xml @@ -38,13 +38,13 @@ 0.7.1-SNAPSHOT feature - o-ran-sc-features :: ${project.artifactId} + o-ran-sc-features :: ${project.artifactId} ${project.groupId} devicemanager-oran-ru-fh-provider - ${project.version} + ${project.version} diff --git a/features/devicemanager/o-ran/ru-fh/installer/pom.xml b/features/devicemanager/o-ran/ru-fh/installer/pom.xml index d337571..8b9d460 100644 --- a/features/devicemanager/o-ran/ru-fh/installer/pom.xml +++ b/features/devicemanager/o-ran/ru-fh/installer/pom.xml @@ -35,10 +35,10 @@ org.o-ran-sc.oam.features.devicemanager devicemanager-oran-ru-fh-installer - 0.7.1-SNAPSHOT + 0.7.1-SNAPSHOT pom - o-ran-sc-features :: ${project.artifactId} + o-ran-sc-features :: ${project.artifactId} devicemanager-oran-ru-fh diff --git a/features/devicemanager/o-ran/ru-fh/model/pom.xml b/features/devicemanager/o-ran/ru-fh/model/pom.xml index 13ef3e3..bfb761e 100644 --- a/features/devicemanager/o-ran/ru-fh/model/pom.xml +++ b/features/devicemanager/o-ran/ru-fh/model/pom.xml @@ -35,10 +35,10 @@ org.o-ran-sc.oam.features.devicemanager devicemanager-oran-ru-fh-model - 0.7.1-SNAPSHOT + 0.7.1-SNAPSHOT bundle - o-ran-sc-features :: ${project.artifactId} + o-ran-sc-features :: ${project.artifactId} Apache License, Version 2.0 diff --git a/features/devicemanager/o-ran/ru-fh/provider/pom.xml b/features/devicemanager/o-ran/ru-fh/provider/pom.xml index aac7ef2..2d0da91 100644 --- a/features/devicemanager/o-ran/ru-fh/provider/pom.xml +++ b/features/devicemanager/o-ran/ru-fh/provider/pom.xml @@ -35,10 +35,10 @@ org.o-ran-sc.oam.features.devicemanager devicemanager-oran-ru-fh-provider - 0.7.1-SNAPSHOT + 0.7.1-SNAPSHOT bundle - o-ran-sc-features :: ${project.artifactId} + o-ran-sc-features :: ${project.artifactId} Apache License, Version 2.0 @@ -65,8 +65,8 @@ ${project.groupId} - devicemanager-oran-ru-fh-model - ${project.version} + devicemanager-oran-ru-fh-model + ${project.version} org.onap.ccsdk.features.sdnr.wt diff --git a/features/devicemanager/x-ran/ru-fh/pom.xml b/features/devicemanager/x-ran/ru-fh/pom.xml index c98f499..f2e8db9 100755 --- a/features/devicemanager/x-ran/ru-fh/pom.xml +++ b/features/devicemanager/x-ran/ru-fh/pom.xml @@ -40,10 +40,6 @@ o-ran-sc-features :: ${project.artifactId} - - devicemanager-xran-ru-fh - - model provider @@ -51,4 +47,7 @@ installer + + devicemanager-xran-ru-fh + diff --git a/features/devicemanager/x-ran/ru-fh/provider/pom.xml b/features/devicemanager/x-ran/ru-fh/provider/pom.xml index 2e5ffac..7c781ee 100644 --- a/features/devicemanager/x-ran/ru-fh/provider/pom.xml +++ b/features/devicemanager/x-ran/ru-fh/provider/pom.xml @@ -39,7 +39,6 @@ bundle o-ran-sc-features :: ${project.artifactId} - Apache License, Version 2.0 diff --git a/features/pom.xml b/features/pom.xml index 95d586d..792fa54 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -16,16 +16,23 @@ # limitations under the License. # --> - + 4.0.0 + + org.onap.ccsdk.parent + odlparent-lite + 1.5.2-SNAPSHOT + + + org.o-ran-sc.oam.features features-top 0.7.1-SNAPSHOT pom o-ran-sc features + devicemanager/o-ran/ru-fh devicemanager/x-ran/ru-fh -- 2.16.6