Date
1 - 2 of 2
Docker support for ConfiguredGraphFactory
Mike Thomsen <mikert...@...>
I spent a while today looking through the janusgraph-docker repository on GitHub, and it didn't look like there is a good way to configure a ConfiguredGraphFactory without injecting a custom configuration file. Is that correct?
My general process went like this:
1. Copied the vanilla gremlin-server.yaml and changed graphs to look like this:
graphs: {
ConfigurationManagementGraph: /etc/opt/janusgraph/configured_graph.properties
}
2. Added a simple properties file that contains a basic setup for CQL + ES that points to the docker hosts for them.
3. Wrapped that with a Dockerfile like this:
FROM janusgraph/janusgraph:latest
COPY gremlin-server.yaml /opt/janusgraph/conf/gremling-server.yaml
COPY configured_graph.properties /etc/opt/janusgraph/configured_graph.properties
When I brought that up with Docker Compose, I got errors saying that the YAML failed to parse and the graphs block that it printed out didn't resemble my configuration file.
Has anyone figured out a good way to make this work?
Thanks,
Mike
Michael Kaiser-Cross <mkaise...@...>
Hi Mike,
toggle quoted message
Show quoted text
I think the problem might be that the docker image replaces parts of the gremlin-server.yaml file at runtime using env variables. So not sure if copying the gremlin-server.yaml file will be a reliable way of setting the configuration as it is meant to be configured through env variables.
I was trying use ConfigurationManagementGraph in docker a while back however I found that you can't set the graphs.ConfigurationManagementGraph property without getting a yaml syntax error. The reason is simple which is that there isn't a true yaml parser but rather a basic sed replace command for manipulating the yaml file. I believe this was a temporary solution to cover basic use cases but it does not work with nested properties and was meant to eventually be replaced by an actual yaml parser. I made this pull request to do just that a while back but never got the merge completely finished. Here is the pull request https://github.com/JanusGraph/janusgraph-docker/pull/55/commits. I'll see if I can get this moving again.
Mike KC
On Friday, October 16, 2020 at 6:34:12 PM UTC-4 Mike Thomsen wrote:
I spent a while today looking through the janusgraph-docker repository on GitHub, and it didn't look like there is a good way to configure a ConfiguredGraphFactory without injecting a custom configuration file. Is that correct?My general process went like this:1. Copied the vanilla gremlin-server.yaml and changed graphs to look like this:graphs: {ConfigurationManagementGraph: /etc/opt/janusgraph/configured_graph.properties}2. Added a simple properties file that contains a basic setup for CQL + ES that points to the docker hosts for them.3. Wrapped that with a Dockerfile like this:FROM janusgraph/janusgraph:latestCOPY gremlin-server.yaml /opt/janusgraph/conf/gremling-server.yamlCOPY configured_graph.properties /etc/opt/janusgraph/configured_graph.propertiesWhen I brought that up with Docker Compose, I got errors saying that the YAML failed to parse and the graphs block that it printed out didn't resemble my configuration file.Has anyone figured out a good way to make this work?Thanks,Mike