From bf937b8fef6bcae0a95f6389bb98a809101f8834 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 17 Nov 2020 12:28:33 +0100 Subject: [PATCH 01/10] Update README.md more details for XSite example --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 92ae7d8..0c933e3 100644 --- a/README.md +++ b/README.md @@ -324,6 +324,51 @@ xsite: port: 7200 ``` +Next the (local) port 7900 must be mapped to the port defined in the configuration (7200). On Docker for example by using `-p 7200:7900` + +Note: Caches won't be created automatically on the other side. So these must be created manually with the same name. + +So create a new cache either using the console (http://localhost:11222) or curl (or similar tool) +`curl -XPOST -u : -H "Content-Type: application/xml" -d "@" http://localhost:11222/rest/v2/caches/xsite-cache` + +LON-Site: +``` + + + + + + + + + +``` + +NYC-Site: +``` + + + + + + + + + +``` + +To test the replication, simply create a key on one site and search for it on the other site, where it will be available then, too. + +Docker command example for two sites on same system (but you have to use different ports for both sites): + +Infinispan 1 - in network "bridge" - admin port 11222, jgroups port 7300: + +`docker run --rm -p 11222:11222 -p 7300:7900 -v c:/work/InfiniSpan:/user-config --name infinispan1 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config1.yaml" --network bridge infinispan/server:11.0.4.Final-2` + +Infinispan 2 - in network "Bridge2" (created by `docker network create -d bridge Bridge2`) - admin port 12222, jgroups port 7200: + +`docker run --rm -p 12222:11222 -p 7200:7900 -v c:/work/InfiniSpan:/user-config --name infinispan2 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config2.yaml" --network Bridge2 infinispan/server:11.0.4.Final-2` + ## Java Properties It's possible to provide additional java properties and JVM options to all of the images via the `JAVA_OPTIONS` env variable. For example, to quickly configure CORS without providing a server.yaml file, it's possible to do the following: From 87af2d5d11f2b051566997f197fd669162b488ef Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 17 Nov 2020 17:25:32 +0100 Subject: [PATCH 02/10] Update README.md more generic Co-authored-by: Pedro Ruivo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c933e3..33f2eab 100644 --- a/README.md +++ b/README.md @@ -363,7 +363,7 @@ Docker command example for two sites on same system (but you have to use differe Infinispan 1 - in network "bridge" - admin port 11222, jgroups port 7300: -`docker run --rm -p 11222:11222 -p 7300:7900 -v c:/work/InfiniSpan:/user-config --name infinispan1 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config1.yaml" --network bridge infinispan/server:11.0.4.Final-2` +`docker run --rm -p 11222:11222 -p 7300:7900 -v :/user-config --name infinispan1 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config1.yaml" --network bridge infinispan/server Infinispan 2 - in network "Bridge2" (created by `docker network create -d bridge Bridge2`) - admin port 12222, jgroups port 7200: From 3198937f1a8dd3d6c1f85d9ca11b5150bb21aa04 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 17 Nov 2020 17:25:43 +0100 Subject: [PATCH 03/10] Update README.md more generic Co-authored-by: Pedro Ruivo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33f2eab..5f2dafb 100644 --- a/README.md +++ b/README.md @@ -367,7 +367,7 @@ Infinispan 1 - in network "bridge" - admin port 11222, jgroups port 7300: Infinispan 2 - in network "Bridge2" (created by `docker network create -d bridge Bridge2`) - admin port 12222, jgroups port 7200: -`docker run --rm -p 12222:11222 -p 7200:7900 -v c:/work/InfiniSpan:/user-config --name infinispan2 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config2.yaml" --network Bridge2 infinispan/server:11.0.4.Final-2` +`docker run --rm -p 12222:11222 -p 7200:7900 -v :/user-config --name infinispan2 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config2.yaml" --network Bridge2 infinispan/server` ## Java Properties It's possible to provide additional java properties and JVM options to all of the images via the `JAVA_OPTIONS` env variable. From 23bbd4a0449bc71e86b21ef458ad27179acc40cd Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 09:39:47 +0100 Subject: [PATCH 04/10] Update README.md added config1 + 2 --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 5f2dafb..a69e530 100644 --- a/README.md +++ b/README.md @@ -361,10 +361,55 @@ To test the replication, simply create a key on one site and search for it on th Docker command example for two sites on same system (but you have to use different ports for both sites): +Config1: + +``` +jgroups: + diagnostics: true + encrypt: false +xsite: + address: + name: NYC + port: 7300 + backups: + - address: + name: LON + port: 7200 +logging: + console: + level: debug + categories: + com.arjuna: warn + org.jgroups: debug +``` + + Infinispan 1 - in network "bridge" - admin port 11222, jgroups port 7300: `docker run --rm -p 11222:11222 -p 7300:7900 -v :/user-config --name infinispan1 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config1.yaml" --network bridge infinispan/server +Config1: + +``` +jgroups: + diagnostics: true + encrypt: false +xsite: + address: + name: LON + port: 7200 + backups: + - address: + name: NYC + port: 7300 +logging: + console: + level: debug + categories: + com.arjuna: warn + org.jgroups: debug +``` + Infinispan 2 - in network "Bridge2" (created by `docker network create -d bridge Bridge2`) - admin port 12222, jgroups port 7200: `docker run --rm -p 12222:11222 -p 7200:7900 -v :/user-config --name infinispan2 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config2.yaml" --network Bridge2 infinispan/server` From 3b06b901b0ee44846fece82edc997debc33648e4 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 16:01:35 +0100 Subject: [PATCH 05/10] Update README.md clarify description Co-authored-by: Don Naro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a69e530..720b765 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,7 @@ NYC-Site: To test the replication, simply create a key on one site and search for it on the other site, where it will be available then, too. -Docker command example for two sites on same system (but you have to use different ports for both sites): +Docker command example for two sites using different ports on the same host: Config1: From d9cbcf0619f397bb13d6bc268e9d062563982501 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 16:02:05 +0100 Subject: [PATCH 06/10] Update README.md Co-authored-by: Don Naro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 720b765..ccfce94 100644 --- a/README.md +++ b/README.md @@ -357,7 +357,7 @@ NYC-Site: ``` -To test the replication, simply create a key on one site and search for it on the other site, where it will be available then, too. +To test replication, create a key on one site then search for it on the other site. Docker command example for two sites using different ports on the same host: From ac0faa375c874d8647af7057fc96a3638b732fdb Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 16:02:28 +0100 Subject: [PATCH 07/10] Update README.md Co-authored-by: Don Naro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ccfce94..ace748a 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,7 @@ Next the (local) port 7900 must be mapped to the port defined in the configurati Note: Caches won't be created automatically on the other side. So these must be created manually with the same name. -So create a new cache either using the console (http://localhost:11222) or curl (or similar tool) +To create a new cache, use the console (http://localhost:11222) or a tool such as curl: `curl -XPOST -u : -H "Content-Type: application/xml" -d "@" http://localhost:11222/rest/v2/caches/xsite-cache` LON-Site: From aaff7d4aa05415336363c151bdd59f8b5ea88861 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 17:15:44 +0100 Subject: [PATCH 08/10] Update README.md Co-authored-by: Don Naro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ace748a..844ca58 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ xsite: port: 7200 ``` -Next the (local) port 7900 must be mapped to the port defined in the configuration (7200). On Docker for example by using `-p 7200:7900` +Map the local port `7900` to the port defined in the configuration (`7200`). On Docker, for example, use `-p 7200:7900` Note: Caches won't be created automatically on the other side. So these must be created manually with the same name. From 75eb92b7ed87c6311a4d520fac424ed0755e249c Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 17:16:01 +0100 Subject: [PATCH 09/10] Update README.md Co-authored-by: Don Naro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 844ca58..d001a07 100644 --- a/README.md +++ b/README.md @@ -326,7 +326,7 @@ xsite: Map the local port `7900` to the port defined in the configuration (`7200`). On Docker, for example, use `-p 7200:7900` -Note: Caches won't be created automatically on the other side. So these must be created manually with the same name. +Note: Caches aren't created automatically on the other site. You must manually create caches with identical names. To create a new cache, use the console (http://localhost:11222) or a tool such as curl: `curl -XPOST -u : -H "Content-Type: application/xml" -d "@" http://localhost:11222/rest/v2/caches/xsite-cache` From 0f255354838c9c22a5ec3cd2b7376ac443f83676 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 18 Nov 2020 17:16:37 +0100 Subject: [PATCH 10/10] Update README.md Co-authored-by: Pedro Ruivo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d001a07..f6cd207 100644 --- a/README.md +++ b/README.md @@ -388,7 +388,7 @@ Infinispan 1 - in network "bridge" - admin port 11222, jgroups port 7300: `docker run --rm -p 11222:11222 -p 7300:7900 -v :/user-config --name infinispan1 -e IDENTITIES_PATH="/user-config/identities.yaml" -e CONFIG_PATH="/user-config/config1.yaml" --network bridge infinispan/server -Config1: +Config2: ``` jgroups: