Hazelcast Docker Image - YAML configuration

221 views
Skip to first unread message

miloss....@gmail.com

unread,
Jan 13, 2020, 11:20:44 AM1/13/20
to Hazelcast
Hello.

I'm using Kubernetes in Hazelcast using image  hazelcast/hazelcast:3.12.5 from https://hub.docker.com/r/hazelcast/hazelcast/tags.  Everything works OK with XML configuration.
However I would like to use YAML configuration. Is it somehow possible in combination with Hazelcast image? I'm always getting: "com.hazelcast.core.HazelcastException: Config file at '/data/hazelcast/hazelcast.xml' doesn't exist."

Thank you for your response.

Best regards,
Milos.

Rafal Leszko

unread,
Jan 13, 2020, 11:24:44 AM1/13/20
to haze...@googlegroups.com
Hi Milos,

Yes, it is possible. You would usually:
1. Create a ConfigMap with your Hazelcast configuration
2. Mount into your Pod/Container
3. Specify `-Dhazelcast.config=<path-to-mounted-yaml>`

The best to check how to do it is to look at our Helm Chart, we use YAML there:

Cheers,
Rafał 

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/40a1040e-2e89-4561-bff5-b3e0e91f4d6e%40googlegroups.com.


--
Rafał Leszko
Software Engineer
@RafalLeszko

miloss....@gmail.com

unread,
Jan 20, 2020, 7:00:21 AM1/20/20
to Hazelcast
Thank you. It helped me quite a lot.
There is one more thing I would like to ask. I'm using hazelcast image version 3.12.5 from https://hub.docker.com/r/hazelcast/hazelcast
Based on the description by default POD is supposed to take up to 80% memory. However it seems it doesn't. 
I tried to set "XX:MaxRAMPercentage" but I got: "Improperly specified VM option"

Have you heard about similar problem.
Thank you for your response in advance.

Regards,
Milos.


On Monday, January 13, 2020 at 5:24:44 PM UTC+1, Rafal Leszko wrote:
Hi Milos,

Yes, it is possible. You would usually:
1. Create a ConfigMap with your Hazelcast configuration
2. Mount into your Pod/Container
3. Specify `-Dhazelcast.config=<path-to-mounted-yaml>`

The best to check how to do it is to look at our Helm Chart, we use YAML there:

Cheers,
Rafał 

On Mon, Jan 13, 2020 at 5:20 PM <miloss....@gmail.com> wrote:
Hello.

I'm using Kubernetes in Hazelcast using image  hazelcast/hazelcast:3.12.5 from https://hub.docker.com/r/hazelcast/hazelcast/tags.  Everything works OK with XML configuration.
However I would like to use YAML configuration. Is it somehow possible in combination with Hazelcast image? I'm always getting: "com.hazelcast.core.HazelcastException: Config file at '/data/hazelcast/hazelcast.xml' doesn't exist."

Thank you for your response.

Best regards,
Milos.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.

Rafal Leszko

unread,
Jan 20, 2020, 7:25:12 AM1/20/20
to haze...@googlegroups.com
Hi Milos,

For the default 80%, I guess the change was not released yet in 3.12.5. You can try it in the `latest` image.
If you want to use 80% in the 3.12.5 version, please add the following env variable: JAVA_OPTS='-XX:MaxRAMPercentage=80.0'. It actually should work fine.

Cheers,
Rafał

To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/9021737b-9b70-4436-b863-9d8faa761638%40googlegroups.com.

miloss....@gmail.com

unread,
Feb 20, 2020, 11:37:36 AM2/20/20
to Hazelcast
Thank you very much. 
Reply all
Reply to author
Forward
0 new messages