Add distribution nonrtric 62/2762/1
authorherbert <herbert.eiselt@highstreet-technologies.com>
Wed, 11 Mar 2020 17:38:19 +0000 (18:38 +0100)
committerherbert <herbert.eiselt@highstreet-technologies.com>
Wed, 11 Mar 2020 17:39:36 +0000 (18:39 +0100)
distribution based on sdnc frankfurt

Issue-ID: OAM-61
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I0af2e38d2af5f41b10451772a2c60d80b0dc0a54
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
13 files changed:
distribution/README.md
distribution/nonrtric-o1-controller-frankfurt/pom.xml [new file with mode: 0644]
distribution/nonrtric-o1-controller-frankfurt/src/main/docker/Dockerfile [new file with mode: 0644]
distribution/nonrtric-o1-controller-frankfurt/src/main/scripts/TagVersion.groovy [new file with mode: 0644]
distribution/nonrtric-o1-controller/README.md [deleted file]
distribution/pom.xml [deleted file]
features/devicemanager/o-ran/ru-fh/feature/pom.xml
features/devicemanager/o-ran/ru-fh/installer/pom.xml
features/devicemanager/o-ran/ru-fh/model/pom.xml
features/devicemanager/o-ran/ru-fh/provider/pom.xml
features/devicemanager/x-ran/ru-fh/pom.xml
features/devicemanager/x-ran/ru-fh/provider/pom.xml
features/pom.xml

index 7fe48e3..8e6348e 100644 (file)
@@ -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 (file)
index 0000000..ae18224
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.ccsdk.parent</groupId>
+    <artifactId>odlparent-lite</artifactId>
+    <version>1.5.2-SNAPSHOT</version>
+    <relativePath />
+  </parent>
+
+  <groupId>org.o-ran-sc.oam.distribution</groupId>
+  <artifactId>nonrtric-o1-controller</artifactId>
+  <version>1.8.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>sdnc-distribution :: o-ran-sc :: nonrtric-o1-controller</name>
+
+  <description>nonrtric-o1-controller based on ONAP SDNC</description>
+
+  <organization>
+    <name>O-RAN-SC/OAM</name>
+  </organization>
+
+  <properties>
+    <base.image.repo>nexus3.onap.org:10001/onap/sdnc-image:1.8.0-STAGING-20200225T124813Z</base.image.repo>
+    <image.name>o-ran-sc/${project.artifactId}</image.name>
+    <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+    <o-ran-sc.project.version>${project.version}</o-ran-sc.project.version>
+    <o-ran-sc.features.version>0.7.1-SNAPSHOT</o-ran-sc.features.version>
+    <features.repo>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</features.repo>
+    <features.boot>sdnr-wt-feature-aggregator,devicemanager-oran-ru-fh-feature</features.boot>
+    <platform-logic-installer.version>${project.version}</platform-logic-installer.version>
+    <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+    <opendaylight.root>opt/opendaylight</opendaylight.root>
+    <docker.push.phase>deploy</docker.push.phase>
+    <docker.verbose>true</docker.verbose>
+
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.o-ran-sc.oam.features.devicemanager</groupId>
+      <artifactId>devicemanager-oran-ru-fh-installer</artifactId>
+      <version>${o-ran-sc.features.version}</version>
+      <type>zip</type>
+      <classifier>repo</classifier>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.groovy.maven</groupId>
+        <artifactId>gmaven-plugin</artifactId>
+        <version>1.0</version>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>execute</goal>
+            </goals>
+            <configuration>
+              <source>${basedir}/src/main/scripts/TagVersion.groovy</source>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>copy-dockerfile</id>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>            <!-- here the phase you need -->
+            <phase>validate</phase>
+            <configuration>
+              <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/docker</directory>
+                  <includes>
+                    <include>Dockerfile</include>
+                  </includes>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack features</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+              <excludeTransitive>true</excludeTransitive>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+              <overWriteIfNewer>true</overWriteIfNewer>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>io.fabric8</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+        <version>0.28.0</version>
+        <inherited>false</inherited>
+        <configuration>
+          <images>
+            <image>
+              <name>${image.name}</name>
+              <build>
+                <cleanup>try</cleanup>
+                <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                <tags>
+                  <tag>${project.docker.latestminortag.version}</tag>
+                  <tag>${project.docker.latestfulltag.version}</tag>
+                  <tag>${project.docker.latesttagtimestamp.version}</tag>
+                </tags>
+              </build>
+            </image>
+          </images>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-images</id>
+            <phase>package</phase>
+            <goals>
+              <goal>build</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>push-images</id>
+            <phase>${docker.push.phase}</phase>
+            <goals>
+              <goal>build</goal>
+              <goal>push</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    <extensions>
+      <extension><!-- this extension is required by wagon in order to pass the proxy -->
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-http-lightweight</artifactId>
+        <version>2.2</version>
+      </extension>
+    </extensions>
+  </build>
+</project>
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 (file)
index 0000000..9df3280
--- /dev/null
@@ -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 (file)
index 0000000..e2c317d
--- /dev/null
@@ -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 (file)
index c416175..0000000
+++ /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 (file)
index eefca7c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-################################################################################
-# Copyright 2019 highstreet technologies and others
-#
-# 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.
-#
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.o-ran-sc.oam</groupId>
-  <artifactId>nonrtric-o1</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-
-  <name>nonrtric-o1</name>
-  <modules>
-    <module>nonrtric-o1-controller</module>
-  </modules>
-</project>
index 9473e1b..a6eb0c9 100644 (file)
     <version>0.7.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
