summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer
diff options
context:
space:
mode:
authorSkip Wonnell <kw5258@att.com>2017-08-29 14:16:20 -0500
committerSkip Wonnell <kw5258@att.com>2017-08-30 08:17:34 -0500
commit8c9631e438b9491424df0f43d43445f098436834 (patch)
treec355ed09a765614a9be25d1e6e88b06b753d7f30 /appc-adapters/appc-chef-adapter/appc-chef-adapter-installer
parent51f905f307dde5e1c5135515796c614250e9de4d (diff)
ChefAdapter code clean-up
Issue-ID: APPC-90 Change-Id: I582d6b0c81d5a89938fff6038dfcc221ccaf19c1 Signed-off-by: Skip Wonnell <kw5258@att.com>
Diffstat (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-installer')
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/pom.xml38
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml38
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/main/resources/scripts/install-feature.sh30
4 files changed, 86 insertions, 78 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/pom.xml b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/pom.xml
index 366e7cd9f..62c2ed83c 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/pom.xml
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/pom.xml
@@ -1,5 +1,30 @@
<?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">
+<!--
+ ============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=========================================================
+ -->
+<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>
<artifactId>appc-chef-adapter</artifactId>
@@ -7,13 +32,16 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>appc-chef-adapter-installer</artifactId>
- <name>Chef Adapter - Karaf Installer</name>
+ <name>APPC Chef Adapter - Karaf Installer</name>
<packaging>pom</packaging>
<properties>
<application.name>appc-chef-adapter</application.name>
<features.boot>appc-chef-adapter</features.boot>
- <features.repositories>mvn:org.openecomp.appc/appc-chef-adapter-features/${project.version}/xml/features</features.repositories>
+ <features.repositories>
+ mvn:org.openecomp.appc/appc-chef-adapter-features/${project.version}/xml/features
+ </features.repositories>
<include.transitive.dependencies>false</include.transitive.dependencies>
+ <licenseDir>${project.parent.parent.parent.basedir}</licenseDir>
</properties>
<dependencies>
<dependency>
@@ -46,7 +74,7 @@
</goals>
<phase>package</phase>
<configuration>
- <appendAssemblyId>false</appendAssemblyId>
+ <appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
<finalName>stage/${application.name}-${project.version}</finalName>
<descriptors>
@@ -61,7 +89,7 @@
</goals>
<phase>package</phase>
<configuration>
- <appendAssemblyId>false</appendAssemblyId>
+ <appendAssemblyId>false</appendAssemblyId>
<attach>true</attach>
<finalName>${application.name}-${project.version}</finalName>
<descriptors>
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_installer_zip.xml b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_installer_zip.xml
index 322fa76eb..45c82f69d 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_installer_zip.xml
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_installer_zip.xml
@@ -25,37 +25,37 @@
<!-- 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>adapter</id>
- <formats>
- <format>zip</format>
- </formats>
+ 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>
+ <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>
+ <!-- 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>
+ <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>
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml
index 615ee37d0..f47c15cac 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -25,26 +25,26 @@
<!-- 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>adapter</id>
- <formats>
- <format>zip</format>
- </formats>
+ 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>
+ <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>
+ <!-- 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>
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
</assembly>
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/main/resources/scripts/install-feature.sh b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/main/resources/scripts/install-feature.sh
index 13d41ca56..d0210eb06 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/main/resources/scripts/install-feature.sh
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-installer/src/main/resources/scripts/install-feature.sh
@@ -33,31 +33,11 @@ REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
if [ -f ${REPOZIP} ]
then
- unzip -n -d ${ODL_HOME} ${REPOZIP}
+ unzip -n -d ${ODL_HOME} ${REPOZIP}
else
- echo "ERROR : repo zip ($REPOZIP) not found"
- exit 1
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
fi
-COUNT=0
-while [ $COUNT -lt 10 ]; do
- ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} 2> /tmp/installErr
- cat /tmp/installErr
- if grep -q 'Failed to get the session' /tmp/installErr; then
- sleep 10
- else
- let COUNT=10
- fi
- let COUNT=COUNT+1
-done
-COUNT=0
-while [ $COUNT -lt 10 ]; do
- ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} 2> /tmp/installErr
- cat /tmp/installErr
- if grep -q 'Failed to get the session' /tmp/installErr; then
- sleep 10
- else
- let COUNT=10
- fi
- let COUNT=COUNT+1
-done
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}