diff --git a/booth.spec b/booth.spec index 7d54924..5ef507e 100644 --- a/booth.spec +++ b/booth.spec @@ -1,192 +1,193 @@ %if 0%{?suse_version} %global booth_docdir %{_defaultdocdir}/%{name} %else # newer fedora distros have _pkgdocdir, rely on that when # available %{!?_pkgdocdir: %global _pkgdocdir %%{_docdir}/%{name}-%{version}} # Directory where we install documentation %global booth_docdir %{_pkgdocdir} %endif %global test_path %{_datadir}/booth/tests %if 0%{?suse_version} %define _libexecdir %{_libdir} %endif %define with_extra_warnings 0 %define with_debugging 0 %define without_fatal_warnings 1 %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services %if 0%{?fedora} || 0%{?centos} || 0%{?rhel} %define pkg_group System Environment/Daemons %else %define pkg_group Productivity/Clustering/HA %endif Name: booth Url: https://github.com/ClusterLabs/booth Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0+ Group: %{pkg_group} Version: 0.2.0 Release: 0 Source: booth.tar.bz2 Source1: %name-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asciidoc BuildRequires: autoconf BuildRequires: automake BuildRequires: glib2-devel BuildRequires: libgcrypt-devel %if 0%{?fedora} || 0%{?centos} || 0%{?rhel} BuildRequires: cluster-glue-libs-devel BuildRequires: pacemaker-libs-devel %else BuildRequires: libglue-devel BuildRequires: libpacemaker-devel %endif BuildRequires: libxml2-devel BuildRequires: pkgconfig %if 0%{?fedora} || 0%{?centos} || 0%{?rhel} Requires: pacemaker >= 1.1.8 Requires: cluster-glue-libs >= 1.0.6 %else Requires: pacemaker-ticket-support >= 2.0 %endif %description Booth manages tickets which authorize cluster sites located in geographically dispersed locations to run resources. It facilitates support of geographically distributed clustering in Pacemaker. %prep %setup -q -n %{name} %build ./autogen.sh %configure \ --with-initddir=%{_initrddir} \ --docdir=%{booth_docdir} make #except check #%check #make check %install make DESTDIR=$RPM_BUILD_ROOT install docdir=%{booth_docdir} mkdir -p %{buildroot}/%{_mandir}/man8/ gzip < docs/boothd.8 > %{buildroot}/%{_mandir}/man8/booth.8.gz ln %{buildroot}/%{_mandir}/man8/booth.8.gz %{buildroot}/%{_mandir}/man8/boothd.8.gz %if %{defined _unitdir} # systemd mkdir -p %{buildroot}/%{_unitdir} cp -a conf/booth@.service %{buildroot}/%{_unitdir}/booth@.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbooth-arbitrator %else # sysV init ln -s ../../%{_initddir}/booth-arbitrator %{buildroot}%{_sbindir}/rcbooth-arbitrator %endif #install test-parts mkdir -p %{buildroot}/%{test_path} cp -a unit-tests/ script/unit-test.py test conf %{buildroot}/%{test_path}/ chmod +x %{buildroot}/%{test_path}/test/booth_path chmod +x %{buildroot}/%{test_path}/test/live_test.sh mkdir -p %{buildroot}/%{test_path}/src/ ln -s %{_sbindir}/boothd %{buildroot}/%{test_path}/src/ rm -f %{buildroot}/%{test_path}/test/*.pyc %if 0%{?suse_version} #SUSE firewall rule mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir} install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_fwdefdir}/booth %endif %check %if 0%{?run_build_tests} echo "%%run_build_tests set to %run_build_tests; including tests" make check %else echo "%%run_build_tests set to %run_build_tests; skipping tests" %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_sbindir}/booth %{_sbindir}/boothd %{_sbindir}/booth-keygen %{_mandir}/man8/booth.8.gz %{_mandir}/man8/boothd.8.gz %{_mandir}/man8/booth-keygen.8.gz +%{_mandir}/man8/geostore.8.gz %dir /usr/lib/ocf %dir /usr/lib/ocf/resource.d %dir /usr/lib/ocf/resource.d/pacemaker %dir %{_sysconfdir}/booth %{_sbindir}/rcbooth-arbitrator /usr/lib/ocf/resource.d/pacemaker/booth-site %config %{_sysconfdir}/booth/booth.conf.example %if 0%{?suse_version} %config %{_fwdefdir}/booth %endif %if %{defined _unitdir} %{_unitdir}/booth@.service %exclude %{_initddir}/booth-arbitrator %else %{_initddir}/booth-arbitrator %endif %dir %{_datadir}/booth %{_datadir}/booth/service-runnable %doc AUTHORS README COPYING %doc README.upgrade-from-v0.1 # this should be preun, but... %pre # new installation? test -x %{_sbindir}/booth || exit 0 # stop the arbitrator if it's the previous paxos version 1.0 if [ "`booth version | awk '{print $2}'`" = "1.0" ]; then echo "booth v0.1 found" if grep -qs 'ticket.*;' /etc/booth/booth.conf; then echo "Convert the booth configuration in /etc/booth/booth.conf!" fi if ps -o pid,cmd -e | grep -qs "[b]oothd arbitrator"; then rcbooth-arbitrator stop fi fi exit 0 %package test Summary: Test scripts for Booth Group: %{pkg_group} Requires: booth Requires: python %description test This package contains automated tests for Booth, the Cluster Ticket Manager for Pacemaker. %files test %defattr(-,root,root) %doc README-testing %{test_path} %dir /usr/lib/ocf %dir /usr/lib/ocf/resource.d %dir /usr/lib/ocf/resource.d/booth /usr/lib/ocf/resource.d/booth/sharedrsc %changelog diff --git a/docs/Makefile.am b/docs/Makefile.am index 3e9e7bc..131f2e3 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,40 +1,40 @@ # # docs: booth manual pages # # Copyright (C) 2014 Dejan Muhamedagic # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in -asciiman = boothd.8.txt booth-keygen.8.txt +asciiman = boothd.8.txt booth-keygen.8.txt geostore.8.txt doc_DATA = $(generated_docs) generated_docs = generated_mans = if BUILD_ASCIIDOC generated_docs += $(ascii:%.txt=%.html) $(asciiman:%.txt=%.html) generated_mans += $(asciiman:%.8.txt=%.8) $(generated_mans): $(asciiman) man8_MANS = $(generated_mans) endif %.html: %.txt $(ASCIIDOC) --unsafe --backend=xhtml11 $< %.8: %.8.txt a2x -f manpage $< clean-local: -rm -rf $(generated_docs) $(generated_mans) diff --git a/docs/geostore.8.txt b/docs/geostore.8.txt new file mode 100644 index 0000000..18bb07c --- /dev/null +++ b/docs/geostore.8.txt @@ -0,0 +1,129 @@ +GEOSTORE(8) +=========== +:doctype: manpage + + +NAME +---- +geostore - geo cluster attribute manager + + +SYNOPSIS +-------- +*geostore* 'set' [-t 'ticket'] [-s 'site'] [-c 'config'] 'attribute' 'value' + +*geostore* 'get' [-t 'ticket'] [-s 'site'] [-c 'config'] 'attribute' + +*geostore* 'delete' [-t 'ticket'] [-s 'site'] [-c 'config'] 'attribute' + +*geostore* 'list' [-t 'ticket'] [-s 'site'] [-c 'config'] + + +DESCRIPTION +----------- +Applications running in GEO cluster environments may need more +information apart from tickets to make decisions. One example may +be the status of data replication. + +'geostore' is a helper program to manage site attributes. The +attributes are defined on a per-ticket basis, that is every +ticket may have one or more attributes. + +It can set an attribute value, retrieve an attribute, or delete +it. The attributes are stored in the CIB status section which is +managed by the pacemaker 'cib' process. 'boothd(8)' provides +transport for attributes to other sites. + +'crm_ticket(8)' is invoked at the target site to manage the +attributes. + + +SHORT EXAMPLES +-------------- + +--------------------- +# geostore set -t ticket-A -s 44.0.0.61 bigdb-repl-status UPTODATE + +# geostore get -t ticket-A -s 44.0.0.61 bigdb-repl-status + +# geostore delete -t ticket-A -s 44.0.0.61 bigdb-repl-status + +# geostore list -t ticket-A -s 44.0.0.61 +--------------------- + + + +OPTIONS +------- + +*-t*:: + Ticket scope of the attribute (required, if more than one + ticket is configured). + +*-s*:: + Site address or name where the attribute is to be stored/retrieved. + +*-c* 'configfile':: + Configuration to use. ++ +Can be a full path to a configuration file, or a short name; in the latter +case, the directory '/etc/booth' and suffix '.conf' are added. +Per default 'booth' is used, which results in the path +'/etc/booth/booth.conf'. + +*-h*, *--help*:: + Give a short usage output. + + +COMMANDS +-------- + +*'set'*:: + Sets the attribute to the value. + + +*'get'*:: + Get the attribute value and print it to 'stdout'. If the + attribute doesn't exist, appropriate error message is printed + to 'stderr'. + + +*'delete'*:: + Delete the attribute. If the attribute doesn't exist, + appropriate error message is printed to 'stderr'. + + +*'list'*:: + List all attributes and their values stored at the site. + + + +EXIT STATUS +----------- +*0*:: + Success. + +*1*:: + Request failed or bad usage. + + +RESOURCES +--------- +GitHub: + + +COPYING +------- + +Copyright (C) 2015 Dejan Muhamedagic + +Free use of this software is +granted under the terms of the GNU General Public License (GPL). + + +SEE ALSO +-------- + +'boothd(8)', 'crm_attribute(8)' + +// vim: set ft=asciidoc :