-       <name>o-ran-sc-features :: ${project.artifactId}</name>
+    <name>o-ran-sc-features :: ${project.artifactId}</name>
 
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>devicemanager-oran-ru-fh-provider</artifactId>
-               <version>${project.version}</version>
+            <version>${project.version}</version>
         </dependency>
     </dependencies>
 </project>
index d337571..8b9d460 100644 (file)
 
     <groupId>org.o-ran-sc.oam.features.devicemanager</groupId>
     <artifactId>devicemanager-oran-ru-fh-installer</artifactId>
-     <version>0.7.1-SNAPSHOT</version>
+    <version>0.7.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-       <name>o-ran-sc-features :: ${project.artifactId}</name>
+    <name>o-ran-sc-features :: ${project.artifactId}</name>
 
     <properties>
         <application.name>devicemanager-oran-ru-fh</application.name>
index 13ef3e3..bfb761e 100644 (file)
 
     <groupId>org.o-ran-sc.oam.features.devicemanager</groupId>
     <artifactId>devicemanager-oran-ru-fh-model</artifactId>
-     <version>0.7.1-SNAPSHOT</version>
+    <version>0.7.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
-       <name>o-ran-sc-features :: ${project.artifactId}</name>
+    <name>o-ran-sc-features :: ${project.artifactId}</name>
     <licenses>
         <license>
             <name>Apache License, Version 2.0</name>
index aac7ef2..2d0da91 100644 (file)
 
     <groupId>org.o-ran-sc.oam.features.devicemanager</groupId>
     <artifactId>devicemanager-oran-ru-fh-provider</artifactId>
-     <version>0.7.1-SNAPSHOT</version>
+    <version>0.7.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
-       <name>o-ran-sc-features :: ${project.artifactId}</name>
+    <name>o-ran-sc-features :: ${project.artifactId}</name>
     <licenses>
         <license>
             <name>Apache License, Version 2.0</name>
@@ -65,8 +65,8 @@
         <!-- end for testing -->
         <dependency>
             <groupId>${project.groupId}</groupId>
-               <artifactId>devicemanager-oran-ru-fh-model</artifactId>
-               <version>${project.version}</version>
+            <artifactId>devicemanager-oran-ru-fh-model</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
index c98f499..f2e8db9 100755 (executable)
 
     <name>o-ran-sc-features :: ${project.artifactId}</name>
 
-    <properties>
-        <feature-name>devicemanager-xran-ru-fh</feature-name>
-    </properties>
-
     <modules>
         <module>model</module>
         <module>provider</module>
@@ -51,4 +47,7 @@
         <module>installer</module>
     </modules>
 
+    <properties>
+        <feature-name>devicemanager-xran-ru-fh</feature-name>
+    </properties>
 </project>
index 2e5ffac..7c781ee 100644 (file)
@@ -39,7 +39,6 @@
     <packaging>bundle</packaging>
 
     <name>o-ran-sc-features :: ${project.artifactId}</name>
-
     <licenses>
         <license>
             <name>Apache License, Version 2.0</name>
index 95d586d..792fa54 100644 (file)
 # limitations under the License.
 #
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
+  <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>odlparent-lite</artifactId>
+        <version>1.5.2-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
   <groupId>org.o-ran-sc.oam.features</groupId>
   <artifactId>features-top</artifactId>
   <version>0.7.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>o-ran-sc features</name>
+
   <modules>
     <module>devicemanager/o-ran/ru-fh</module>
     <module>devicemanager/x-ran/ru-fh</module>