summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-03-27 14:26:47 +0000
committerAlan Conway <aconway@apache.org>2012-03-27 14:26:47 +0000
commit6fee1f87a9258d962b9bc3de7afad343ff1838b9 (patch)
tree07ed8b4f6b05c2a3b8ac553dbc228e0ac0a74f49
parent543aefb12560de0fb374c3a25fe3dc0b809a221e (diff)
downloadqpid-python-6fee1f87a9258d962b9bc3de7afad343ff1838b9.tar.gz
QPID-3603: Install scripts and configuration for qpid HA rgmanager integration.
qpid/bin/install-cpp-python: installs c++ and python builds. qpid/cpp/etc/Makefile.am: installs init.d scripts. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1305851 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--.gitignore2
-rwxr-xr-xqpid/bin/install-cpp-python76
-rw-r--r--qpid/cpp/etc/Makefile.am3
-rw-r--r--qpid/cpp/etc/cluster.conf-example.xml41
4 files changed, 99 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index bf3a63166e..3f7652a971 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,7 +32,7 @@ configure
.deps
.libs
autom4te.cache
-aclocal.m4
+*.m4
developer.doxygen
user.doxygen
qpid/cpp/libtool
diff --git a/qpid/bin/install-cpp-python b/qpid/bin/install-cpp-python
new file mode 100755
index 0000000000..d43e8e4899
--- /dev/null
+++ b/qpid/bin/install-cpp-python
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# 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.
+#
+
+
+#
+# Install C++ build and python tools to the standard places in a Unix buld
+# WARNING: Will destroy any existing installation!
+#
+
+# NOTE: build must be configured like this:
+# ../qpid/cpp/configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
+# NOTE: Must run as root.
+
+usage() {
+ cat <<EOF
+Usage $0 -pc <cpp-build-directory>
+-p <prefix> : Prefix to install python
+-s : Skip C++ installation
+EOF
+
+ exit 1
+}
+
+fail() { echo $*; exit 1; }
+
+while getopts "ps" opt; do
+ case $opt in
+ p) PY_PREFIX="--prefix $OPTARG";;
+ s) SKIP_CPP=1;;
+ *) usage;;
+ esac
+done
+shift `expr $OPTIND - 1`
+BUILD=$1
+SRC=$(dirname $0)/..
+
+# Install python
+cd $SRC || fail "No such directory: $SRC"
+for d in python tools extras/qmf; do
+ (
+ cd $d || fail "No such directory: $(pwd)/$d"
+ ./setup.py install || fail Python install failed in $(pwd)
+ )
+done
+
+if test $SKIP_CPP; then exit; fi
+
+test -n "$BUILD" || { echo "No build directory."; usage; }
+test -d "$BUILD" || fail "No such directory: $BUILD"
+SRC=$(dirname $BUILD)
+
+ # Install C++
+cd $BUILD
+make -j1 install || fail "C++ install failed in $BUILD"
+
+# NOTE: setup.py does not uninstall, but you can get a list of files installed with:
+# setup.py install --record <output-file>
+
+
diff --git a/qpid/cpp/etc/Makefile.am b/qpid/cpp/etc/Makefile.am
index ab7c62d95d..183c600f96 100644
--- a/qpid/cpp/etc/Makefile.am
+++ b/qpid/cpp/etc/Makefile.am
@@ -34,3 +34,6 @@ nobase_sysconf_DATA += \
$(SASL_CONF)
endif
+
+initddir = $(sysconfdir)/init.d
+nobase_initd_SCRIPTS = qpidd qpidd-primary
diff --git a/qpid/cpp/etc/cluster.conf-example.xml b/qpid/cpp/etc/cluster.conf-example.xml
index 555843fd8e..d1a0fad01d 100644
--- a/qpid/cpp/etc/cluster.conf-example.xml
+++ b/qpid/cpp/etc/cluster.conf-example.xml
@@ -1,48 +1,45 @@
<?xml version="1.0"?>
<!--
-This is an example of a cluster.conf file to run qpidd under rgmanager.
-This example assumes a 3 node cluster, with nodes named mrg32, mrg34 and mrg35.
-There is no fencing in this configuration.
+This is an example of a cluster.conf file to run qpidd HA under rgmanager.
+This example assumes a 3 node cluster, with nodes named node1, node2 and node3.
-->
-<cluster alias="qpid-hot-standby" config_version="4" name="qpid-hot-standby">
+<cluster name="qpid-test" config_version="4">
<!-- The cluster has 3 nodes. Each has a unique nodid and one vote for quorum. -->
<clusternodes>
- <clusternode name="mrg32" nodeid="1">
+ <clusternode name="node1" nodeid="1">
<fence/>
</clusternode>
- <clusternode name="mrg34" nodeid="2">
+ <clusternode name="node2" nodeid="2">
<fence/>
</clusternode>
- <clusternode name="mrg35" nodeid="3">
+ <clusternode name="node3" nodeid="3">
<fence/>
</clusternode>
</clusternodes>
- <cman/>
- <!-- Optionally you can specify logging, this is the most verbose -->
- <rm log_level="7" log_facility="daemon">
-
+ <!-- Resouce Manager configuration. -->
+ <rm log_level="7"> <!-- Optional logging -->
<!--
There is a failoverdomain for each node containing just that node.
This lets us stipulate that the qpidd service should always run on all nodes.
-->
<failoverdomains>
- <failoverdomain name="mrg32-domain" restricted="1">
- <failoverdomainnode name="mrg32"/>
+ <failoverdomain name="node1-domain" restricted="1">
+ <failoverdomainnode name="node1"/>
</failoverdomain>
- <failoverdomain name="mrg34-domain" restricted="1">
- <failoverdomainnode name="mrg34"/>
+ <failoverdomain name="node2-domain" restricted="1">
+ <failoverdomainnode name="node2"/>
</failoverdomain>
- <failoverdomain name="mrg35-domain" restricted="1">
- <failoverdomainnode name="mrg35"/>
+ <failoverdomain name="node3-domain" restricted="1">
+ <failoverdomainnode name="node3"/>
</failoverdomain>
</failoverdomains>
<resources>
- <!-- This script starts a qpidd broker acting as a backup. -->
+ <!-- This script starts a qpidd broker initially acting as a backup. -->
<script file="/etc/init.d/qpidd" name="qpidd"/>
- <!-- This script promotes the qpidd broker on this node to primary. -->
+ <!-- This script promotes the qpidd broker to primary. -->
<script file="/etc/init.d/qpidd-primary" name="qpidd-primary"/>
<!-- This is a virtual IP address for broker replication traffic. -->
@@ -53,13 +50,13 @@ There is no fencing in this configuration.
</resources>
<!-- There is a qpidd service on each node, it should be restarted if it fails. -->
- <service name="mrg32-qpidd-service" domain="mrg32-domain" recovery="restart">
+ <service name="node1-qpidd-service" domain="node1-domain" recovery="restart">
<script ref="qpidd"/>
</service>
- <service name="mrg34-qpidd-service" domain="mrg34-domain" recovery="restart">
+ <service name="node2-qpidd-service" domain="node2-domain" recovery="restart">
<script ref="qpidd"/>
</service>
- <service name="mrg35-qpidd-service" domain="mrg35-domain" recovery="restart">
+ <service name="node3-qpidd-service" domain="node3-domain" recovery="restart">
<script ref="qpidd"/>
</service>