This repository contains Python scripts to automate the setup and promotion of Elasticsearch cross-cluster replication (CCR). The repository includes two primary scripts:
- CCR Bootstrap Script: Automates the initial setup of CCR between leader and follower clusters.
- CCR Cutover Script: Promotes follower indices to leader indices once they have caught up.
- Unified Configuration: Manage configurations for both leader and follower clusters with a single JSON file.
- Error Handling: Enhanced error logging and retries for robustness.
- Concurrency: Uses
ThreadPoolExecutor
for concurrent API requests to speed up the replication setup. - Security: Secure handling of sensitive information like API keys.
- Python 3.6 or higher
requests
library for the bootstrap scriptelasticsearch
library for the cutover script
To get started, clone this repository and install the required Python packages:
git clone
cd your-repository-directory
pip install -r requirements.txt