Skip to content

Commit

Permalink
[ENH] Removed local_node_query profile (#72)
Browse files Browse the repository at this point in the history
* Removed `local_node_query` profile

* Update README.md

Co-authored-by: Alyssa Dai <[email protected]>

* Updated README.md

* Updated `template.env`

* Updated `neurobagel_environment_variables.tsv`

* Updated README.md

* Update README.md

Co-authored-by: Alyssa Dai <[email protected]>

---------

Co-authored-by: Alyssa Dai <[email protected]>
  • Loading branch information
rmanaem and alyssadai authored Aug 8, 2024
1 parent 461756d commit 4923feb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 31 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Configuration files for a Neurobagel deployment.

## How to use
For detailed instructions on the deployment options for Neurobagel, see the official Neurobagel documentation on [setting up a local knowledge graph (node)](https://neurobagel.org/infrastructure/) and [local query federation](https://neurobagel.org/federate/).
For detailed instructions on deploying Neurobagel for your use case, see the official Neurobagel documentation on [setting up a local knowledge graph (node)](https://neurobagel.org/getting_started/) and [configuration options](https://neurobagel.org/config/).

### Using the full-stack Docker Compose file

Expand All @@ -21,12 +21,12 @@ For detailed instructions on the deployment options for Neurobagel, see the offi

Ensure to edit the configuration file(s) according to your deployment.

:warning: **Note**: You **must** change the value of the `NB_API_QUERY_URL` variable in the `.env` file before you can launch any service stack that includes a query tool (i.e., `local_node_query`, `full_stack`, `local_federation`).
:warning: **Note**: You **must** change the value of the `NB_API_QUERY_URL` variable in the `.env` file before you can launch any service stack that includes a query tool (i.e., `full_stack`, `local_federation`).
See comments in the `.env` file for more information.

3. In the repository root, start the Docker Compose stack and specify your desired deployment profile

**To set up only a local node:**
**To set up only a local node (without a graphical query tool):**
```bash
docker compose up -d
```
Expand All @@ -35,12 +35,7 @@ See comments in the `.env` file for more information.
docker compose --profile local_node up -d
```

**To set up a local node with a graphical query tool:**
```bash
docker compose --profile local_node_query up -d
```

**To set up a local node and local federation (including a graphical query tool) all at once:**
**To set up a local node along with a graphical query tool and optional federation:**
```bash
docker compose --profile full_stack up -d
```
Expand Down
16 changes: 0 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
image: "neurobagel/api:${NB_NAPI_TAG:-latest}"
profiles:
- "local_node"
- "local_node_query"
- "full_stack"
ports:
- "${NB_NAPI_PORT_HOST:-8000}:${NB_NAPI_PORT:-8000}"
Expand All @@ -29,7 +28,6 @@ services:
image: "${NB_GRAPH_IMG:-ontotext/graphdb:10.3.1}"
profiles:
- "local_node"
- "local_node_query"
- "full_stack"
volumes:
- "graphdb_home:/opt/graphdb/home"
Expand Down Expand Up @@ -75,20 +73,6 @@ services:
- "${NB_QUERY_PORT_HOST:-3000}:5173"
environment:
NB_API_QUERY_URL: ${NB_API_QUERY_URL}
NB_IS_FEDERATION_API: "true"
NB_QUERY_URL_PATH: ${NB_QUERY_URL_PATH:-/}
NB_ENABLE_AUTH: ${NB_ENABLE_AUTH:-false}
NB_QUERY_CLIENT_ID: ${NB_QUERY_CLIENT_ID}

query_local:
image: "neurobagel/query_tool:${NB_QUERY_TAG:-latest}"
profiles:
- "local_node_query"
ports:
- "${NB_QUERY_PORT_HOST:-3000}:5173"
environment:
NB_API_QUERY_URL: ${NB_API_QUERY_URL}
NB_IS_FEDERATION_API: "false"
NB_QUERY_URL_PATH: ${NB_QUERY_URL_PATH:-/}
NB_ENABLE_AUTH: ${NB_ENABLE_AUTH:-false}
NB_QUERY_CLIENT_ID: ${NB_QUERY_CLIENT_ID}
Expand Down
2 changes: 1 addition & 1 deletion docs/neurobagel_environment_variables.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Environment variable Set manually in .env? Description Default value if not set
`NB_GRAPH_PORT` No Port number used by the _graph server container_ `7200` * Docker, Python
`NB_QUERY_TAG` No Docker image tag for the query tool `latest` Docker
`NB_QUERY_PORT_HOST` No Port number used by the `query_tool` on the host machine `3000` Docker
`NB_FEDERATE_REMOTE_PUBLIC_NODES` Yes If "True", include public nodes in federation `true` Docker, Python
`NB_FEDERATE_REMOTE_PUBLIC_NODES` Yes If "True", include public nodes in federation. If "False", only locally specified nodes in `local_nb_nodes.json` are queried. `true` Docker, Python
`NB_QUERY_URL_PATH` No The URL path for the query tool, determines the specific URL at which the app should be rendered for users to access it `/` Docker
`NB_ENABLE_AUTH` Yes **(Experimental, for dev deployments only)** Whether to enable authentication for cohort queries. One of [true, false] `false` Docker, Python
`NB_QUERY_CLIENT_ID` Yes **(Experimental, for dev deployments only)** OAuth client ID for the query tool. Required if NB_ENABLE_AUTH is set to true. - Docker, Python
10 changes: 5 additions & 5 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ NB_RETURN_AGG=true
# ---------------------------------

# ---- CONFIGURATION FOR QUERY TOOL ----
# You MUST replace http://XX.XX.XX.XX with the URL (and port, if needed) of the Neurobagel API the query tool should send requests to.
# The query tool sends requests from a user's machine, so ensure you provide the URL of the API *as a user would access it from their own (external) machine*,
# even if the query tool and the Neurobagel API are hosted on the same physical machine.
# You MUST replace http://XX.XX.XX.XX with the URL (and port, if needed) of the Neurobagel f-API the query tool should send requests to.
# The query tool sends requests from a user's machine, so ensure you provide the URL of the f-API *as a user would access it from their own (external) machine*,
# even if the query tool and the Neurobagel f-API are hosted on the same physical machine.
# e.g., https://neurobagel.myInstitute.edu/federation
#
# Exception: If you are testing your setup locally and will only access the query tool from the SAME machine
# that your API is hosted on, you can use localhost as the URL.
# e.g., http://localhost:8000 (if NB_API_PORT_HOST=8000):
# that your f-API is hosted on, you can use localhost as the URL.
# e.g., http://localhost:8080 (if NB_FAPI_PORT_HOST=8080):
NB_API_QUERY_URL=http://XX.XX.XX.XX

# Additional configurable parameters - uncomment to change the defaults
Expand Down

0 comments on commit 4923feb

Please sign in to comment.