From 99fe1a5e5cd8348d6a7e501691d4b78eca97393b Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 29 Mar 2018 12:31:45 -0400 Subject: Add ansible adapter to CCSDK Copy APP-C Ansible adaptor to CCSDK Change-Id: Ie7f0662befd5cff446f2b2351a233bcfa7d6f4c0 Issue-ID: CCSDK-172 Signed-off-by: Timoney, Dan (dt5972) --- .../src/assembly/assemble_installer_zip.xml | 62 ++++++++++++++++++++++ .../src/assembly/assemble_mvnrepo_zip.xml | 50 +++++++++++++++++ .../src/main/resources/scripts/install-feature.sh | 43 +++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 ansible-adapter/ansible-adapter-installer/src/assembly/assemble_installer_zip.xml create mode 100644 ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml create mode 100644 ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh (limited to 'ansible-adapter/ansible-adapter-installer/src') diff --git a/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_installer_zip.xml b/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_installer_zip.xml new file mode 100644 index 000000000..322fa76eb --- /dev/null +++ b/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_installer_zip.xml @@ -0,0 +1,62 @@ + + + + + + adapter + + zip + + + + false + + + + target/stage/ + ${application.name} + 755 + + *.sh + + + + target/stage/ + ${application.name} + 644 + + *.sh + + + + + + + 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 new file mode 100644 index 000000000..615ee37d0 --- /dev/null +++ b/ansible-adapter/ansible-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml @@ -0,0 +1,50 @@ + + + + + + adapter + + zip + + + + false + + + + target/assembly/ + . + + + + + + diff --git a/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh b/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh new file mode 100644 index 000000000..05b4ae373 --- /dev/null +++ b/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh @@ -0,0 +1,43 @@ +### +# ============LICENSE_START======================================================= +# ONAP : APPC +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Copyright (C) 2017 Amdocs +# ============================================================================= +# 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. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# ============LICENSE_END========================================================= +### + +#!/bin/bash + +ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} +ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"} +INSTALLERDIR=$(dirname $0) + +REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip + +if [ -f ${REPOZIP} ] +then + unzip -n -d ${ODL_HOME} ${REPOZIP} +else + echo "ERROR : repo zip ($REPOZIP) not found" + exit 1 +fi + +${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} -- cgit 1.2.3-korg From 4869bd53408224dbc5500adc17f63bab497e8d07 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 24 Apr 2018 11:10:08 -0400 Subject: Fix ansible-adapter dependencies Ansible-adapter pom included unnecessary dependencies, which caused problems when attempting to install in karaf. Change-Id: I7017a25a4d45ab8a75dd7599d10e466ef16d2e6f Issue-ID: CCSDK-251 Signed-off-by: Timoney, Dan (dt5972) --- ansible-adapter/ansible-adapter-bundle/pom.xml | 35 ++-------------------- ansible-adapter/ansible-adapter-installer/pom.xml | 6 ++++ .../src/main/resources/scripts/install-feature.sh | 5 ++-- 3 files changed, 11 insertions(+), 35 deletions(-) (limited to 'ansible-adapter/ansible-adapter-installer/src') diff --git a/ansible-adapter/ansible-adapter-bundle/pom.xml b/ansible-adapter/ansible-adapter-bundle/pom.xml index 2a8c744c9..912ec4715 100644 --- a/ansible-adapter/ansible-adapter-bundle/pom.xml +++ b/ansible-adapter/ansible-adapter-bundle/pom.xml @@ -45,27 +45,20 @@ ${apache.httpcomponents.client.version} - - - - - javax - javaee-api - 7.0 - - org.glassfish.jersey.core jersey-common 2.9.1 + test org.codehaus.jackson jackson-jaxrs 1.9.13 + test @@ -76,6 +69,7 @@ org.mockito mockito-core + test org.onap.ccsdk.sli.core @@ -113,31 +107,8 @@ guava - - diff --git a/ansible-adapter/ansible-adapter-installer/pom.xml b/ansible-adapter/ansible-adapter-installer/pom.xml index 79448f82e..daac66eab 100644 --- a/ansible-adapter/ansible-adapter-installer/pom.xml +++ b/ansible-adapter/ansible-adapter-installer/pom.xml @@ -60,6 +60,12 @@ ansible-adapter-bundle ${project.version} + + + javax + javaee-api + 7.0 + diff --git a/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh b/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh index 05b4ae373..c8214c520 100644 --- a/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh +++ b/ansible-adapter/ansible-adapter-installer/src/main/resources/scripts/install-feature.sh @@ -26,7 +26,6 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} -ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"} INSTALLERDIR=$(dirname $0) REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip @@ -39,5 +38,5 @@ else exit 1 fi -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} +${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} feature:install ${features.boot} -- cgit 1.2.3-korg From 153b6c24886820f7f6fa1d160551f292eb4e6948 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 22 Jun 2018 15:50:29 -0400 Subject: Add feature aggregator Add feature aggregator ccsdk-sli-adaptors-all to install all adaptor features. Change-Id: I8e0fa515a18f62a5ca0530d79a1334942c71e5e0 Issue-ID: CCSDK-281 Signed-off-by: Timoney, Dan (dt5972) --- aai-service/installer/pom.xml | 4 +- .../src/assembly/assemble_mvnrepo_zip.xml | 2 +- ansible-adapter/ansible-adapter-installer/pom.xml | 4 +- .../src/assembly/assemble_mvnrepo_zip.xml | 2 +- features/ccsdk-sli-adaptors-all/pom.xml | 77 ++++++++++++ features/features-sli-adaptors/pom.xml | 29 +++++ features/installer/pom.xml | 137 +++++++++++++++++++++ .../src/assembly/assemble_installer_zip.xml | 39 ++++++ .../src/assembly/assemble_mvnrepo_zip.xml | 29 +++++ .../src/main/resources/scripts/install-feature.sh | 18 +++ features/pom.xml | 24 ++++ mdsal-resource/installer/pom.xml | 4 +- .../src/assembly/assemble_mvnrepo_zip.xml | 2 +- pom.xml | 1 + resource-assignment/installer/pom.xml | 4 +- .../src/assembly/assemble_mvnrepo_zip.xml | 2 +- sql-resource/installer/pom.xml | 4 +- .../src/assembly/assemble_mvnrepo_zip.xml | 2 +- 18 files changed, 369 insertions(+), 15 deletions(-) create mode 100644 features/ccsdk-sli-adaptors-all/pom.xml create mode 100644 features/features-sli-adaptors/pom.xml create mode 100755 features/installer/pom.xml create mode 100755 features/installer/src/assembly/assemble_installer_zip.xml create mode 100755 features/installer/src/assembly/assemble_mvnrepo_zip.xml create mode 100644 features/installer/src/main/resources/scripts/install-feature.sh create mode 100755 features/pom.xml (limited to 'ansible-adapter/ansible-adapter-installer/src') diff --git a/aai-service/installer/pom.xml b/aai-service/installer/pom.xml index 7e91aa742..1e951f80e 100755 --- a/aai-service/installer/pom.xml +++ b/aai-service/installer/pom.xml @@ -61,12 +61,12 @@ package - false + true stage/${application.name}-${project.version} src/assembly/assemble_mvnrepo_zip.xml - false + true diff --git a/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml b/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml index 2ee224477..9cdc78879 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"> - mvnrepo_zip + repo zip diff --git a/ansible-adapter/ansible-adapter-installer/pom.xml b/ansible-adapter/ansible-adapter-installer/pom.xml index 7dcaab5ea..02262acfe 100644 --- a/ansible-adapter/ansible-adapter-installer/pom.xml +++ b/ansible-adapter/ansible-adapter-installer/pom.xml @@ -79,8 +79,8 @@ package - false - false + true + true stage/${application.name}-${project.version} src/assembly/assemble_mvnrepo_zip.xml 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 615ee37d0..ec65e79e1 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"> - adapter + repo zip diff --git a/features/ccsdk-sli-adaptors-all/pom.xml b/features/ccsdk-sli-adaptors-all/pom.xml new file mode 100644 index 000000000..3a9f034cb --- /dev/null +++ b/features/ccsdk-sli-adaptors-all/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.1.0-SNAPSHOT + + + + org.onap.ccsdk.sli.adaptors + ccsdk-sli-adaptors-all + 0.3.0-SNAPSHOT + feature + + ccsdk-sli-adaptors :: features :: ${project.artifactId} + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + ${odl.mdsal.model.version} + pom + import + + + org.opendaylight.controller + mdsal-artifacts + ${odl.mdsal.version} + pom + import + + + + + + + ${project.groupId} + ccsdk-aai-service + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-ansible-adapter + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-mdsal-resource + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-resource-assignment + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-sql-resource + ${project.version} + xml + features + + + + diff --git a/features/features-sli-adaptors/pom.xml b/features/features-sli-adaptors/pom.xml new file mode 100644 index 000000000..de1b9b8d8 --- /dev/null +++ b/features/features-sli-adaptors/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + feature-repo-parent + 1.1.0-SNAPSHOT + + + + org.onap.ccsdk.sli.adaptors + features-sli-adaptors + 0.3.0-SNAPSHOT + feature + + ccsdk-sli-adaptors :: features :: ${project.artifactId} + + + + ${project.groupId} + ccsdk-sli-adaptors-all + ${project.version} + xml + features + + + + diff --git a/features/installer/pom.xml b/features/installer/pom.xml new file mode 100755 index 000000000..be20d9f5c --- /dev/null +++ b/features/installer/pom.xml @@ -0,0 +1,137 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.1.0-SNAPSHOT + + + + org.onap.ccsdk.sli.adaptors + sliadaptors-features-installer + 0.3.0-SNAPSHOT + pom + + ccsdk-sli-adaptors :: features :: ${project.artifactId} + + + ccsdk-sli-adaptors-all + ${application.name} + mvn:org.onap.ccsdk.sli.adaptors/${features.boot}/${project.version}/xml/features + false + + + + + + org.onap.ccsdk.sli.adaptors + ${application.name} + ${project.version} + xml + features + + + * + * + + + + + + + + + + + maven-assembly-plugin + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.adaptors + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + + + + + + + + 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 000000000..a6a22a9ba --- /dev/null +++ b/features/installer/src/assembly/assemble_installer_zip.xml @@ -0,0 +1,39 @@ + + + + bin + + + zip + + + + false + + + + target/stage/ + ${application.name} + 755 + + *.sh + + + + target/stage/ + ${application.name} + 644 + + *.sh + + + + + + + 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 000000000..86b07f1f3 --- /dev/null +++ b/features/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -0,0 +1,29 @@ + + + + repo + + + zip + + + + false + + + + target/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 000000000..e16e79a12 --- /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 000000000..5fb7be025 --- /dev/null +++ b/features/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.1.0-SNAPSHOT + + + + org.onap.ccsdk.sli.adaptors + sliadaptors-feature-aggregator + 0.3.0-SNAPSHOT + pom + + ccsdk-sli-adaptors :: features + + + ccsdk-sli-adaptors-all + features-sli-adaptors + installer + + diff --git a/mdsal-resource/installer/pom.xml b/mdsal-resource/installer/pom.xml index 86792f44d..b4203b21b 100755 --- a/mdsal-resource/installer/pom.xml +++ b/mdsal-resource/installer/pom.xml @@ -61,12 +61,12 @@ package - false + true stage/${application.name}-${project.version} src/assembly/assemble_mvnrepo_zip.xml - false + true diff --git a/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml index 2ee224477..9cdc78879 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"> - mvnrepo_zip + repo zip diff --git a/pom.xml b/pom.xml index a2d2ec2a7..d311050b4 100755 --- a/pom.xml +++ b/pom.xml @@ -111,6 +111,7 @@ mdsal-resource resource-assignment sql-resource + features ONAP diff --git a/resource-assignment/installer/pom.xml b/resource-assignment/installer/pom.xml index 6853619cd..40e7bce69 100755 --- a/resource-assignment/installer/pom.xml +++ b/resource-assignment/installer/pom.xml @@ -76,12 +76,12 @@ package - false + true stage/${application.name}-${project.version} src/assembly/assemble_mvnrepo_zip.xml - false + true diff --git a/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml b/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml index 755df5b2a..9b4a25f49 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"> - mvnrepo_zip + repo zip diff --git a/sql-resource/installer/pom.xml b/sql-resource/installer/pom.xml index 7e5efd550..fff8559fc 100755 --- a/sql-resource/installer/pom.xml +++ b/sql-resource/installer/pom.xml @@ -61,12 +61,12 @@ package - false + true stage/${application.name}-${project.version} src/assembly/assemble_mvnrepo_zip.xml - false + true diff --git a/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml index cb56f2cd4..35e79db18 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"> - mvnrepo_zip + repo zip -- cgit 1.2.3-korg