[Geoserver-devel] Geoserver and JMS clustering

Earlier this month I’ve gave a workshop on geoserver clustering configuration.

Used the JMS cluster community module with a dedicated ActiveMQ broker, which worked fantastically, great job there.

It loads balance with a dockercloud/haproxy docker container and uses sticky sessions to access the web UI, so no need to have a dedicated “master” with UI access. I know there are a thousand topologies you can use, but this one seemed just so easy for an introductory course and worked so well that I was impressed.

You can check this docker-compose config [1]

The only pitfall to get it running properly on docker was to change the activemq server uri to use the 0.0.0.0 IP address, you’ll see in the Dockerfile[2]
“-Dactivemq.transportConnectors.server.uri="tcp://0.0.0.0:61666” added to the CATALINA_OPTS env variable. This is so the server listens on all interfaces and not just the loopback one 127.0.0.1. It would be great if the default was changed from 127.0.0.1 to 0.0.0.0

The other trick was to dynamically give each instance a unique id, which is done in the geoserver instance config by overriding the docker image’s startup comment with "command: /bin/bash -c “instanceName=$$(/bin/hostname) /usr/local/bin/start.sh”

All in all, I’m really enthusiastic about these community modules and hope to contribute asap.

Finally, thanks a lot to GeoSolutions for letting me use their documentation [3] to prepare the workshop’s material.

[1] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker_externo_scale/docker-compose.yml>
[2] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker/Dockerfile>
[3] <https://geoserver.geo-solutions.it/edu/en/clustering/>

Gabriel Roldán

the workshop was AMAZING !..congrats Gabriel !

We are using same kind of stuff/way-of-working at company, and now working on some additional steps with kubernates, etc. Anyone who requires to cluster geoserver instances…should check the repos that Gabriel shared (in my fork, I’m working on some extra orchestation steps)

···

José Macchi

Geo DevOps
Frontec S.A.

Hi Gabriel,
thanks for your kind words.

I will try to spare some of our devops time to capture all this into
our documentation.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati personali
(Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati
“GDPR”), si precisa che ogni circostanza inerente alla presente email
(il suo contenuto, gli eventuali allegati, etc.) è un dato la cui
conoscenza è riservata al/i solo/i destinatario/i indicati dallo
scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a
cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato
se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential
or otherwise protected from disclosure. We remind that - as provided
by European Regulation 2016/679 “GDPR” - copying, dissemination or use
of this e-mail or the information herein by anyone other than the
intended recipient is prohibited. If you have received this email by
mistake, please notify us immediately by telephone or e-mail.

On Tue, Apr 30, 2019 at 1:39 AM Gabriel Roldan <gabriel.roldan@anonymised.com> wrote:

Earlier this month I've gave a workshop on geoserver clustering configuration.

Used the JMS cluster community module with a dedicated ActiveMQ broker, which worked fantastically, great job there.

It loads balance with a dockercloud/haproxy docker container and uses sticky sessions to access the web UI, so no need to have a dedicated "master" with UI access. I know there are a thousand topologies you can use, but this one seemed just so easy for an introductory course and worked so well that I was impressed.

You can check this docker-compose config [1]

The only pitfall to get it running properly on docker was to change the activemq server uri to use the 0.0.0.0 IP address, you'll see in the Dockerfile[2]
"-Dactivemq.transportConnectors.server.uri=\"tcp://0.0.0.0:61666" added to the CATALINA_OPTS env variable. This is so the server listens on all interfaces and not just the loopback one 127.0.0.1. It would be great if the default was changed from 127.0.0.1 to 0.0.0.0

The other trick was to dynamically give each instance a unique id, which is done in the geoserver instance config by overriding the docker image's startup comment with "command: /bin/bash -c "instanceName=$$(/bin/hostname) /usr/local/bin/start.sh"

All in all, I'm really enthusiastic about these community modules and hope to contribute asap.

Finally, thanks a lot to GeoSolutions for letting me use their documentation [3] to prepare the workshop's material.

[1] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker_externo_scale/docker-compose.yml&gt;
[2] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker/Dockerfile&gt;
[3] <https://geoserver.geo-solutions.it/edu/en/clustering/&gt;
--
Gabriel Roldán
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Gabriel I was looking at setting up a Artifactory or Nexus for the geotools project.

If you want a community space to share docker containers I should choose Nexus (which has docker support out of the box).

···


Jody Garnett

Jody,

Is it worth looking into publishing GeoTools (and maybe GWC/GS) on Maven Central?

Cheers,

Jim

···

On 4/30/19 3:06 PM, Jody Garnett wrote:

Gabriel I was looking at setting up a Artifactory or Nexus for the geotools project.

If you want a community space to share docker containers I should choose Nexus (which has docker support out of the box).


Jody Garnett

On Mon, 29 Apr 2019 at 16:39, Gabriel Roldan <gabriel.roldan@anonymised.com> wrote:

Earlier this month I’ve gave a workshop on geoserver clustering configuration.

Used the JMS cluster community module with a dedicated ActiveMQ broker, which worked fantastically, great job there.

It loads balance with a dockercloud/haproxy docker container and uses sticky sessions to access the web UI, so no need to have a dedicated “master” with UI access. I know there are a thousand topologies you can use, but this one seemed just so easy for an introductory course and worked so well that I was impressed.

You can check this docker-compose config [1]

The only pitfall to get it running properly on docker was to change the activemq server uri to use the 0.0.0.0 IP address, you’ll see in the Dockerfile[2]
“-Dactivemq.transportConnectors.server.uri="tcp://0.0.0.0:61666” added to the CATALINA_OPTS env variable. This is so the server listens on all interfaces and not just the loopback one 127.0.0.1. It would be great if the default was changed from 127.0.0.1 to 0.0.0.0

The other trick was to dynamically give each instance a unique id, which is done in the geoserver instance config by overriding the docker image’s startup comment with "command: /bin/bash -c “instanceName=$$(/bin/hostname) /usr/local/bin/start.sh”

All in all, I’m really enthusiastic about these community modules and hope to contribute asap.

Finally, thanks a lot to GeoSolutions for letting me use their documentation [3] to prepare the workshop’s material.

[1] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker_externo_scale/docker-compose.yml>
[2] <https://github.com/groldan/2019_foss4g-ar_taller_geoserver/blob/master/docker/broker/Dockerfile>
[3] <https://geoserver.geo-solutions.it/edu/en/clustering/>

Gabriel Roldán


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@lists.sourceforge.net](mailto:Geoserver-devel@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)

Thank Jody,

I wasn’t sure what you mean by that. Lurking online seems like a nice idea. Gonna keep it in mind in case I find the stamina to move forward with a couple project ideas rounding my mind.

Cheers!

···

Gabriel Roldán

Not sure, we depend on a lot of odd custom forks… I thought that was against maven central policies.

···


Jody Garnett