• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 10 years ago
  • Updated 25 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command-line interface for High-Availability cluster management on GNU/Linux systems.

crmsh

Build Status

Introduction

crmsh is a command-line interface for High-Availability cluster management on GNU/Linux systems, and part of the Clusterlabs project. It simplifies the configuration, management and troubleshooting of Pacemaker-based clusters, by providing a powerful and intuitive set of features.

crmsh can function both as an interactive shell with tab completion and inline documentation, and as a command-line tool. It can also be used in batch mode to execute commands from files.

Documentation

Installation

Crmsh is implemented in Python, and requires Python version 3.4 or newer. Versions of crmsh older than the 4 series ran on Python 2, so if you don't have access to a Python 3 interpreter, you will need to use one of the older releases.

The GNU Autotools suite is used to configure the OCF root directory, the Asciidoc tool which is used to generate documentation and the default daemon user (usually hacluster).

It then calls the python setuptools setup.py to actually process the Python module sources and install into the Python system site-packages directory.

./autogen.sh
./configure
make
make install

Test suites

There are two sets of tests: Unit tests and regression tests.

Unit tests

In local:

  • pip install tox
  • In root directory of crmsh project, run tox

Functional tests

In local:

  • In root directory of crmsh project, run ./test/run-functional-tests [OPTIONS]|[TESTCASE INDEX]
# ./test/run-functional-tests -h
Usage: run-functional-tests [OPTIONS]|[TESTCASE INDEX]
run-functional-tests is a tool for developers to setup the cluster in containers to run functional tests.
The container image is based on Tumbleweed with preinstalled packages of the cluster stack include pacemaker/corosync/crmsh and many others.
Users can make the code change under crmsh.git including test cases. This tool will pick up the code change and "make install" to all running containers.

OPTIONS:
  -h, --help		Show this help message and exit
  -l            	List existing functional test cases and exit
  -n NUM        	Only setup a cluster with NUM nodes(containers)
  -x			Don't config corosync on containers(with -n option)
  -d            	Cleanup the cluster containers

The docker base image used is defined in the Dockerfile included in the repository.

In github action

Manifest

./doc: man page, source for the website and other documentation
./crmsh: the code
./templates: configuration templates
./test: unit tests and regression tests
./contrib: vim highlighting scripts and other semi-related
           contributions
./crm report: log file collection and analysis tool

Development

The source code for crmsh is kept in a git source repository. To check out the latest development version, install git and run this command:

git clone https://github.com/ClusterLabs/crmsh

There is a git pre-commit hook used to update the data-manifest which lists all the data files to be installed. To install this, run

cp contrib/git-hook-pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Contributing

You can contribute following the standard fork -> clone -> change -> pull request Github process for code changes. The pull request process is integrated with the openSUSE Build Service, and as soon as it gets merged, a new RPM package is built on network:ha-clustering:Unstable and a submit request is created to the crmsh package maintainers at network:ha-clustering:Factory.

The commit messages are used to create the changelog, so, please, include relevant and comprehensive messages on your commits.

Community

More Repositories

1

pacemaker

Pacemaker is an advanced, scalable High-Availability cluster resource manager
C
1,035
star
2

resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
Shell
491
star
3

PAF

PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.
Perl
340
star
4

pcs

Pacemaker command line interface and GUI
Python
249
star
5

libqb

libqb is a library providing high performance logging, tracing, ipc, and poll.
C
165
star
6

hawk

A web-based GUI for managing and monitoring the Pacemaker High-Availability cluster resource manager
JavaScript
151
star
7

fence-agents

Fence agents
Python
104
star
8

ha_cluster_exporter

Prometheus exporter for Pacemaker based Linux HA clusters
Go
79
star
9

striker

The Anvil! Intelligent Availabilityâ„¢ Platform - Striker UI and ScanCore decision engine
Perl
26
star
10

OCF-spec

C
20
star
11

cluster-glue

Reusable Cluster Components ("glue")
C
18
star
12

fence-virt

Virtual Machine I/O Fencing
12
star
13

hawk-apiserver

Next generation HA cluster interface
Go
12
star
14

pacemaker-1.0

Code for the older 1.0 series of Pacemaker
Graphviz (DOT)
12
star
15

pcs-web-ui

Web interface for pcs
TypeScript
10
star
16

go-pacemaker

Go API for the Pacemaker cluster resource manager
Go
7
star
17

clusterlabs-www

Content for clusterlabs.org
HTML
5
star
18

anvil

The Anvil! Intelligent Availabilityâ„¢ Platform, mark 3
Perl
5
star
19

high-laughability

Quotes from our HA overlords
4
star
20

nagios-agents-metadata

OCF metadata files to enable use of nagios agents in pacemaker.
3
star
21

anvil-external-deps

collection of scripts and spec files for Anvil!
Shell
2
star