From cae5457efc013e27f60cc3e928ca64f51febc33b Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 29 Nov 2013 16:03:20 +0100 Subject: [PATCH] Add Zookeeper package --- debian/control | 6 ++++++ debian/masterkey-lui-solr-zookeeper.postinst | 3 +++ debian/masterkey-lui-solr-zookeeper.postrm | 19 +++++++++++++++++++ debian/rules | 14 ++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 debian/masterkey-lui-solr-zookeeper.postinst create mode 100644 debian/masterkey-lui-solr-zookeeper.postrm diff --git a/debian/control b/debian/control index a2ea578..7999a8d 100644 --- a/debian/control +++ b/debian/control @@ -42,4 +42,10 @@ Depends: tomcat6,masterkey-lui-solr4-slave,masterkey-lui-solr4-common-tomcat6 Description: Local Unified Index Solr Tomcat 6 integration for a LUI master The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration. +Package: masterkey-lui-solr4-zookeeper +Architecture: all +Depends: masterkey-lui-solr4-common +Description: Local Unified Index (Solr) + A stand-alone (jetty) ZooKeeper enabled Solr 4. Require 2 or more configurations running on multiple machines + diff --git a/debian/masterkey-lui-solr-zookeeper.postinst b/debian/masterkey-lui-solr-zookeeper.postinst new file mode 100644 index 0000000..9b4ba0a --- /dev/null +++ b/debian/masterkey-lui-solr-zookeeper.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +ln -sf /etc/masterkey/lui/lui-solr-master.xml /etc/tomcat6/Catalina/localhost/solr.xml +chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/master diff --git a/debian/masterkey-lui-solr-zookeeper.postrm b/debian/masterkey-lui-solr-zookeeper.postrm new file mode 100644 index 0000000..04cefb7 --- /dev/null +++ b/debian/masterkey-lui-solr-zookeeper.postrm @@ -0,0 +1,19 @@ +#!/bin/sh -e + +case "$1" in + remove) + ;; + purge) + rm -rf /var/lib/masterkey/masterkey-lui-solr4/zookeeper + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 192226b..ec07092 100755 --- a/debian/rules +++ b/debian/rules @@ -14,10 +14,12 @@ SHARE = /usr/share/masterkey/lui/solr4 CONF_MASTER = $(SHARE)/master/collection1/ CONF_SLAVE = $(SHARE)/slave/collection1/ +CONF_ZK = $(SHARE)/zookeeper/ DATA = /var/lib/masterkey/lui/solr4 DATA_MASTER = $(DATA)/master DATA_SLAVE = $(DATA)/slave +DATA_ZK = $(DATA)/zk-first LUI_SOLR_COMMON = $(BASE)-common LUI_SOLR_COMMON_ROOT = $(CURDIR)/debian/$(LUI_SOLR_COMMON) @@ -44,6 +46,12 @@ LUI_SOLR_SLAVE_TOMCAT_ROOT = $(CURDIR)/debian/$(LUI_SLAVE_TOMCAT) CATALINA_HOME=/usr/share/tomcat6 SOLR_VERSION=4.4.0 +LUI_SOLR_ZK = $(BASE)-zookeeper +LUI_SOLR_ZK_ROOT = $(CURDIR)/debian/$(LUI_SOLR_ZK) +LUI_SOLR_ZK_SHARE_DIR = $(LUI_SOLR_ZK_ROOT)$(CONF_ZK) +LUI_SOLR_ZK_LIB_DIR = $(LUI_SOLR_ZK_ROOT)$(DATA_ZK) + + PACKAGE=$(shell dh_listpackages) build: @@ -93,6 +101,12 @@ install-stamp: build mkdir -p $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui cp etc/solr4-tomcat-context-slave.xml $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui/lui-solr4-slave.xml + # lui-solr-zookeeper + mkdir -p $(LUI_SOLR_ZK_SHARE_DIR) + cp -rp zookeeper $(LUI_SOLR_ZK_SHARE_DIR) + mkdir -p $(LUI_SOLR_ZK_LIB_DIR) + + touch $@ binary: build install -- 1.7.10.4