From b4042d16971bdb1aaa0799e7a3a09f19e7fccecd Mon Sep 17 00:00:00 2001 From: Yulia Cech Date: Thu, 22 Oct 2020 15:22:01 +0200 Subject: [PATCH 1/3] Update Cross cluster replication README.md on how to start 2 Elasticsearch clusters for local testing. --- x-pack/plugins/cross_cluster_replication/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/README.md b/x-pack/plugins/cross_cluster_replication/README.md index 8baccf4f7333e..0babb848975c9 100644 --- a/x-pack/plugins/cross_cluster_replication/README.md +++ b/x-pack/plugins/cross_cluster_replication/README.md @@ -4,11 +4,12 @@ You can run a local cluster and simulate a remote cluster within a single Kibana directory. -1. Run `yarn es snapshot --license=trial` and kill the process once the snapshot has been installed. -2. Duplicate the ES installation by running `cp -aR .es/8.0.0 .es/8.0.0-2`. -3. Start your "local" cluster by running `.es/8.0.0/bin/elasticsearch` and starting Kibana. -4. Start your "remote" cluster by running `.es/8.0.0-2/bin/elasticsearch -E cluster.name=europe -E transport.port=9400`. -5. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. +1. Start your "local" cluster by running `yarn es snapshot --license=trial` and `yarn start` to start Kibana. +2. Download Elasticsearch repository, preferably to a folder adjacent to Kibana. +3. Start your "remote" cluster by running `yarn es source --source-path={PATH/TO/ELASTICSEARCH/REPOSITORY} --license=trial -E cluster.name=europe -E transport.port=9400`. + - Parameter `--source-path` defaults to `../elasticsearch` and can be omitted if Elasticsearch repository is at the same level as Kibana: + `yarn es source --license=trial -E cluster.name=europe -E transport.port=9400`. +4. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. Note that these settings are required for testing auto-follow pattern conflicts errors (see below). Now you can create follower indices and auto-follow patterns to replicate the `my-leader-index` From 1494f05f7db00a9c0619b15bd913ae3cab8d1a6f Mon Sep 17 00:00:00 2001 From: Yulia Cech Date: Fri, 30 Oct 2020 17:55:36 +0100 Subject: [PATCH 2/3] Update README.md for an easier CCR local testing setup --- x-pack/plugins/cross_cluster_replication/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/README.md b/x-pack/plugins/cross_cluster_replication/README.md index 0babb848975c9..26c71f75aa77d 100644 --- a/x-pack/plugins/cross_cluster_replication/README.md +++ b/x-pack/plugins/cross_cluster_replication/README.md @@ -5,11 +5,8 @@ You can run a local cluster and simulate a remote cluster within a single Kibana directory. 1. Start your "local" cluster by running `yarn es snapshot --license=trial` and `yarn start` to start Kibana. -2. Download Elasticsearch repository, preferably to a folder adjacent to Kibana. -3. Start your "remote" cluster by running `yarn es source --source-path={PATH/TO/ELASTICSEARCH/REPOSITORY} --license=trial -E cluster.name=europe -E transport.port=9400`. - - Parameter `--source-path` defaults to `../elasticsearch` and can be omitted if Elasticsearch repository is at the same level as Kibana: - `yarn es source --license=trial -E cluster.name=europe -E transport.port=9400`. -4. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. +2. Start your "remote" cluster by running `yarn es source --license=trial -E cluster.name=europe -E transport.port=9400` in a separate terminal tab. +3. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. Note that these settings are required for testing auto-follow pattern conflicts errors (see below). Now you can create follower indices and auto-follow patterns to replicate the `my-leader-index` From cf4d44102ea4bdb4600029afab41130de3211423 Mon Sep 17 00:00:00 2001 From: Yulia Cech Date: Fri, 30 Oct 2020 18:41:55 +0100 Subject: [PATCH 3/3] Fix the command for a remote cluster --- x-pack/plugins/cross_cluster_replication/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/cross_cluster_replication/README.md b/x-pack/plugins/cross_cluster_replication/README.md index 26c71f75aa77d..9c500950c20df 100644 --- a/x-pack/plugins/cross_cluster_replication/README.md +++ b/x-pack/plugins/cross_cluster_replication/README.md @@ -5,7 +5,7 @@ You can run a local cluster and simulate a remote cluster within a single Kibana directory. 1. Start your "local" cluster by running `yarn es snapshot --license=trial` and `yarn start` to start Kibana. -2. Start your "remote" cluster by running `yarn es source --license=trial -E cluster.name=europe -E transport.port=9400` in a separate terminal tab. +2. Start your "remote" cluster by running `yarn es snapshot --license=trial -E cluster.name=europe -E transport.port=9400` in a separate terminal tab. 3. Index a document into your remote cluster by running `curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"`. Note that these settings are required for testing auto-follow pattern conflicts errors (see below).