diff options
18 files changed, 369 insertions, 15 deletions
diff --git a/aai-service/installer/pom.xml b/aai-service/installer/pom.xml index 7e91aa74..1e951f80 100755 --- a/aai-service/installer/pom.xml +++ b/aai-service/installer/pom.xml @@ -61,12 +61,12 @@ </goals> <phase>package</phase> <configuration> - <attach>false</attach> + <attach>true</attach> <finalName>stage/${application.name}-${project.version}</finalName> <descriptors> <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> </descriptors> - <appendAssemblyId>false</appendAssemblyId> + <appendAssemblyId>true</appendAssemblyId> </configuration> </execution> <execution> diff --git a/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml b/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml index 2ee22447..9cdc7887 100644 --- a/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -25,7 +25,7 @@ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>mvnrepo_zip</id> + <id>repo</id> <formats> <format>zip</format> </formats> diff --git a/ansible-adapter/ansible-adapter-installer/pom.xml b/ansible-adapter/ansible-adapter-installer/pom.xml index 7dcaab5e..02262acf 100644 --- a/ansible-adapter/ansible-adapter-installer/pom.xml +++ b/ansible-adapter/ansible-adapter-installer/pom.xml @@ -79,8 +79,8 @@ </goals> <phase>package</phase> <configuration> - <appendAssemblyId>false</appendAssemblyId> - <attach>false</attach> + <appendAssemblyId>true</appendAssemblyId> + <attach>true</attach> <finalName>stage/${application.name}-${project.version}</finalName> <descriptors> <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> diff --git a/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml b/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml index 615ee37d..ec65e79e 100644 --- a/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml @@ -28,7 +28,7 @@ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>adapter</id> + <id>repo</id> <formats> <format>zip</format> </formats> diff --git a/features/ccsdk-sli-adaptors-all/pom.xml b/features/ccsdk-sli-adaptors-all/pom.xml new file mode 100644 index 00000000..3a9f034c --- /dev/null +++ b/features/ccsdk-sli-adaptors-all/pom.xml @@ -0,0 +1,77 @@ +<?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>single-feature-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>ccsdk-sli-adaptors-all</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>feature</packaging> + + <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>mdsal-model-artifacts</artifactId> + <version>${odl.mdsal.model.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.controller</groupId> + <artifactId>mdsal-artifacts</artifactId> + <version>${odl.mdsal.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-aai-service</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-ansible-adapter</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-mdsal-resource</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-resource-assignment</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-sql-resource</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + + </dependencies> +</project> diff --git a/features/features-sli-adaptors/pom.xml b/features/features-sli-adaptors/pom.xml new file mode 100644 index 00000000..de1b9b8d --- /dev/null +++ b/features/features-sli-adaptors/pom.xml @@ -0,0 +1,29 @@ +<?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>feature-repo-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>features-sli-adaptors</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>feature</packaging> + + <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-sli-adaptors-all</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + + </dependencies> +</project> diff --git a/features/installer/pom.xml b/features/installer/pom.xml new file mode 100755 index 00000000..be20d9f5 --- /dev/null +++ b/features/installer/pom.xml @@ -0,0 +1,137 @@ +<?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.1.0-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>sliadaptors-features-installer</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name> + + <properties> + <application.name>ccsdk-sli-adaptors-all</application.name> + <features.boot>${application.name}</features.boot> + <features.repositories>mvn:org.onap.ccsdk.sli.adaptors/${features.boot}/${project.version}/xml/features</features.repositories> + <include.transitive.dependencies>false</include.transitive.dependencies> + </properties> + + <dependencies> + + <dependency> + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>${application.name}</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + + + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>maven-repo-zip</id> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <attach>true</attach> + <finalName>stage/${application.name}-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> + </descriptors> + <appendAssemblyId>true</appendAssemblyId> + </configuration> + </execution> + <execution> + <id>installer-zip</id> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <attach>true</attach> + <finalName>${application.name}-${project.version}-installer</finalName> + <descriptors> + <descriptor>src/assembly/assemble_installer_zip.xml</descriptor> + </descriptors> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <transitive>false</transitive> + <outputDirectory>${project.build.directory}/assembly/system</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <useRepositoryLayout>true</useRepositoryLayout> + <addParentPoms>false</addParentPoms> + <copyPom>false</copyPom> + <includeGroupIds>org.onap.ccsdk.sli.adaptors</includeGroupIds> + <scope>provided</scope> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-version</id> + <goals> + <goal>copy-resources</goal> + </goals><!-- here the phase you need --> + <phase>validate</phase> + <configuration> + <outputDirectory>${basedir}/target/stage</outputDirectory> + <resources> + <resource> + <directory>src/main/resources/scripts</directory> + <includes> + <include>install-feature.sh</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/features/installer/src/assembly/assemble_installer_zip.xml b/features/installer/src/assembly/assemble_installer_zip.xml new file mode 100755 index 00000000..a6a22a9b --- /dev/null +++ b/features/installer/src/assembly/assemble_installer_zip.xml @@ -0,0 +1,39 @@ +<!-- Defines how we build the .zip file which is our distribution. --> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>bin</id> + + <formats> + <format>zip</format> + </formats> + + <!-- we want "system" and related files right at the root level + as this file is suppose to be unzip on top of a karaf + distro. --> + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + <fileSet> + <directory>target/stage/</directory> + <outputDirectory>${application.name}</outputDirectory> + <fileMode>755</fileMode> + <includes> + <include>*.sh</include> + </includes> + </fileSet> + <fileSet> + <directory>target/stage/</directory> + <outputDirectory>${application.name}</outputDirectory> + <fileMode>644</fileMode> + <excludes> + <exclude>*.sh</exclude> + </excludes> + </fileSet> + </fileSets> + + + +</assembly> diff --git a/features/installer/src/assembly/assemble_mvnrepo_zip.xml b/features/installer/src/assembly/assemble_mvnrepo_zip.xml new file mode 100755 index 00000000..86b07f1f --- /dev/null +++ b/features/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -0,0 +1,29 @@ +<!-- Defines how we build the .zip file which is our distribution. --> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>repo</id> + + <formats> + <format>zip</format> + </formats> + + <!-- we want "system" and related files right at the root level + as this file is suppose to be unzip on top of a karaf + distro. --> + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + <fileSet> + <directory>target/assembly/</directory> + <outputDirectory>.</outputDirectory> + <excludes> + </excludes> + </fileSet> + </fileSets> + + + +</assembly> diff --git a/features/installer/src/main/resources/scripts/install-feature.sh b/features/installer/src/main/resources/scripts/install-feature.sh new file mode 100644 index 00000000..e16e79a1 --- /dev/null +++ b/features/installer/src/main/resources/scripts/install-feature.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} +INSTALLERDIR=$(dirname $0) + +REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip + +if [ -f ${REPOZIP} ] +then + unzip -d ${ODL_HOME} ${REPOZIP} +else + echo "ERROR : repo zip ($REPOZIP) not found" + exit 1 +fi + +${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} feature:install ${features.boot} diff --git a/features/pom.xml b/features/pom.xml new file mode 100755 index 00000000..5fb7be02 --- /dev/null +++ b/features/pom.xml @@ -0,0 +1,24 @@ +<?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.1.0-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>sliadaptors-feature-aggregator</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>ccsdk-sli-adaptors :: features</name> + + <modules> + <module>ccsdk-sli-adaptors-all</module> + <module>features-sli-adaptors</module> + <module>installer</module> + </modules> +</project> diff --git a/mdsal-resource/installer/pom.xml b/mdsal-resource/installer/pom.xml index 86792f44..b4203b21 100755 --- a/mdsal-resource/installer/pom.xml +++ b/mdsal-resource/installer/pom.xml @@ -61,12 +61,12 @@ </goals> <phase>package</phase> <configuration> - <attach>false</attach> + <attach>true</attach> <finalName>stage/${application.name}-${project.version}</finalName> <descriptors> <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> </descriptors> - <appendAssemblyId>false</appendAssemblyId> + <appendAssemblyId>true</appendAssemblyId> </configuration> </execution> <execution> diff --git a/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml index 2ee22447..9cdc7887 100644 --- a/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -25,7 +25,7 @@ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>mvnrepo_zip</id> + <id>repo</id> <formats> <format>zip</format> </formats> @@ -111,6 +111,7 @@ <module>mdsal-resource</module> <module>resource-assignment</module> <module>sql-resource</module> + <module>features</module> </modules> <organization> <name>ONAP</name> diff --git a/resource-assignment/installer/pom.xml b/resource-assignment/installer/pom.xml index 6853619c..40e7bce6 100755 --- a/resource-assignment/installer/pom.xml +++ b/resource-assignment/installer/pom.xml @@ -76,12 +76,12 @@ </goals> <phase>package</phase> <configuration> - <attach>false</attach> + <attach>true</attach> <finalName>stage/${application.name}-${project.version}</finalName> <descriptors> <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> </descriptors> - <appendAssemblyId>false</appendAssemblyId> + <appendAssemblyId>true</appendAssemblyId> </configuration> </execution> <execution> diff --git a/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml b/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml index 755df5b2..9b4a25f4 100644 --- a/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -25,7 +25,7 @@ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>mvnrepo_zip</id> + <id>repo</id> <formats> <format>zip</format> </formats> diff --git a/sql-resource/installer/pom.xml b/sql-resource/installer/pom.xml index 7e5efd55..fff8559f 100755 --- a/sql-resource/installer/pom.xml +++ b/sql-resource/installer/pom.xml @@ -61,12 +61,12 @@ </goals> <phase>package</phase> <configuration> - <attach>false</attach> + <attach>true</attach> <finalName>stage/${application.name}-${project.version}</finalName> <descriptors> <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor> </descriptors> - <appendAssemblyId>false</appendAssemblyId> + <appendAssemblyId>true</appendAssemblyId> </configuration> </execution> <execution> diff --git a/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml index cb56f2cd..35e79db1 100644 --- a/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -25,7 +25,7 @@ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>mvnrepo_zip</id> + <id>repo</id> <formats> <format>zip</format> </formats> |