You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by vas aj <va...@gmail.com> on 2020/03/23 23:31:35 UTC
Spinning Geode locators using docker compose
Hi team,
I am trying to set up a Geode cluster with one locator for WRITE and
another locator for READ using docker-compose.
*The following docker command is the only working model I have found out so
far :*
docker run --rm -it --network my-docker-network --hostname my.hostname.net
-p 10550:10334 -p *40404*:40404 apachegeode/geode:1.11.0
gfsh > start locator --name=locator1 --hostname-for-clients=my.hostname.net
gfsh > start server --name=server1 --locators=my.hostname.net[10334]
--server-port=*40404*
gfsh > create region --name=my-region --type=PARTITION_PERSISTENT
Below is the cache.xml to connect to geode locator @ my.hostname.net
<?xml version="1.0" encoding="UTF-8"?>
<client-cache>
<pool name="clientCachePool">
<locator host="my.hostname.net" port="10550"/>
</pool>
<region name="my-region" refid="PROXY"/>
</client-cache>
The problem I face is if I don't expose server port *40404* or I expose
server port as 50505, I fail to connect to geode locator @ my.hostname.net.
In docker-compose.yml, I cannot expose 2 containers on the same port #
40404.
How can I spin 2 locators using docker-compose so that I can connect to
WRITE locator @ 10550 and READ locator @ 10551?
Kindly help.
Thanks,
> Aj
RE: Spinning Geode locators using docker compose
Posted by Alberto Bustamante Reyes <al...@est.tech>.
Hi,
Some months ago I was using docker compose for starting a cluster with one locator and two servers for testing purposes.
You can check it here, I hope it helps: https://github.com/alb3rtobr/geode-docker
BR/
Alberto B.
________________________________
De: vas aj <va...@gmail.com>
Enviado: martes, 24 de marzo de 2020 0:31
Para: user@geode.apache.org <us...@geode.apache.org>; dev@geode.apache.org <de...@geode.apache.org>
Asunto: Spinning Geode locators using docker compose
Hi team,
I am trying to set up a Geode cluster with one locator for WRITE and another locator for READ using docker-compose.
The following docker command is the only working model I have found out so far :
docker run --rm -it --network my-docker-network --hostname my.hostname.net<http://my.hostname.net> -p 10550:10334 -p 40404:40404 apachegeode/geode:1.11.0
gfsh > start locator --name=locator1 --hostname-for-clients=my.hostname.net<http://my.hostname.net>
gfsh > start server --name=server1 --locators=my.hostname.net<http://my.hostname.net>[10334] --server-port=40404
gfsh > create region --name=my-region --type=PARTITION_PERSISTENT
Below is the cache.xml to connect to geode locator @ my.hostname.net<http://my.hostname.net>
<?xml version="1.0" encoding="UTF-8"?>
<client-cache>
<pool name="clientCachePool">
<locator host="my.hostname.net<http://my.hostname.net>" port="10550"/>
</pool>
<region name="my-region" refid="PROXY"/>
</client-cache>
The problem I face is if I don't expose server port 40404 or I expose server port as 50505, I fail to connect to geode locator @ my.hostname.net<http://my.hostname.net>.
In docker-compose.yml, I cannot expose 2 containers on the same port # 40404.
How can I spin 2 locators using docker-compose so that I can connect to WRITE locator @ 10550 and READ locator @ 10551?
Kindly help.
Thanks,
Aj
RE: Spinning Geode locators using docker compose
Posted by Alberto Bustamante Reyes <al...@est.tech>.
Hi,
Some months ago I was using docker compose for starting a cluster with one locator and two servers for testing purposes.
You can check it here, I hope it helps: https://github.com/alb3rtobr/geode-docker
BR/
Alberto B.
________________________________
De: vas aj <va...@gmail.com>
Enviado: martes, 24 de marzo de 2020 0:31
Para: user@geode.apache.org <us...@geode.apache.org>; dev@geode.apache.org <de...@geode.apache.org>
Asunto: Spinning Geode locators using docker compose
Hi team,
I am trying to set up a Geode cluster with one locator for WRITE and another locator for READ using docker-compose.
The following docker command is the only working model I have found out so far :
docker run --rm -it --network my-docker-network --hostname my.hostname.net<http://my.hostname.net> -p 10550:10334 -p 40404:40404 apachegeode/geode:1.11.0
gfsh > start locator --name=locator1 --hostname-for-clients=my.hostname.net<http://my.hostname.net>
gfsh > start server --name=server1 --locators=my.hostname.net<http://my.hostname.net>[10334] --server-port=40404
gfsh > create region --name=my-region --type=PARTITION_PERSISTENT
Below is the cache.xml to connect to geode locator @ my.hostname.net<http://my.hostname.net>
<?xml version="1.0" encoding="UTF-8"?>
<client-cache>
<pool name="clientCachePool">
<locator host="my.hostname.net<http://my.hostname.net>" port="10550"/>
</pool>
<region name="my-region" refid="PROXY"/>
</client-cache>
The problem I face is if I don't expose server port 40404 or I expose server port as 50505, I fail to connect to geode locator @ my.hostname.net<http://my.hostname.net>.
In docker-compose.yml, I cannot expose 2 containers on the same port # 40404.
How can I spin 2 locators using docker-compose so that I can connect to WRITE locator @ 10550 and READ locator @ 10551?
Kindly help.
Thanks,
Aj