Pcs is a Corosync and Pacemaker configuration tool. It permits users to easily view, modify and create Pacemaker based clusters. Pcs contains pcsd, a pcs daemon, which operates as a remote server for pcs.
- main
- Main development happens here.
- This branch is not intended for production use.
- Clusters running the latest Pacemaker on top of the latest Corosync are supported.
- pcs-1.x
- This is the next stable release.
- Clusters running Pacemaker 3.1 on top of Corosync 3.x are supported.
- pcs-0.12
- This is the current stable release.
- Clusters running Pacemaker 3.0 on top of Corosync 3.x are supported.
- pcs-0.11
- Clusters running Pacemaker 2.1 on top of Corosync 3.x are supported.
- This branch is in maintenance mode - bugs are being fixed but only a subset of new features lands here.
- pcs-0.10
- Clusters running Pacemaker 2.0 on top of Corosync 3.x are supported.
- Pacemaker 2.1 is supported, if it is compiled with
--enable-compat-2.0option. - This branch is no longer maintained.
- pcs-0.9
- Clusters running Pacemaker 1.x on top of Corosync 2.x or Corosync 1.x with CMAN are supported.
- This branch is no longer maintained.
These are the runtime dependencies of pcs and pcsd:
- python 3.12+
- python3-cryptography
- python3-lxml
- python3-pycurl
- python3-pyparsing 3.0.0+
- python3-tornado 6.1.0+
- dacite
- isodate
- ruby 3.1.0+
- killall (package psmisc)
- corosync 3.x
- pacemaker 3.x
- certutil (package nss-tools or mozilla-nss-tools)
Apart from the dependencies listed above, these are also required for installation:
- python development files (packages python3-devel, python3-setuptools 66.1+, python3-pip, python3-wheel if python3-setuptools < 71)
- ruby development files (package ruby-devel)
- rubygems
- rubygem bundler (package rubygem-bundler or ruby-bundler or bundler)
- autoconf, automake
- pkgconf, pkgconfig(booth), pkgconfig(sbd)
- pacemaker-libs-devel (or libpacemaker-devel and libpacemaker3-devel)
- gcc
- gcc-c++
- libcurl development files (package libcurl-devel or libcurl-dev)
- printf (package coreutils)
- redhat-rpm-config (if you are using Fedora)
- wget (to download bundled libraries)
During the installation, all required rubygems are automatically downloaded and compiled.
Web UI frontend is no longer part of pcs sources. You can get it at
https://github.com/ClusterLabs/pcs-web-ui.
Web UI frontend can run in two modes, either as a cockpit plugin or as a
standalone application served by pcsd. Specify --enable-webui flag for
./configure to build pcsd backend support for running the web UI frontend as
a standalone application.
To install pcs and pcsd run the following in terminal:
./autogen.sh
./configure [--enable-local-build] [--enable-individual-bundling] [--enable-webui]
make
make installCommon configure options:
--enable-local-build- bundles dependencies with pcs instead of using them from the system. Without--enable-individual-bundling, all Python modules which can be bundled (see macrosPCS_CHECK_PYMODwith 3rd argument[yes]inconfigure.ac) and all Ruby gems are bundled, including Ruby default gems.--enable-individual-bundling- used together with--enable-local-build, bundles only Python modules and Ruby gems which are missing on the system or whose installed version does not meet the requirement, and reuses installed system Python modules and Ruby gems. Reused system gems are pinned to their installed versions.--enable-use-local-cache-only- builds bundled dependencies from sources already present in the local cache (rpm/for Python modules,pcsd/vendor/bundle/cachefor Ruby gems) and disables downloads. Recommended mainly together with--enable-individual-bundling.--with-custom-gemfile=PATH- requires--enable-local-build, otherwise configure fails. Uses the given Gemfile for bundling Ruby gems instead of the one generated by configure, e.g. to pin gems to specific versions. Configure only checks that the file mentions every gem pcsd requires; it does not add any gems, version requirements or thesourceline, and with--enable-individual-bundlingit does not pin system gems to their installed versions. The Gemfile is used bybundle install, so it has no effect on gem installation with--enable-use-local-cache-only.--enable-webui- build support for web UI as a standalone application
Without --enable-local-build, all required Python modules and Ruby gems must
be installed on the system, otherwise configure fails.
If you are using GNU/Linux with systemd, it is now time to:
systemctl daemon-reloadStart pcsd and make it start on boot:
systemctl start pcsd
systemctl enable pcsdCurrently this is built into Fedora, RHEL, CentOS and Debian and its derivates. It is likely that other Linux distributions also contain pcs packages.
-
Authenticate cluster nodes
Set the same password for the
haclusteruser on all nodes.passwd hacluster
To authenticate the nodes, run the following command on one of the nodes (replacing node1, node2, node3 with a list of nodes in your future cluster). Specify all your cluster nodes in the command. Make sure pcsd is running on all nodes.
pcs host auth node1 node2 node3 -u hacluster
-
Create a cluster
To create a cluster run the following command on one node (replacing cluster_name with a name of your cluster and node1, node2, node3 with a list of nodes in the cluster).
--startand--enablewill start your cluster and configure the nodes to start the cluster on boot respectively.pcs cluster setup cluster_name node1 node2 node3 --start --enable
-
Check the cluster status
After a few moments the cluster should startup and you can get the status of the cluster.
pcs status
-
Add cluster resources
After this you can add stonith agents and resources:
pcs stonith create --help
and
pcs resource create --help
ClusterLabs website is an excellent place to learn more about Pacemaker clusters.
If you have any bug reports or feature requests please feel free to open a github issue on the pcs project.
Alternatively you can use ClusterLabs users mailinglist which is also a great place to ask Pacemaker clusters related questions.