diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Tools.txt b/doc/Clusters_from_Scratch/en-US/Ch-Tools.txt index 0f4839a268..a410bf615e 100644 --- a/doc/Clusters_from_Scratch/en-US/Ch-Tools.txt +++ b/doc/Clusters_from_Scratch/en-US/Ch-Tools.txt @@ -1,163 +1,160 @@ = Pacemaker Tools = == Using Pacemaker Tools == In the dark past, configuring Pacemaker required the administrator to read and write XML. In true UNIX style, there were also a number of different commands that specialized in different aspects of querying and updating the cluster. All of that has been greatly simplified with the creation of unified command-line shells (and GUIs) that hide all the messy XML scaffolding. These shells take all the individual aspects required for managing and configuring a cluster, and packs them into one simple to use command line tool. They even allow you to queue up several changes at once and commit them atomically. There are currently two command-line shells that people use, `pcs` and -the `crm shell`. +the `crm shell`. This edition of Clusters from Scratch is based on +{cli_name}. Start by taking some time to familiarize yourself with what it +can do. [NOTE] =========== The two shells share many concepts but the scope, layout and syntax does differ, so make sure you read the version of this guide that corresponds to the software installed on your system. =========== ifdef::pcs[] -This edition of Clusters from Scratch is based on `pcs`. -Start by taking some time to familiarize yourself with what it can do. [IMPORTANT] =========== Since `pcs` has the ability to manage all aspects of the cluster (both corosync and pacemaker), it requires a specific cluster stack to be in use, (corosync 2.0 with votequorum + Pacemaker version >= 1.8). =========== [source,Bash] ---- # pcs Control and configure pacemaker and corosync. Options: -h Display usage and exit -f file Perform actions on file instead of active CIB Commands: resource Manage cluster resources cluster Configure cluster options and nodes stonith Configure fence devices property Set pacemaker properties constraint Set resource constraints status View cluster status ---- As you can see, the different aspects of cluster management are broken up into categories: resource, cluster, stonith, property, constraint, and status. To discover the functionality available in each of these categories, one can issue the command 'pcs help'. Below is an example of all the options available under the status category. [source,Bash] ---- # pcs status help Usage: pcs status [commands]... View current cluster and resource status Commands: status View all information about the cluster and resources status resources View current status of cluster resources status groups View currently configured groups and their resources status cluster View current cluster status status corosync View current corosync status status nodes [corosync] View current status of nodes from pacemaker, or if corosync is specified, print nodes currently configured in corosync status actions View failed actions status pcsd ... Show the current status of pcsd on the specified nodes status xml View xml version of status (output from crm_mon -r -1 -X) ---- Additionally, if you are interested in the Pacemaker version and supported cluster stack(s) available with your current Pacemaker installation, the pacemakerd --features option is available to you. pass:[# pacemakerd --features] ------------------ sys::[pacemakerd --features] ------------------ [NOTE] ====== If the SNMP and/or email options are not listed, then Pacemaker was not built to support them. This may be by the choice of your distribution or the required libraries may not have been available. Please contact whoever supplied you with the packages for more details. ====== endif::[] ifdef::crm[] -This edition of Clusters from Scratch is based on the `crm` shell. -Start by taking some time to familiarize yourself with what it can do. - pass:[# crm --help] The primary tool for monitoring the status of the cluster is crm_mon (also available as crm status). It can be run in a variety of modes and has a number of output options. To find out about any of the tools that come with Pacemaker, simply invoke them with the --help option or consult the included man pages. Both sets of output are created from the tool, and so will always be in sync with each other and the tool itself. Additionally, the Pacemaker version and supported cluster stack(s) are available via the --feature option to pacemakerd. pass:[# pacemakerd --features] ------------------ sys::[pacemakerd --features] ------------------ pass:[# pacemakerd --help] ------------------ sys::[pacemakerd --help] ------------------ pass:[# crm_mon --help] ------------------ sys::[crm_mon --help] ------------------ [NOTE] ====== If the SNMP and/or email options are not listed, then Pacemaker was not built to support them. This may be by the choice of your distribution or the required libraries may not have been available. Please contact whoever supplied you with the packages for more details. ====== endif::[] diff --git a/doc/Clusters_from_Scratch/en-US/Clusters_from_Scratch.xml b/doc/Clusters_from_Scratch/en-US/Clusters_from_Scratch.xml index ac2767ab78..a9b29363b5 100644 --- a/doc/Clusters_from_Scratch/en-US/Clusters_from_Scratch.xml +++ b/doc/Clusters_from_Scratch/en-US/Clusters_from_Scratch.xml @@ -1,24 +1,24 @@ %BOOK_ENTITIES; ]> - + diff --git a/doc/Makefile.am b/doc/Makefile.am index 39496a4180..5e8e3b5b32 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,181 +1,181 @@ # # doc: Pacemaker code # # Copyright (C) 2008 Andrew Beekhof # # 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 helpdir = $(datadir)/$(PACKAGE) ascii = crm_fencing.txt acls.txt docbook = Pacemaker_Explained Clusters_from_Scratch doc_DATA = README.hb2openais $(ascii) $(generated_docs) publican_docs = generated_docs = generated_mans = DOCBOOK_FORMATS := html-desktop,txt DOCBOOK_LANGS := en-US DOTs = $(wildcard */en-US/images/*.dot) SVG = $(wildcard */en-US/images/pcmk-*.svg) $(DOTs:%.dot=%.svg) PNGS = $(SVG:%.svg=%-small.png) $(SVG:%.svg=%.png) $(SVG:%.svg=%-large.png) \ Pacemaker_Explained/en-US/images/Policy-Engine-big.png Pacemaker_Explained/en-US/images/Policy-Engine-small.png BRAND_PNGS = publican-clusterlabs/en-US/images/title_logo.png \ publican-clusterlabs/en-US/images/image_left.png \ publican-clusterlabs/en-US/images/image_right.png \ publican-clusterlabs/en-US/images/h1-bg.png graphics: $(PNGS) %.png: %.svg $(INKSCAPE) --file=$< --export-dpi=90 -C --export-png=$@ %-small.png: %.svg $(INKSCAPE) --file=$< --export-dpi=45 -C --export-png=$@ %-large.png: %.svg $(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@ if BUILD_ASCIIDOC generated_docs += $(ascii:%.txt=%.html) if BUILD_DOCBOOK publican_docs += $(docbook) endif endif EXTRA_DIST = $(docbook:%=%.xml) %.html: %.txt $(ASCIIDOC) --unsafe --backend=xhtml11 $< %.8: %.8.txt a2x -L -f manpage $< # Build docbook from asciidoc because XML is a PITA to edit # # Build each chapter as a book (since the numbering isn't right for # articles and only books can have appendicies) and then strip out the # bits we don't want/need # %.xml: %.txt - asciidoc -b docbook -a $(ASCIIDOC_CLI_TYPE)=true -d book -o $@ $< + asciidoc -b docbook -a cli_name=$(ASCIIDOC_CLI_TYPE) -a $(ASCIIDOC_CLI_TYPE)=true -d book -o $@ $< sed -i.sed 's///' $@ sed -i.sed 's/ //' $@ # Fix line endings sed -i.sed 's/\ lang="en"//' $@ # Never specify a language in the chapters sed -i.sed 's/simpara/para/g' $@ # publican doesn't correctly render footnotes with simpara sed -i.sed 's/.*.*//g' $@ # Remove dangling tag sed -i.sed 's/.*preface>//g' $@ # Remove preface elements sed -i.sed 's:::g' $@ # Remove empty title sed -i.sed 's/chapter/section/g' $@ # Chapters become sections, so that books can become chapters sed -i.sed 's/<.*bookinfo.*>//g' $@ # Strip out bookinfo, we don't need it -grep -qis "//' $@ # We just want the appendix tag -grep -vqis "/chapter>/g' $@ # Rename to chapter echo Rebuilt $@ from $< CFS_TXT=$(wildcard Clusters_from_Scratch/en-US/*.txt) CFS_XML=$(CFS_TXT:%.txt=%.xml) # We have to hardcode the book name # With '%' the test for 'newness' fails Clusters_from_Scratch.txt: $(PNGS) $(wildcard Clusters_from_Scratch/en-US/*.xml) $(CFS_XML) @echo Building $(@:%.txt=%) because of $? rm -rf $(@:%.txt=%)/publish/* cd $(@:%.txt=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) rm -rf $(@:%.txt=%)/tmp touch $@ PE_TXT=$(wildcard Pacemaker_Explained/en-US/*.txt) PE_XML=$(PE_TXT:%.txt=%.xml) # We have to hardcode the book name # With '%' the test for 'newness' fails Pacemaker_Explained.txt: $(PNGS) $(wildcard Pacemaker_Explained/en-US/*.xml) $(PE_XML) @echo Building $(@:%.txt=%) because of $? rm -rf $(@:%.txt=%)/publish/* cd $(@:%.txt=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) rm -rf $(@:%.txt=%)/tmp touch $@ # Update the translation template pot: for book in $(docbook); do \ echo "Updating translation templates in: $$book"; \ ( cd $$book && RPM_BUILD_DIR="" $(PUBLICAN) update_pot ); \ done # Update the actual translations po: for book in $(docbook); do \ echo "Updating translations in: $$book"; \ ( cd $$book && RPM_BUILD_DIR="" $(PUBLICAN) update_po --langs=$(DOCBOOK_LANGS) );\ done if BUILD_DOCBOOK docbook_txt = $(docbook:%=%.txt) all-local: $(docbook_txt) */publican.cfg #install-data-local: all-local install-data-local: all-local for book in $(docbook); do \ filelist=`find $$book/publish/* -print`; \ for f in $$filelist; do \ p=`echo $$f | sed s:publish/:: | sed s:Pacemaker/::`; \ if [ -d $$f ]; then \ $(INSTALL) -d 775 $(DESTDIR)$(docdir)/$$p; \ else \ $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/$$p; \ fi \ done; \ done endif brand: $(BRAND_PNGS) $(wildcard publican-clusterlabs/en-US/*.xml) cd publican-clusterlabs && publican build --formats=xml --langs=all --publish echo "Installing..." cd publican-clusterlabs && sudo publican install_brand --path=$(datadir)/publican/Common_Content # find publican-clusterlabs -name "*.noarch.rpm" -exec rm -f \{\} \; # cd publican-clusterlabs && $(PUBLICAN) package --binary # find publican-clusterlabs -name "*.noarch.rpm" -exec sudo rpm -Uvh --force \{\} \; www: $(generated_docs) echo rsync -rtz --progress $(generated_docs) $(ascii) root@www.clusterlabs.org:/var/www/html/doc/ rsync -rtz --progress $(generated_docs) $(ascii) root@www.clusterlabs.org:/var/www/html/doc/ rm -f $(docbook_txt) make DOCBOOK_FORMATS="pdf,html,html-single,txt,epub" DOCBOOK_LANGS="all" all-local $(generated_docs) $(ascii) echo Uploading current documentation set to clusterlabs.org rsync -rtz --progress $(generated_docs) $(ascii) $(asciiman) root@www.clusterlabs.org:/var/www/html/doc/ if BUILD_DOCBOOK for book in $(docbook); do \ echo Uploading $$book...; \ echo "Requires Corosync 2.x
" > $$book/publish/build-$(PACKAGE_SERIES).txt; \ echo "Generated on `date` from version: $(shell git log --pretty="format:%h %d" -n 1)" >> $$book/publish/build-$(PACKAGE_SERIES).txt; \ rsync -rtz --progress $$book/publish/* root@www.clusterlabs.org:/var/www/html/doc/; \ done endif clean-local: -rm -rf $(generated_docs) $(generated_mans) $(docbook_txt) $(CFS_XML) $(PE_XML) for book in $(docbook); do rm -rf $$book/tmp $$book/publish; done foo: rm -f $(CFS_XML)