Elasticsearch Configuration Guide
Crafter Deployer provides two ways to use Elasticsearch:
Single Elasticsearch Cluster
This is the most common configuration used, all operations will be performed on a single Elasticsearch cluster:
1 target: 2 search: 3 elasticsearch: 4 # Single cluster 5 urls: 6 - 'http://es-cluster-node-1:9200' 7 - 'http://es-cluster-node-2:9200'
Multiple Elasticsearch Clusters
Using this configuration all read operations will be performed on one Elasticsearch cluster but write operations will be performed on multiple Elasticsearch clusters:
1 target: 2 search: 3 elasticsearch: 4 # Global auth, used for all clusters 5 username: elastic 6 password: passw0rd 7 # Cluster for read operations 8 readCluster: 9 urls: 10 - 'http://read-cluster-node-1:9200' 11 - 'http://read-cluster-node-2:9200' 12 # This cluster will use the global auth 13 # Clusters for write operations 14 writeClusters: 15 - urls: 16 - 'http://write-cluster-1-node-1:9200' 17 - 'http://write-cluster-1-node-2:9200' 18 # This cluster will use the global auth 19 - urls: 20 - 'http://write-cluster-2-node-1:9200' 21 - 'http://write-cluster-2-node-2:9200' 22 # Override the global auth for this cluster 23 username: elastic2 24 password: passw0rd2
The Elasticsearch configuration can be changed in two places:
- Global configuration file
$CRAFTER_HOME/bin/crafter-deployer/config/base-target.yaml, this will be applied to all targets loaded.
- Individual target configuration file