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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patroni_cli-0.1.2.tar.gz.
File metadata
- Download URL: patroni_cli-0.1.2.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 |
1ff20e96b61143bffa33d8f9af847a8ced1b966d696044df92ffc78d1eff6915
|
|
| MD5 |
1d36dc11394bc4260d24fa27f6c0ca6c
|
|
| BLAKE2b-256 |
3b8a916dc47357c5ad4537e092d0cd9c92acb69e1778c66c26230bdb8433092c
|
File details
Details for the file patroni_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: patroni_cli-0.1.2-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 |
651175ba97c75e47eb011ac3bb7b35c20b15eb981a1157f270e4216bef5042e5
|
|
| MD5 |
6c7af9d4b8b8a02f442e71f719d4a266
|
|
| BLAKE2b-256 |
3cf24265e7091694f94d735b3f2bcf2e70e4296a80ae113cea999cdfe1ea54ce
|