Re: Help needed! Configure janusgraph-1.0.0-docker (either rebuild from base or docker compose with env variable setting) to use ConfigurationManagementGraph, and then initialize it with own graph & schema
You can simply set all required config via environment variables with the Docker image. If you are already building your own image based on the official one, then you can just add env vars there. Just add them like this:
ENV key=value
e.g. to configure JanusGraph for CQL & ES:
ENV JANUS_PROPS_TEMPLATE=cql-es
You can then check whether the resulting config (both the JanusGraph Server YAML file as well as the JanusGraph .properties file) looks like you expect, by using the `show-config` command:
rocker run –rm -it my-custom-docker-image janusgraph show-config
as described here: https://github.com/JanusGraph/janusgraph-docker#generate-config
That should enable you to compare the config used by the Docker image with the config that you apparently already got working without Docker.
Von: janusgraph-users@... <janusgraph-users@...> Im Auftrag von Yingjie Li
Gesendet: Dienstag, 21. März 2023 14:05
An: janusgraph-users@...
Betreff: Re: [janusgraph-users] Help needed! Configure janusgraph-1.0.0-docker (either rebuild from base or docker compose with env variable setting) to use ConfigurationManagementGraph, and then initialize it with own graph & schema
To report back, If I directly use janusgraph-1.0.0-rc local install,
after starting the server with ./bin/janusgraph-server.sh start conf/gremlin-server/gremlin-server-configuration.yaml
i can create graph use ConfigureGraphFactory, and initize it with my own schema with composite and mxied index.
To be able to traveral, I need to restart the server. then I can do the followings sucessfully:
gremlin> :remote connect tinkerpop.server conf/remote.yaml session
08:41:02 INFO com.jcabi.log.Logger.infoForced - 0 attributes loaded from 328 stream(s) in 56ms, 104 saved, 5165 ignored: []
08:41:03 INFO org.apache.tinkerpop.gremlin.driver.Connection.<init> - Created new connection for ws://localhost:8182/gremlin
08:41:03 INFO org.apache.tinkerpop.gremlin.driver.ConnectionPool.<init> - Opening connection pool on Host{address=localhost/127.0.0.1:8182, hostUri=ws://localhost:8182/gremlin} with core size of 1
==>Configured localhost/127.0.0.1:8182-[e732c251-4d85-4a3e-89b6-f5c8db565b47]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[e732c251-4d85-4a3e-89b6-f5c8db565b47] - type ':remote console' to return to local mode
gremlin> ConfiguredGraphFactory.getGraphNames()
==>graph2
==>graph1
gremlin> graph2_traversal.V().count()
==>0
gremlin> graph1_traversal.V().count()
==>0
But I still will need to know how to use the docker unless there is no choice but to build the docker from source code.
Thanks,
Yingjei