From 1b47683183e05c39e55d14c904caf073b65825ef Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 15 Feb 2017 15:09:44 -0500 Subject: Initial commit for OpenECOMP SDN-C northbound Change-Id: Iffe4d4fbcfd21ecbc1000238354094cc064298ce Signed-off-by: Dan Timoney --- asdcApi/installer/pom.xml | 137 +++++++++++++++++++++ .../src/assembly/assemble_installer_zip.xml | 58 +++++++++ .../src/assembly/assemble_mvnrepo_zip.xml | 54 ++++++++ .../src/main/resources/scripts/install-feature.sh | 40 ++++++ 4 files changed, 289 insertions(+) create mode 100755 asdcApi/installer/pom.xml create mode 100644 asdcApi/installer/src/assembly/assemble_installer_zip.xml create mode 100644 asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml create mode 100644 asdcApi/installer/src/main/resources/scripts/install-feature.sh (limited to 'asdcApi/installer') diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml new file mode 100755 index 00000000..23ea77d1 --- /dev/null +++ b/asdcApi/installer/pom.xml @@ -0,0 +1,137 @@ + + + 4.0.0 + + asdcApi + org.openecomp.sdnc.northbound + 1.0.0 + + asdcApi-installer + asdcApi - Karaf Installer + pom + + + sdnc-asdcApi + sdnc-asdcApi + mvn:org.openecomp.sdnc.northbound/asdcApi-features/${project.version}/xml/features + false + + + + + + org.openecomp.sdnc.northbound + asdcApi-features + ${project.version} + features + xml + + + * + * + + + + + + org.openecomp.sdnc.northbound + asdcApi-provider + ${project.version} + + + + + + + + + maven-assembly-plugin + + + maven-repo-zip + + single + + package + + false + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + + + + + + 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.openecomp.sdnc + sli-common,sli-provider,dblib-provider + 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/asdcApi/installer/src/assembly/assemble_installer_zip.xml b/asdcApi/installer/src/assembly/assemble_installer_zip.xml new file mode 100644 index 00000000..0ce9b1ac --- /dev/null +++ b/asdcApi/installer/src/assembly/assemble_installer_zip.xml @@ -0,0 +1,58 @@ + + + + + + + zip + + + + false + + + + target/stage/ + ${application.name} + 755 + + *.sh + + + + target/stage/ + ${application.name} + 644 + + *.sh + + + + + + + diff --git a/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml b/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml new file mode 100644 index 00000000..c64ca699 --- /dev/null +++ b/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -0,0 +1,54 @@ + + + + + + + zip + + + + false + + + + target/assembly/ + . + + + + + + + + ../provider/src/main/resources/initial/${feature-name}-provider.xml + ./etc/opendaylight/karaf/200-${feature-name}-provider.xml + + + + + diff --git a/asdcApi/installer/src/main/resources/scripts/install-feature.sh b/asdcApi/installer/src/main/resources/scripts/install-feature.sh new file mode 100644 index 00000000..33e9b036 --- /dev/null +++ b/asdcApi/installer/src/main/resources/scripts/install-feature.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# 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========================================================= +### + +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 -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