You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2017/09/27 15:40:13 UTC
ambari git commit: AMBARI-22059. Use symlinks for Infra components
(oleewere)
Repository: ambari
Updated Branches:
refs/heads/branch-2.6 e305b9f08 -> fdfd52485
AMBARI-22059. Use symlinks for Infra components (oleewere)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fdfd5248
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fdfd5248
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fdfd5248
Branch: refs/heads/branch-2.6
Commit: fdfd52485ed9af242a36a250ab9aef2b02873203
Parents: e305b9f
Author: Oliver Szabo <ol...@gmail.com>
Authored: Wed Sep 27 16:57:10 2017 +0200
Committer: Oliver Szabo <ol...@gmail.com>
Committed: Wed Sep 27 17:07:42 2017 +0200
----------------------------------------------------------------------
.../ambari-logsearch-assembly/pom.xml | 4 ++++
.../src/main/package/deb/solr-client/postinst | 4 ++++
.../main/package/rpm/solr-client/postinstall.sh | 20 ++++++++++++++++++++
.../src/main/resources/solrCloudCli.sh | 8 +++++++-
4 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdfd5248/ambari-logsearch/ambari-logsearch-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-assembly/pom.xml b/ambari-logsearch/ambari-logsearch-assembly/pom.xml
index 8878997..283179c 100644
--- a/ambari-logsearch/ambari-logsearch-assembly/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-assembly/pom.xml
@@ -112,6 +112,10 @@
<name>${solr.client.package.name}</name>
<needarch>noarch</needarch>
<targetOS>linux</targetOS>
+ <postinstallScriptlet>
+ <scriptFile>${project.basedir}/src/main/package/rpm/solr-client/postinstall.sh</scriptFile>
+ <fileEncoding>utf-8</fileEncoding>
+ </postinstallScriptlet>
<mappings>
<mapping>
<directory>${solr.client.mapping.path}</directory>
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdfd5248/ambari-logsearch/ambari-logsearch-assembly/src/main/package/deb/solr-client/postinst
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-assembly/src/main/package/deb/solr-client/postinst b/ambari-logsearch/ambari-logsearch-assembly/src/main/package/deb/solr-client/postinst
index 21a01fa..e84b298 100644
--- a/ambari-logsearch/ambari-logsearch-assembly/src/main/package/deb/solr-client/postinst
+++ b/ambari-logsearch/ambari-logsearch-assembly/src/main/package/deb/solr-client/postinst
@@ -13,3 +13,7 @@
# 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
+SOLR_CLOUD_CLI_LINK_NAME="/usr/bin/infra-solr-cloud-cli"
+SOLR_CLOUD_CLI_SOURCE="/usr/lib/ambari-infra-solr-client/solrCloudCli.sh"
+
+rm -f $SOLR_CLOUD_CLI_LINK_NAME ; ln -s $SOLR_CLOUD_CLI_SOURCE $SOLR_CLOUD_CLI_LINK_NAME
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdfd5248/ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/solr-client/postinstall.sh
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/solr-client/postinstall.sh b/ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/solr-client/postinstall.sh
new file mode 100644
index 0000000..820857a
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/solr-client/postinstall.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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
+
+SOLR_CLOUD_CLI_LINK_NAME="/usr/bin/infra-solr-cloud-cli"
+SOLR_CLOUD_CLI_SOURCE="/usr/lib/ambari-infra-solr-client/solrCloudCli.sh"
+
+rm -f $SOLR_CLOUD_CLI_LINK_NAME ; ln -s $SOLR_CLOUD_CLI_SOURCE $SOLR_CLOUD_CLI_LINK_NAME
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdfd5248/ambari-logsearch/ambari-logsearch-solr-client/src/main/resources/solrCloudCli.sh
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-solr-client/src/main/resources/solrCloudCli.sh b/ambari-logsearch/ambari-logsearch-solr-client/src/main/resources/solrCloudCli.sh
index cd47f06..b6f77d0 100644
--- a/ambari-logsearch/ambari-logsearch-solr-client/src/main/resources/solrCloudCli.sh
+++ b/ambari-logsearch/ambari-logsearch-solr-client/src/main/resources/solrCloudCli.sh
@@ -16,5 +16,11 @@
JVM="java"
sdir="`dirname \"$0\"`"
+ldir="`dirname "$(readlink -f "$0")"`"
-PATH=$JAVA_HOME/bin:$PATH $JVM -classpath "$sdir:$sdir/libs/*" org.apache.ambari.logsearch.solr.AmbariSolrCloudCLI ${1+"$@"}
\ No newline at end of file
+DIR="$sdir"
+if [ "$sdir" != "$ldir" ]; then
+ DIR="$ldir"
+fi
+
+PATH=$JAVA_HOME/bin:$PATH $JVM -classpath "$DIR:$DIR/libs/*" org.apache.ambari.infra.solr.AmbariSolrCloudCLI ${1+"$@"}