You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/05/20 17:32:08 UTC

git commit: AMBARI-5830. add deb packaging for ganglia addons nagios add ons & ambari-log4j (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk ad3ff7ed6 -> 836691a65


AMBARI-5830. add deb packaging for ganglia addons nagios add ons & ambari-log4j  (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/836691a6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/836691a6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/836691a6

Branch: refs/heads/trunk
Commit: 836691a65b16e2eb3cad1d8a1979444ad9e532f8
Parents: ad3ff7e
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue May 20 18:31:59 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue May 20 18:31:59 2014 +0300

----------------------------------------------------------------------
 .../package/deb/create_nagios_addon_deb.sh      | 71 ++++++++++++++++++++
 .../addons/package/deb/nagios_addon_deb_control |  8 +++
 .../nagios/conf.d/hdp_mon_nagios_addons.conf    |  7 ++
 3 files changed, 86 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/836691a6/contrib/addons/package/deb/create_nagios_addon_deb.sh
----------------------------------------------------------------------
diff --git a/contrib/addons/package/deb/create_nagios_addon_deb.sh b/contrib/addons/package/deb/create_nagios_addon_deb.sh
new file mode 100644
index 0000000..bd81748
--- /dev/null
+++ b/contrib/addons/package/deb/create_nagios_addon_deb.sh
@@ -0,0 +1,71 @@
+#!/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.
+# */
+
+CUR_DIR=`pwd`
+
+BASEDIR="$( cd "$( dirname "$0" )" && pwd )"
+
+if [[ -z "${BUILD_DIR}" ]]; then
+  BUILD_DIR="${BASEDIR}/build/"
+fi
+
+if [[ -z "${VERSION}" ]]; then
+  VERSION=${VERSION:-1.7.0}
+fi
+
+if [[ -z "${RELEASE}" ]]; then
+  RELEASE=${RELEASE:-1}
+fi
+
+rm -rf ${BUILD_DIR}/*
+
+PKG_NAME="hdp_mon_nagios_addons"
+PKG_FULL_NAME="${PKG_NAME}-$VERSION"
+
+MON_TAR_DIR="${BUILD_DIR}/${PKG_FULL_NAME}/"
+SRC_DIR="${BASEDIR}/../../src/addOns/nagios/"
+
+
+############ Mapping
+
+mkdir -p "${MON_TAR_DIR}/usr/lib64/nagios"
+cp -r "${SRC_DIR}/plugins" "${MON_TAR_DIR}/usr/lib64/nagios"
+
+mkdir -p "${MON_TAR_DIR}/etc/httpd"
+cp -r "${SRC_DIR}/conf.d" "${MON_TAR_DIR}/etc/httpd"
+
+mkdir -p "${MON_TAR_DIR}/usr/share/hdp/nagios"
+cp -r ${SRC_DIR}/scripts/* "${MON_TAR_DIR}/usr/share/hdp/nagios"
+
+############ Create data tar
+
+cd ${BUILD_DIR}
+tar -zcvf data.tar.gz -C "$PKG_FULL_NAME" .
+
+############ Create control archive
+cp "${BASEDIR}/nagios_addon_deb_control" "${BUILD_DIR}/control"
+
+TAR_CONTROL_DEST="${BUILD_DIR}/control.tar.gz"
+tar -czf "${TAR_CONTROL_DEST}" control
+############ Create debian-binary
+echo "2.0" > debian-binary
+
+############ Pack to deb package
+ar rcv "$PKG_FULL_NAME.deb" debian-binary control.tar.gz data.tar.gz

http://git-wip-us.apache.org/repos/asf/ambari/blob/836691a6/contrib/addons/package/deb/nagios_addon_deb_control
----------------------------------------------------------------------
diff --git a/contrib/addons/package/deb/nagios_addon_deb_control b/contrib/addons/package/deb/nagios_addon_deb_control
new file mode 100644
index 0000000..6f558f9
--- /dev/null
+++ b/contrib/addons/package/deb/nagios_addon_deb_control
@@ -0,0 +1,8 @@
+Package: hdp_mon_nagios_addons
+Version: 1.7.0
+Section: universe/admin
+Priority: extra
+Depends: nagios-plugins-standard
+Architecture: all
+Description: This package provides add-on helper scripts and plugins for nagios for monitoring of a Hadoop Cluster
+Maintainer: Hortonworks

http://git-wip-us.apache.org/repos/asf/ambari/blob/836691a6/contrib/addons/src/addOns/nagios/conf.d/hdp_mon_nagios_addons.conf
----------------------------------------------------------------------
diff --git a/contrib/addons/src/addOns/nagios/conf.d/hdp_mon_nagios_addons.conf b/contrib/addons/src/addOns/nagios/conf.d/hdp_mon_nagios_addons.conf
new file mode 100644
index 0000000..fbaeb2a
--- /dev/null
+++ b/contrib/addons/src/addOns/nagios/conf.d/hdp_mon_nagios_addons.conf
@@ -0,0 +1,7 @@
+Alias /ambarinagios /usr/share/hdp
+<Directory /usr/share/hdp>
+  Options None
+  AllowOverride None
+  Order allow,deny
+  Allow from all
+</Directory>