Merge "Changes in RestServer.py"
diff --git a/alpine/pom.xml b/alpine/pom.xml
index 8e3a164..3aebe95 100644
--- a/alpine/pom.xml
+++ b/alpine/pom.xml
@@ -21,6 +21,7 @@
<properties>
<image.name>onap/ccsdk-alpine-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
</properties>
<build>
@@ -35,24 +36,8 @@
<goals>
<goal>execute</goal>
</goals>
- <configuration>
- <source>
- 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'];
- </source>
+ <configuration>
+ <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
</configuration>
</execution>
</executions>
@@ -106,9 +91,9 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
</tags>
</build>
</image>
diff --git a/ansible-server/pom.xml b/ansible-server/pom.xml
index a809202..662864c 100644
--- a/ansible-server/pom.xml
+++ b/ansible-server/pom.xml
@@ -1,170 +1,158 @@
<?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/maven-v4_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/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>odlparent-lite</artifactId>
- <version>1.2.1-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>1.2.1-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>pom</packaging>
- <groupId>org.onap.ccsdk.distribution</groupId>
- <artifactId>ansible-server</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.onap.ccsdk.distribution</groupId>
+ <artifactId>ansible-server</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
- <name>ccsdk :: distribution :: ${project.artifactId}</name>
- <description>Creates ansible-server Docker container</description>
+ <name>ccsdk :: distribution :: ${project.artifactId}</name>
+ <description>Creates ansible-server Docker container</description>
- <properties>
- <image.name>onap/ccsdk-ansible-server-image</image.name>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
- <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
- <docker.verbose>true</docker.verbose>
- </properties>
+ <properties>
+ <image.name>onap/ccsdk-ansible-server-image</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+ <docker.verbose>true</docker.verbose>
+ </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>
- println project.properties['ccsdk.project.version'];
- def versionArray;
- if ( project.properties['ccsdk.project.version'] != null ) {
- versionArray = project.properties['ccsdk.project.version'].split('\\.');
- }
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- 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";
- }
+ <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</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <version>1.5.0</version>
+ <executions>
+ <execution>
+ <id>change python permissions</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/find</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/ansible-server</argument>
+ <argument>-name</argument>
+ <argument>*.py</argument>
+ <argument>-exec</argument>
+ <argument>chmod</argument>
+ <argument>+x</argument>
+ <argument>{}</argument>
+ <argument>;</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
- <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</directory>
- <includes>
- <include>**/*</include>
- </includes>
- <filtering>false</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <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>
- <plugin>
- <artifactId>exec-maven-plugin</artifactId>
- <groupId>org.codehaus.mojo</groupId>
- <version>1.5.0</version>
- <executions>
- <execution>
- <id>change python permissions</id>
- <phase>process-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>/usr/bin/find</executable>
- <arguments>
- <argument>${basedir}/target/docker-stage/ansible-server</argument>
- <argument>-name</argument>
- <argument>*.py</argument>
- <argument>-exec</argument>
- <argument>chmod</argument>
- <argument>+x</argument>
- <argument>{}</argument>
- <argument>;</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.16.5</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
- <tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.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>deploy</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- <organization>
- <name>ONAP</name>
- </organization>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <organization>
+ <name>ONAP</name>
+ </organization>
</project>
diff --git a/ansible-server/src/main/Dockerfile b/ansible-server/src/main/Dockerfile
index 0555e7d..e0abb04 100644
--- a/ansible-server/src/main/Dockerfile
+++ b/ansible-server/src/main/Dockerfile
@@ -22,6 +22,8 @@
WORKDIR /opt/ansible-server
+RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
+
EXPOSE 8000
ENTRYPOINT ["python2", "RestServer.py"]
diff --git a/dgbuilder-docker/pom.xml b/dgbuilder-docker/pom.xml
index 998bc3b..2c160fc 100644
--- a/dgbuilder-docker/pom.xml
+++ b/dgbuilder-docker/pom.xml
@@ -1,5 +1,7 @@
<?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">
+<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>
@@ -22,43 +24,28 @@
<properties>
<image.name>onap/ccsdk-dgbuilder-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>
- 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'];
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <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>
@@ -90,35 +77,35 @@
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
- <execution>
- <id>Make-stage-dir</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>/bin/mkdir</executable>
- <arguments>
- <argument>-p</argument>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>Unzip dgbuilder</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>/usr/bin/unzip</executable>
- <arguments>
- <argument>-d</argument>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- <argument>../dgbuilder/target/*.zip</argument>
- </arguments>
- </configuration>
- </execution>
+ <execution>
+ <id>Make-stage-dir</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/mkdir</executable>
+ <arguments>
+ <argument>-p</argument>
+ <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Unzip dgbuilder</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/unzip</executable>
+ <arguments>
+ <argument>-d</argument>
+ <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
+ <argument>../dgbuilder/target/*.zip</argument>
+ </arguments>
+ </configuration>
+ </execution>
<execution>
<id>Copy dgbuilder</id>
<phase>generate-sources</phase>
@@ -154,7 +141,7 @@
<execution>
<id>change shell permissions</id>
- <phase>process-sources</phase>
+ <phase>process-sources</phase>
<goals>
<goal>exec</goal>
</goals>
@@ -175,57 +162,57 @@
</executions>
</plugin>
</plugins>
- </build>
+ </build>
<profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.16.5</version>
- <inherited>false</inherited>
- <configuration>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
- <tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <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>deploy</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/dgbuilder-docker/src/main/docker/Dockerfile b/dgbuilder-docker/src/main/docker/Dockerfile
index 675e37a..90ade01 100644
--- a/dgbuilder-docker/src/main/docker/Dockerfile
+++ b/dgbuilder-docker/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-ubuntu-image:${project.version}
+FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.version}
MAINTAINER CCSDK Team (onap-discuss@lists.onap.org)
# copy onap
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 20ddba5..9bdb24e 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -11,21 +11,23 @@
** Bug Fixes **
The following bugs are fixed in the CCSDK Casablanca January 2019 maintenance release:
-+-------------+--------------------------------------------------------------------+
-| Jira # | Abstract |
-+=============+====================================================================+
-| [CCSDK-727] | Do not prepend "sub" for subnet net id |
-+-------------+--------------------------------------------------------------------+
-| [CCSDK-728] | Self serve DG adjustement for unassign |
-+-------------+--------------------------------------------------------------------+
-| [CCSDK-740] | Restore inventory-response-item definition to the original version |
-+-------------+--------------------------------------------------------------------+
-| [CCSDK-765] | Upgrade jackson version to 2.8.9 |
-+-------------+--------------------------------------------------------------------+
-| [CCSDK-777] | Release version contains some snapshots |
-+-------------+--------------------------------------------------------------------+
-| [CCSDK-843] | Compile error due to old snapshot dependency |
-+-------------+--------------------------------------------------------------------+
++-------------+-------------------------------------------------------------------------------+
+| Jira # | Abstract |
++=============+===============================================================================+
+| [CCSDK-727] | Do not prepend "sub" for subnet net id |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-728] | Self serve DG adjustement for unassign |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-740] | Restore inventory-response-item definition to the original version |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-765] | Upgrade jackson version to 2.8.9 |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-777] | Release version contains some snapshots |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-843] | Compile error due to old snapshot dependency |
++-------------+-------------------------------------------------------------------------------+
+| [CCSDK-935] | restapicall JsonParser failed if response contains : as part of response body |
++-------------+-------------------------------------------------------------------------------+
**Known Issues**
The full list of known issues in CCSDK may be found in the ONAP Jira at <https://jira.onap.org/issues/?filter=11341>
diff --git a/odlsli/odlsli-alpine/pom.xml b/odlsli/odlsli-alpine/pom.xml
index 89207a9..58f71a9 100644
--- a/odlsli/odlsli-alpine/pom.xml
+++ b/odlsli/odlsli-alpine/pom.xml
@@ -24,6 +24,7 @@
<base.image.name>onap/ccsdk-odl-fluorine-alpine-image</base.image.name>
<image.name>onap/ccsdk-odlsli-alpine-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
<ccsdk.features.version>${project.version}</ccsdk.features.version>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
@@ -258,22 +259,7 @@
<goal>execute</goal>
</goals>
<configuration>
- <source>
- 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'];
- </source>
+ <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
</configuration>
</execution>
</executions>
@@ -513,9 +499,9 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
</tags>
</build>
</image>
diff --git a/odlsli/odlsli-alpine/src/main/docker/Dockerfile b/odlsli/odlsli-alpine/src/main/docker/Dockerfile
index 47b1208..b905467 100644
--- a/odlsli/odlsli-alpine/src/main/docker/Dockerfile
+++ b/odlsli/odlsli-alpine/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM ${base.image.name}:${project.version}
+FROM ${base.image.name}:${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
diff --git a/odlsli/odlsli-ubuntu/pom.xml b/odlsli/odlsli-ubuntu/pom.xml
index 488692c..8b26b49 100644
--- a/odlsli/odlsli-ubuntu/pom.xml
+++ b/odlsli/odlsli-ubuntu/pom.xml
@@ -24,6 +24,7 @@
<base.image.name>onap/ccsdk-odl-fluorine-ubuntu-image</base.image.name>
<image.name>onap/ccsdk-odlsli-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
<ccsdk.features.version>${project.version}</ccsdk.features.version>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
@@ -258,22 +259,7 @@
<goal>execute</goal>
</goals>
<configuration>
- <source>
- 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'];
- </source>
+ <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
</configuration>
</execution>
</executions>
@@ -513,9 +499,9 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
</tags>
</build>
</image>
diff --git a/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile b/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile
index fd95cba..d5460e4 100644
--- a/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile
+++ b/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM ${base.image.name}:${project.version}
+FROM ${base.image.name}:${project.docker.latestfulltag.version}
MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV ODL_HOME /opt/opendaylight
@@ -10,6 +10,8 @@
ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features
ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features
ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
+ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra}
+
# copy the opendaylight credentials
COPY idmlight.db.mv.db $ODL_HOME/data
diff --git a/opendaylight/fluorine/fluorine-alpine/pom.xml b/opendaylight/fluorine/fluorine-alpine/pom.xml
index 477effa..2d3083d 100644
--- a/opendaylight/fluorine/fluorine-alpine/pom.xml
+++ b/opendaylight/fluorine/fluorine-alpine/pom.xml
@@ -1,221 +1,209 @@
<?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>
+<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.distribution</groupId>
- <artifactId>distribution-odl-fluorine</artifactId>
- <version>0.4.1-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.onap.ccsdk.distribution</groupId>
+ <artifactId>distribution-odl-fluorine</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ </parent>
- <artifactId>distribution-odl-fluorine-alpine</artifactId>
- <version>0.4.1-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <artifactId>distribution-odl-fluorine-alpine</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
- <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
- <description>Creates OpenDaylight container</description>
- <organization>
- <name>ONAP</name>
- </organization>
+ <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
+ <description>Creates OpenDaylight container</description>
+ <organization>
+ <name>ONAP</name>
+ </organization>
- <properties>
- <image.name>onap/ccsdk-odl-fluorine-alpine-image</image.name>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version>
- <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
- <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
- <docker.push.phase>deploy</docker.push.phase>
- </properties>
+ <properties>
+ <image.name>onap/ccsdk-odl-fluorine-alpine-image</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version>
+ <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
+ <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+ <docker.push.phase>deploy</docker.push.phase>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.integration</groupId>
- <artifactId>karaf</artifactId>
- <version>${ccsdk.opendaylight.version}</version>
- <type>tar.gz</type>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- <version>${ccsdk.mariadb-connector-java.version}</version>
- <type>jar</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.integration</groupId>
+ <artifactId>karaf</artifactId>
+ <version>${ccsdk.opendaylight.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+ <dependency>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>${ccsdk.mariadb-connector-java.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <build>
- <plugins>
+ <build>
+ <plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>
- 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'];
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>get-odl-distribution</id>
- <phase>validate</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.opendaylight.integration</groupId>
- <artifactId>karaf</artifactId>
- <version>${ccsdk.opendaylight.version}</version>
- <type>tar.gz</type>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>get-odl-distribution</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.opendaylight.integration</groupId>
+ <artifactId>karaf</artifactId>
+ <version>${ccsdk.opendaylight.version}</version>
+ <type>tar.gz</type>
- <overWrite>true</overWrite>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- </artifactItem>
- </artifactItems>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
+ <overWrite>true</overWrite>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
- <execution>
- <id>get-mariadb-connector-jar</id>
- <phase>validate</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- <version>${ccsdk.mariadb-connector-java.version}</version>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- </artifactItem>
- </artifactItems>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <execution>
+ <id>get-mariadb-connector-jar</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>${ccsdk.mariadb-connector-java.version}</version>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </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>
+ <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>
- </plugins>
- </build>
+ </plugins>
+ </build>
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.16.5</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
- <tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <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>
+ <execution>
+ <id>push-images</id>
+ <phase>${docker.push.phase}</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
- </build>
- </profile>
+ </plugins>
+ </build>
+ </profile>
- </profiles>
+ </profiles>
</project>
diff --git a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile
index dc7736d..a043e1e 100644
--- a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile
+++ b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-alpine-image:${project.version}
+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
diff --git a/opendaylight/fluorine/fluorine-ubuntu/pom.xml b/opendaylight/fluorine/fluorine-ubuntu/pom.xml
index d184957..c48a415 100644
--- a/opendaylight/fluorine/fluorine-ubuntu/pom.xml
+++ b/opendaylight/fluorine/fluorine-ubuntu/pom.xml
@@ -1,221 +1,209 @@
<?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>
+<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.distribution</groupId>
- <artifactId>distribution-odl-fluorine</artifactId>
- <version>0.4.1-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.onap.ccsdk.distribution</groupId>
+ <artifactId>distribution-odl-fluorine</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ </parent>
- <artifactId>distribution-odl-fluorine-ubuntu</artifactId>
- <version>0.4.1-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <artifactId>distribution-odl-fluorine-ubuntu</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
- <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
- <description>Creates OpenDaylight container</description>
- <organization>
- <name>ONAP</name>
- </organization>
+ <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
+ <description>Creates OpenDaylight container</description>
+ <organization>
+ <name>ONAP</name>
+ </organization>
- <properties>
- <image.name>onap/ccsdk-odl-fluorine-ubuntu-image</image.name>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version>
- <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
- <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
- <docker.push.phase>deploy</docker.push.phase>
- </properties>
+ <properties>
+ <image.name>onap/ccsdk-odl-fluorine-ubuntu-image</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version>
+ <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
+ <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+ <docker.push.phase>deploy</docker.push.phase>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.integration</groupId>
- <artifactId>karaf</artifactId>
- <version>${ccsdk.opendaylight.version}</version>
- <type>tar.gz</type>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- <version>${ccsdk.mariadb-connector-java.version}</version>
- <type>jar</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.integration</groupId>
+ <artifactId>karaf</artifactId>
+ <version>${ccsdk.opendaylight.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+ <dependency>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>${ccsdk.mariadb-connector-java.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <build>
- <plugins>
+ <build>
+ <plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>
- 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'];
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>get-odl-distribution</id>
- <phase>validate</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.opendaylight.integration</groupId>
- <artifactId>karaf</artifactId>
- <version>${ccsdk.opendaylight.version}</version>
- <type>tar.gz</type>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>get-odl-distribution</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.opendaylight.integration</groupId>
+ <artifactId>karaf</artifactId>
+ <version>${ccsdk.opendaylight.version}</version>
+ <type>tar.gz</type>
- <overWrite>true</overWrite>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- </artifactItem>
- </artifactItems>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
+ <overWrite>true</overWrite>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
- <execution>
- <id>get-mariadb-connector-jar</id>
- <phase>validate</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- <version>${ccsdk.mariadb-connector-java.version}</version>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- </artifactItem>
- </artifactItems>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <execution>
+ <id>get-mariadb-connector-jar</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>${ccsdk.mariadb-connector-java.version}</version>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </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>
+ <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>
- </plugins>
- </build>
+ </plugins>
+ </build>
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.16.5</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
- <tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.16.5</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
+ <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>
+ <execution>
+ <id>push-images</id>
+ <phase>${docker.push.phase}</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
- </build>
- </profile>
+ </plugins>
+ </build>
+ </profile>
- </profiles>
+ </profiles>
</project>
diff --git a/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile b/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile
index 93811de..9c9fec0 100644
--- a/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile
+++ b/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-ubuntu-image:${project.version}
+FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.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
diff --git a/pom.xml b/pom.xml
index 851307b..85ed8a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,6 +26,7 @@
<module>dgbuilder</module>
<module>dgbuilder-docker</module>
<module>ansible-server</module>
+ <module>saltstack-server</module>
</modules>
<properties>
diff --git a/saltstack-server/README.md b/saltstack-server/README.md
new file mode 100644
index 0000000..69e47ec
--- /dev/null
+++ b/saltstack-server/README.md
@@ -0,0 +1,331 @@
+'''
+/*-
+* ============LICENSE_START=======================================================
+* ONAP : CCSDK
+* ================================================================================
+* Copyright (C) 2018 Samsung Electronics. 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=========================================================
+*/
+'''
+USING VAGRANT for CREATING SALTSTACK SERVER
+<CREATING saltstack environment is outside the scope of this adaptor, however the requirement is as follows>
+a. The SaltStack server should have it’s SSH enabled.
+b. Via ssh user account we should have the access to run saltstack command (here we will see how to enable root access via ssh and connect to server via root user).
+============
+INSTALLATION: Saltstack DEMO Environment creation:
+============
+
+1, Install VirtualBox.
+2, Install Vagrant.
+3, Download https://github.com/UtahDave/salt-vagrant-demo. You can use git or download a zip of the project directly from GitHub (sample Vagrant attached).
+4, Extract the zip file you downloaded, and then open a command prompt to the extracted directory.
+5, Run vagrant up to start the demo environment: vagrant up
+ After Vagrant ups (~10 minutes) and you are back at the command prompt, you are ready to continue.
+ More info: https://docs.saltstack.com/en/getstarted/fundamentals/
+
+============
+Configuration: Sample Saltstack server execution configuration requirement.
+============
+1, login to Master Saltstack server node:
+"sudo vi /etc/ssh/sshd_config" and SET the following
+PermitEmptyPasswords yes
+PermitRootLogin yes
+
+SAVE and close.
+
+2, Run: "sudo passwd root"
+and set the root password.
+Then run: "sudo reboot"
+
+3, On the host machine, open the virtual box set a port forwarding to the master server for 2222 -> 22
+This will redirect messages to host machine to the Vagarant Master server.
+
+============
+TESTING: Sample Saltstack server command execution.
+============
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessReal() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "127.0.0.1");
+ params.put("Port", "22");
+ params.put("User", "sdn");
+ params.put("Password", "foo");
+ params.put("Id", "test1");
+ params.put("Cmd", "ls -l");
+ params.put("SlsExec", "false");
+ params.put("Timeout", "12000");
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecCommand(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if local ssh is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessRealSLSCommand() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("Cmd", "salt '*' test.ping --out=json --static");
+ params.put("SlsExec", "false");
+ params.put("Timeout", "12000");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecCommand(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ TestId = svcContext.getAttribute("test1.minion1");
+ assertEquals(TestId, "true");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessRealCommand() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("Cmd", "cd /srv/salt/; salt '*' state.apply vim --out=json --static");
+ params.put("SlsExec", "true");
+ params.put("Timeout", "12000");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecCommand(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessRealSSL() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("SlsName", "vim");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLS(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessEnvParam() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("SlsName", "vim");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("EnvParameters", "{\"exclude\": bar*}");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLS(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessFileParam() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("SlsName", "vim");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("EnvParameters", "{\"exclude\": \"bar,baz\"}");
+ params.put("FileParameters", "{\"config.txt\":\"db_ip=10.1.1.1, sip_timer=10000\"}");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLS(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessPillarParam() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("SlsName", "vim");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("EnvParameters", "{\"exclude\": \"bar,baz\", \"pillar\":\"'{\\\"foo\\\": \\\"bar\\\"}'\"}");
+ params.put("FileParameters", "{\"config.txt\":\"db_ip=10.1.1.1, sip_timer=10000\"}");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLS(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessMultiFileParam() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("SlsName", "vim");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("EnvParameters", "{\"exclude\": bar*}");
+ params.put("FileParameters", "{\"config.txt\":\"db_ip=10.1.1.1, sip_timer=10000\" , \"config-tep.txt\":\"db_ip=10.1.1.1, sip_timer=10000\"}");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLS(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessSSLFile() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("SlsFile", "src/test/resources/config.sls");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLSFile(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
+
+ @Test
+ public void reqExecCommand_shouldSetSuccessSSLFileMultiFileParam() throws SvcLogicException,
+ IllegalStateException, IllegalArgumentException {
+
+ params.put("HostName", "<IP>");
+ params.put("Port", "2222");
+ params.put("User", "root");
+ params.put("Password", "vagrant");
+ params.put("Id", "test1");
+ params.put("Timeout", "12000");
+ params.put("NodeList", "minion1");
+ params.put("SlsFile", "src/test/resources/config.sls");
+ params.put("EnvParameters", "{\"exclude\": bar, \"pillar\":\"'{\\\"foo\\\": \\\"bar\\\"}'\"}");
+ params.put("FileParameters", "{\"config.txt\":\"db_ip=10.1.1.1, sip_timer=10000\" , \"config-tep.txt\":\"db_ip=10.1.1.1, sip_timer=10000\"}");
+
+ adapter = new SaltstackAdapterImpl();
+ try {
+ adapter.reqExecSLSFile(params, svcContext);
+ String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.result.code");
+ TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id");
+ assertEquals("200", status);
+ assertEquals(TestId, "test1");
+ } catch (Exception e){
+ //if saltstack ssh IP is not enabled
+ System.out.print(e.getMessage());
+ }
+ }
\ No newline at end of file
diff --git a/saltstack-server/pom.xml b/saltstack-server/pom.xml
new file mode 100644
index 0000000..b6d2701
--- /dev/null
+++ b/saltstack-server/pom.xml
@@ -0,0 +1,123 @@
+<?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.distribution</groupId>
+ <artifactId>distribution-root</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>saltstack-server</artifactId>
+ <version>0.4.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>ccsdk-distribution :: saltstack-server</name>
+ <description>Creates base saltstack-server Docker container</description>
+
+ <properties>
+ <image.name>onap/ccsdk-saltstack-server-image</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <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>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.26.0</version>
+ <inherited>false</inherited>
+ <configuration>
+
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>Dockerfile</dockerFile>
+ <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>generate-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/saltstack-server/src/main/docker/Dockerfile b/saltstack-server/src/main/docker/Dockerfile
new file mode 100644
index 0000000..f2e486e
--- /dev/null
+++ b/saltstack-server/src/main/docker/Dockerfile
@@ -0,0 +1,13 @@
+FROM centos:7
+
+
+RUN yum clean all && \
+ yum install -y yum install epel-release && \
+ yum install -y https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el7.noarch.rpm && \
+ yum update -y && \
+ yum install -y sudo git tmux vim salt-master salt-minion && \
+ yum clean all
+
+EXPOSE 4505 4506
+
+CMD /usr/bin/salt-master -d; /bin/bash
\ No newline at end of file
diff --git a/saltstack-server/src/main/vagrant/Vagrantfile-sample b/saltstack-server/src/main/vagrant/Vagrantfile-sample
new file mode 100644
index 0000000..5fbcfbb
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/Vagrantfile-sample
@@ -0,0 +1,69 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ os = "bento/ubuntu-16.04"
+ net_ip = "192.168.50"
+
+ config.vm.define :master, primary: true do |master_config|
+ master_config.vm.provider "virtualbox" do |vb|
+ vb.memory = "2048"
+ vb.cpus = 1
+ vb.name = "master"
+ end
+ master_config.vm.box = "#{os}"
+ master_config.vm.host_name = 'saltmaster.local'
+ master_config.vm.network "private_network", ip: "#{net_ip}.10"
+ master_config.vm.synced_folder "saltstack/salt/", "/srv/salt"
+ master_config.vm.synced_folder "saltstack/pillar/", "/srv/pillar"
+
+ master_config.vm.provision :salt do |salt|
+ salt.master_config = "saltstack/etc/master"
+ salt.master_key = "saltstack/keys/master_minion.pem"
+ salt.master_pub = "saltstack/keys/master_minion.pub"
+ salt.minion_key = "saltstack/keys/master_minion.pem"
+ salt.minion_pub = "saltstack/keys/master_minion.pub"
+ salt.seed_master = {
+ "minion1" => "saltstack/keys/minion1.pub",
+ "minion2" => "saltstack/keys/minion2.pub"
+ }
+
+ salt.install_type = "stable"
+ salt.install_master = true
+ salt.no_minion = true
+ salt.verbose = true
+ salt.colorize = true
+ salt.bootstrap_options = "-P -c /tmp"
+ end
+ end
+
+
+ [
+ ["minion1", "#{net_ip}.11", "1024", os ],
+ ["minion2", "#{net_ip}.12", "1024", os ],
+ ].each do |vmname,ip,mem,os|
+ config.vm.define "#{vmname}" do |minion_config|
+ minion_config.vm.provider "virtualbox" do |vb|
+ vb.memory = "#{mem}"
+ vb.cpus = 1
+ vb.name = "#{vmname}"
+ end
+ minion_config.vm.box = "#{os}"
+ minion_config.vm.hostname = "#{vmname}"
+ minion_config.vm.network "private_network", ip: "#{ip}"
+
+ minion_config.vm.provision :salt do |salt|
+ salt.minion_config = "saltstack/etc/#{vmname}"
+ salt.minion_key = "saltstack/keys/#{vmname}.pem"
+ salt.minion_pub = "saltstack/keys/#{vmname}.pub"
+ salt.install_type = "stable"
+ salt.verbose = true
+ salt.colorize = true
+ salt.bootstrap_options = "-P -c /tmp"
+ end
+ end
+ end
+ end
\ No newline at end of file
diff --git a/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml b/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml
new file mode 100644
index 0000000..b96773e
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/saltstack_sample_sls-2.yml
@@ -0,0 +1,34 @@
+# /*-
+# * ============LICENSE_START=======================================================
+# * ONAP : CCSDK
+# * ================================================================================
+# * Copyright (C) 2018 Samsung Electronics. 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=========================================================
+# */
+
+my-vim:
+ git.latest:
+ - name: https://github.com/nbari/my-vim
+ - target: /usr/local/share/my-vim
+ - rev: master
+ - submodules: True
+ cmd.wait:
+ - name: 'cd /usr/local/share/my-vim; git submodule init; git submodule foreach git pull origin master; git submodule update'
+ - watch:
+ - git: my-vim
\ No newline at end of file
diff --git a/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml b/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml
new file mode 100644
index 0000000..84cc917
--- /dev/null
+++ b/saltstack-server/src/main/vagrant/saltstact_sample_sls.yml
@@ -0,0 +1,26 @@
+# /*-
+# * ============LICENSE_START=======================================================
+# * ONAP : CCSDK
+# * ================================================================================
+# * Copyright (C) 2018 Samsung Electronics. 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=========================================================
+# */
+
+vim:
+ pkg.installed
diff --git a/src/main/scripts/TagVersion.groovy b/src/main/scripts/TagVersion.groovy
new file mode 100644
index 0000000..68a8b78
--- /dev/null
+++ b/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.onap.ccsdk.distribution
+
+
+def versionArray;
+if ( project.properties['ccsdk.project.version'] != null ) {
+ versionArray = project.properties['ccsdk.project.version'].split('\\.');
+}
+
+if ( project.properties['ccsdk.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/ubuntu/pom.xml b/ubuntu/pom.xml
index 8f17a98..c4f53b2 100644
--- a/ubuntu/pom.xml
+++ b/ubuntu/pom.xml
@@ -21,6 +21,8 @@
<properties>
<image.name>onap/ccsdk-ubuntu-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
</properties>
<build>
@@ -36,23 +38,7 @@
<goal>execute</goal>
</goals>
<configuration>
- <source>
- 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'];
- </source>
+ <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
</configuration>
</execution>
</executions>
@@ -106,9 +92,9 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
</tags>
</build>
</image>