A CLI tool to manage Patroni cluster, elect new leaders, and perform switchover.
Project description
Patroni CLI
Patroni CLI is a command-line tool that allows you to manage a Patroni PostgreSQL cluster. You can use it to view cluster status, elect new leaders, and perform switchovers between nodes.
Features
- View Cluster Status: List all cluster members and their roles.
- Elect New Leader: Trigger a failover and elect a new leader for the cluster.
- Switchover: Perform a switchover to a specified node or any healthy node.
Installation
You can install the Patroni CLI via pip after packaging:
pip install patroni-cli
Usage
Here are the available commands:
Check Cluster Status
patroni-cli --url http://localhost:8008 --username admin --password admin status
Elect a New Leader
patroni-cli --url http://localhost:8008 --username admin --password admin elect new_leader_name
Perform a Switchover
patroni-cli --url http://localhost:8008 --username admin --password admin switchover target_leader_name
If you want to perform a switchover without specifying a target leader, use:
patroni-cli --url http://localhost:8008 --username admin --password admin switchover
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
patroni_cli-0.1.1.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file patroni_cli-0.1.1.tar.gz
.
File metadata
- Download URL: patroni_cli-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 702449102c79c2f6a4327100c733e257a6a3c6774e44069e62d0d4e1a2010880 |
|
MD5 | 5296131059dcf40f7fa78b9acccb280d |
|
BLAKE2b-256 | 535c20bd0b1c9ab1e43ee36ba1950794023f5892b0415a37e67661afaa377720 |
File details
Details for the file patroni_cli-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: patroni_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76218cfd008074342b26134b5ace202d8faa509480a62b1cb465e30d5eb3f0fa |
|
MD5 | 9c416afd004a806a30284e16524931a6 |
|
BLAKE2b-256 | 43e254dcffa42b4ada2b81330f1f01c66d8ee2e1927037ddd97f2da55d1eef46 |