Skip to content

Commit

Permalink
[MNT] Warn against having local f-API address in `local_nb_nodes.json…
Browse files Browse the repository at this point in the history
…`, link fixes (#233)

* warn against including f-API address in local_nb_nodes.json

* fix links

* add bare cogatlas URL to md_link_check ignore pattern
  • Loading branch information
alyssadai authored Oct 30, 2024
1 parent 7a534e4 commit 681368d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
13 changes: 7 additions & 6 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ To change the location of your password files, simply edit the variable `NB_GRAP

## `local_nb_nodes.json`

This file is only used by deployment profiles that include the federation API.
`local_nb_nodes.json` contains the URLs and (arbitrary) names of the _node APIs_ of local nodes you wish to federate over.
This file is used by the federation API, and so is only necessary for deployment profiles that include the f-API.
`local_nb_nodes.json` contains the URLs and (arbitrary) names of the **node APIs** of local nodes you wish to federate over.
Each node must be denoted by a dictionary `{}` with two key-value pairs:

- `"NodeName"`: name of the node
- `"ApiURL"`: URL of the node API exposed for that node
- `"ApiURL"`: URL of the **node API** exposed for that node

Multiple nodes must be wrapped in a list `[]`.

Expand All @@ -143,25 +143,26 @@ In your `local_nb_nodes.json` file you would configure this as follows:
}
]
```
Ensure that you not accidentally provide the address of your actual federation API for `"ApiURL"` - this will cause an infinite request loop that will likely overload your service (as an f-API will be repeatedly making requests to itself).

!!! warning "Do not use `localhost`/`127.0.0.1` in `local_nb_nodes.json`"

Even if the local node API(s) you are federating over are running
on the same host machine as your federation API,
you cannot use `localhost` for the `ApiURL` and instead have to provide a network-accessible URL or IP address.
you cannot use `localhost` for the `"ApiURL"` and must instead provide a network-accessible URL, IP address, or container name.
For an example, see the configuration for the node called `"My Institute"` above.


!!! Info "Nodes that do not need to be manually configured"
We maintain a list of public Neurobagel nodes
[here](https://github.com/neurobagel/menu/blob/main/node_directory/neurobagel_public_nodes.json).
By default every new `f-API` will lookup this list
By default every new f-API will lookup this list
on startup and include it in the list of nodes to
federate over.
This also means that you do not have to manually
configure public nodes, i.e. you **do not have to explicitly add them** to your `local_nb_nodes.json` file.

To add one or more local nodes to the list of nodes known to your `f-API`, simply add more dictionaries to this file.
To add one or more local nodes to the list of nodes known to your f-API, simply add more dictionaries to this file.

## Manually setting up a Neurobagel graph backend

Expand Down
2 changes: 1 addition & 1 deletion docs/maintaining.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ there are some recurring tasks you may have to do to keep it operating correctly

We are continuously improving Neurobagel tools and services,
so you may want to update your Neurobagel node to the latest version to benefit from new features and bug fixes.
We always publish our tools as [Docker images on DockerHub](https://hub.docker.com/repositories/neurobagel).
We always publish our tools as [Docker images on DockerHub](https://hub.docker.com/u/neurobagel).

Each Docker image has a [semantic version](https://semver.org/) tag (vX.Y.Z), and also two rolling tags:

Expand Down
2 changes: 1 addition & 1 deletion docs/public_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ At the moment, the following public Neurobagel nodes are available

All nodes except for the Quebec Parkinson Network node allow you to download both participant-level information
and the corresponding imaging data (where available) for the cohorts you search.
Downloading of imaging data is performed via [datalad](https://rpq-qpn.ca/en/home/).
Downloading of imaging data is performed via [Datalad](https://www.datalad.org/).

## Private Neurobagel nodes

Expand Down
6 changes: 4 additions & 2 deletions md_link_check_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"ignorePatterns": [
{"pattern": "http://neurobagel.org/vocab/.*"},
{"pattern": "http://neurobagel.org/graph/"},
{"pattern": "https://www.cognitiveatlas.org/task/id/"},
{"pattern": "http://neurobagel.org/graph/"},
{"pattern": "^../.*"},
{"pattern": ".*localhost.*"},
{"pattern": "https://api.neurobagel.org/.*"},
{"pattern": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#"}
{"pattern": "http://purl.org/nidash/nidm#.*"},
{"pattern": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#"},
{"pattern": "https://www.cognitiveatlas.org/task/id/"}
],
"timeout": "60s"
}

0 comments on commit 681368d

Please sign in to comment.