-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(interactive): Support customizing ports when deploy interact…
…ive in local mode and connect via SDK (#3990) Interactive service exposes many ports, including `admin_port`, `query_port(stored_proc_port)`, `cypher_port` and `gremlin_port`. In previous SDK implementation, we create a driver by only providing the `admin_endpoint`, hoping for get all other ports via `GET /v1/service/status`, However, this only works if the SDK runs inside the service's container. In cases like k8s deployment, the internal port will be mapped to a large port number which is chosen by the cluster. In this PR, we let user to declare the endpoints to environment variables, and connect via SDK. ```bash export INTERACTIVE_ADMIN_ENDPOINT: http://host:port export INTERACTIVE_STORED_PROC_ENDPOINT: http://host:port export INTERACTIVE_CYPHER_ENDPOINT: neo4j://host:port or bolt://host:port export INTERACTIVE_GREMLIN_ENDPOINT: ws://host:port/gremlin ``` For example, with python sdk, user can connect to the Interactive service after all environment variable is exported. ```python from gs_interactive.client.driver import Driver driver = Driver() with driver.session() as sess: #.... ``` The documentaion will be added after the interactive documentation is refactored with `gsctl`
- Loading branch information
1 parent
b395811
commit 70188a6
Showing
9 changed files
with
243 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.