Skip to content

Commit

Permalink
Enhance documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiAguilo committed Oct 25, 2024
1 parent ce8ae49 commit f197856
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 89 deletions.
56 changes: 14 additions & 42 deletions docs/adminGuide/add-beacon.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ nav_order: 2

In this section you will learn how to add a Beacon in the ELIXIR Beacon Network. There are two sections depending on your role:

- User: You are an owner or mantainer of a Beacon and you want to add it to an ELIXIR Beacon Network.
- EBN mantainer: You are an owner or mantainer of an ELIXIR Beacon Network and a Beacon has requested to add their API URL to the network.
- Beacon Owner: You are an owner or mantainer of a Beacon and you want to add it to an ELIXIR Beacon Network.
- ELIXIR Beacon Network (EBN) mantainer: You are an owner or mantainer of an ELIXIR Beacon Network and a Beacon has requested to add their API URL to the network.

## Add a Beacon to a Network (User - Beacon maintainer view)
## Add a Beacon to a Network (Beacon owner view)

### Add an ID

To have an unique identifier in the EBN, you need to create an unique identifier to your Beacon. This ID should be located in the `info` endpoint, inside the `meta` object. Here it is an example:
To being able to classify your beacon in the EBN, you need to create an unique identifier to your Beacon. This ID should be located in the `info` endpoint, inside the `meta` object. Here it is an example:

```
"meta":{
"apiVersion":"vX.X.X",
"beaconId":"es.elixir.bsc.beacon",
"beaconId":"your.beacon.id",
"returnedSchemas": {...}
}
```
Expand All @@ -41,16 +41,16 @@ The `beaconId` must be unique inside the network and it is mandatory to enable i

### Validate your Beacon

Before asking to add your beacon to the network, you should pass your Beacon to the validator. The Validator can be accessed via Frontend in most of the EBN instances, but as it is not mandatory here it will be described how to validate your Beacon via command-line:
Before asking to add your beacon to the network, you should pass your Beacon to the validator. The Validator can be accessed via Frontend in most of the EBN instances, but it is not mandatory. Here it will be described how to validate your Beacon via command-line:

To validate a Beacon before adding it to the ELIXIR Beacon Network, follow these steps:

1. Ensure you have Apache Maven installed.
1. Ensure you have [Apache Maven](https://maven.apache.org/) installed.

2. Download the validation tool from the repository and navigate to the `tool` folder:
2. Download the validator repository and navigate to the `tool` folder:

```
git clone https://github.com/elixir-europe/neat-beacon-v2-validator/tree/master
git clone https://github.com/elixir-europe/neat-beacon-v2-validator
cd neat-beacon-v2-validator
```

Expand All @@ -75,55 +75,27 @@ Optionally, you can specify an output file for the validation report using the `

### Send it to the Network

After passing the validator, the Beacon owner has to send an email to the ELIXIR Beacon Network mantainer asking them to add the Beacon to the network. It is recommended to send the validator output, if any, or specify that the Beacon has passed the validation.
After passing the validator, the Beacon owner might need to send an email to the ELIXIR Beacon Network mantainer asking them to add the Beacon to the network. It is recommended to send the validator output, if any, or specify that the Beacon has passed the validation.

The Beacon owner is responsible for addressing any errors reported by the validator. While the Beacon may still function within the Beacon Network despite reported errors, critical errors may prevent it from returning data.



ELXIIR Beacon Network maintainers may request the output of the validator before adding the instance to the network.

{: .important }
> ELXIIR Beacon Network maintainers may request the output of the validator before adding the instance to the network.
## Add a Beacon to a Network (ELIXIR Beacon Network mantainer view)

The ELIXIR Beacon Network Mantainer is responsible for requesting the validator output file to confirm that any Beacon meets validation criteria to add it to the network. Subsequently, the Beacon owner should forward the validated Beacon's URL to the EBN Maintainer.

Once validated, the EBN Maintainer will incorporate the URL of the Beacon into the ELIXIR Beacon v2 Network. This involves adding the Beacon's URL to the `wildfly/BEACON-INF/beacon-network.json` file.
Then, the EBN Maintainer will incorporate the URL of the Beacon into the ELIXIR Beacon v2 Network. This involves adding the Beacon's URL to the `wildfly/BEACON-INF/beacon-network.json` file.

The structure of this JSON file should be an array containing the URL of the validated Beacon, like this:

```
[
"your.beacon.url/api"
"new.beacon.url/api"
]
```

After adding the URL to the `beacon-network.json` file, the Beacon Network will automatically fetch the new Beacon, ensuring its integration into the network. This process facilitates the incorporation of Beacons into the ELIXIR Beacon Network.

To remove the Beacon, you just need to remove the URL from the `beacon-network.json` file.


























2 changes: 1 addition & 1 deletion docs/adminGuide/beacon-aggregator.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The Beacon Aggregator (BA) is the agent in charge of querying the Beacons of the

## Meta-Beacon

The Beacon Aggregator is itself a standard Beacon v2. As it is created to query other Beacons, it is referred to as Meta-Beacon.
The Beacon Aggregator is itself a standard Beacon v2. As it is created to query other Beacons, it is also referred to as Meta-Beacon.

In order to differentiate the Meta-Beacon to a simple Beacon, besides having aggregation functionalities, we have listed the following additional properties:

Expand Down
2 changes: 2 additions & 0 deletions docs/adminGuide/beacon-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The cache of the registry store the following information about the Beacons:

- Authentication/Authorization mechanism needed to ensure that only authorized users access the data.

- Basic metadata from the `info` endpoint.

As it can be seen, the data stored in the cache is directly related with the queries policy. So, it needs to be updated every time there is a change in any Beacon.

## Update Registry
Expand Down
12 changes: 6 additions & 6 deletions docs/adminGuide/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ nav_order: 4

## Adding your own filters

You decide which filtering terms a Beacon Network (BN) can query. You can avoid all the filtering terms your beacons, and only use the ones from the static ontologies of the Aggregator.
As an ELIXIR Beacon Network (EBN) maintainer, along its steering commitee, you decide which filtering terms a Beacon Network (BN) can query. You can avoid all the filtering terms of the beacons in the network, and only use the ones from the static ontologies of the Aggregator.

## User certificates

To ensure the privacy and anonymity of the data, a BN should keep track of the queries done by the users. As an example, a user can make multiple queries to retrieve all the genomic data of a patient. This can potentially compromise the privacy of the patient and confidentiality of the data.
To ensure the privacy and anonymity of the data, a BN should keep track of the metadata of the queries done by the users. As an example, a user can make multiple queries to retrieve all the genomic data of a patient. This can potentially compromise the privacy of the patient and confidentiality of the data.

To address the issue, Beacon Networks can use User Certificates to know who makes queries to the Beacons. By monitoring their activity we can prevent users from accessing too much data at once and identify suspicious activities. A possible solution is to limit the number of queries per user in a day or to stop giving access to a user when the queries are mistrustful.

Expand All @@ -36,19 +36,19 @@ Here there are issues that we have found in different Beacons when importing the

### Query per second

When the network fetches the Beacons, first it needs to query the metadata in order to parse and put it in the cache. These queries are done in consequential order. If one of your Beacons API has limited the queries per second, this would cause trouble to the Network as it won’t let it search for all the needed metadata.
When the EBN fetches the Beacons, first it needs to query the metadata in order to parse and put it in the cache. These queries are done in consequential order. If one of your Beacons API has limited the queries per second, this would cause trouble to the Network as it won’t let it search for all the needed metadata.

### Correct paths

The most common mistake when inserting a beacon to the network is having wrong URL paths in the `/map` endpoint. You must check that all the URLs work properly.
The most common mistake when inserting a beacon to the network is having wrong URL paths in the `/map` endpoint. If you are a Beacon maintainer, you must check that all the URLs work properly.

The Beacon Network need to check all the paths in order to query them or retrieve the correct specification. If the path returns any value, the beacon will not be queried.
The ELIXIR Beacon Network need to check all the paths in order to query them or retrieve the correct specification. If the path returns any value, the beacon will not be queried.

### Beacon ID and general information

The Beacon ID of the beacon must be unique. If not, the Beacon Network won't be able to process the responses.

If you deploy your beacon based on another instance or Reference Implementation, you should change the general information of the given beacon with the name of your organisation, project, and other info.
If you deploy your beacon based on another instance or [Reference Implementation](https://github.com/EGA-archive/beacon2-ri-api), you should change the general information of the given beacon with the name of your organisation, project, and other info.

### Filtering terms

Expand Down
20 changes: 12 additions & 8 deletions docs/adminGuide/light-beacon-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ When multiple institutions or organizations deploy a Beacon and make it accessib

If you want to deploy the ELIXIR Beacon v2 Network instance made by the [BSC](https://www.bsc.es/discover-bsc/organisation/scientific-structure/national-institute-bioinformatics-elixir-node-0) (Backend) and [EGA-CRG](https://www.crg.eu/en/programmes-groups/ega-team) (Frontend), follow the next steps.

## Full Docker install (Backend & Frontend)
## Full Docker install (Recommended)

Download the code from this [repository](https://github.com/elixir-europe/beacon-network-docker.git),
Download the code from this [repository](https://github.com/elixir-europe/beacon-network-docker.git):

```
git clone https://github.com/elixir-europe/beacon-network-docker.git
Expand All @@ -48,7 +48,7 @@ Run [docker compose](https://docs.docker.com/compose/) to build and start the co
docker compose up -d
```

Congrats! You have created Beacon Network FrontEnd in [http://localhost:8080/](http://localhost:8080/) and the backend in [http://localhost:8080/beacon-network/v2.0.0/](http://localhost:8080/beacon-network/v2.0.0/). Adjust the URLs based on your setup.
Congrats! You have succesfully deployed ELIXIR Beacon Network FrontEnd in [http://localhost:8080/](http://localhost:8080/) and the backend in [http://localhost:8080/beacon-network/v2.0.0/](http://localhost:8080/beacon-network/v2.0.0/). Adjust the URLs based on your setup.


## Backend Installation
Expand All @@ -61,7 +61,7 @@ cd beacon-network-backend/docker
docker compose up -d
```

Congrats! You have created Beacon Network in [http://localhost:8080/beacon-network/v2.0.0/](http://localhost:8080/beacon-network/v2.0.0/). You can now view and query the backend as needed. Adjust the URLs as necessary based on your setup.
Congrats! You have deployed the ELIXIR Beacon Network backend in [http://localhost:8080/beacon-network/v2.0.0/](http://localhost:8080/beacon-network/v2.0.0/). You can now view and query the backend with API GET/POST queries. Adjust the URLs as necessary based on your setup.

## FrontEnd Installation

Expand All @@ -85,28 +85,32 @@ Run [docker compose](https://docs.docker.com/compose/):
docker-compose up -d –build
```

Edit `config.json` from [frontend/src](frontend/src) to point the URLa where you are making the queries. Example:
Edit `config.json` from [frontend/src](frontend/src) to point the URLs where you have the backend, main webpage and keycloak. Example:

```
{
"API_URL": "https://yourAPIdomain.com/beacon-network/v2.0.0",
"REDIRECT_URL": "https://yourUIdomain.com",
"KEYCLOAK_URL": "https://yourKEYCLOAKdomain.com"
}
```

You have deployed the Beacon Network Frontend in [http://localhost:3000](http://localhost:3000). Adjust the URLs as needed based on your setup.

# Update the EBN

To update the ELIXIR Beacon Network (EBN) with a new image, follow these steps:
Pull the latest image:

- Pull the latest image:

```
docker-compose pull
```
Recreate and rebuild the containers with the new image:

- Recreate and rebuild the containers with the new image:

```
docker-compose up --force-recreate --build -d
```

These commands will download the latest image for the EBN and recreate the containers using the new image. The `--force-recreate` flag ensures that the containers are recreated even if they are already running, and the `--build` flag rebuilds the containers if necessary. The `-d flag runs the containers in detached mode.
2 changes: 1 addition & 1 deletion docs/mainDocumentation/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ nav_order: 2

# Documentation

Main documentation for organizational procedures inside the ELIXIR Beacon Network. These documentation has been developed thanks to the 2022 ELIXIR Beacon Infrastructure Service plan and they are a living documentation that will be updated along with new implementations or changes in the main development.
Main documentation for organizational procedures inside the ELIXIR Beacon Network. These documentation has been developed thanks to the 2022 ELIXIR Beacon Infrastructure Service plan. They are a living documentation that will be updated along with new implementations or changes in the main development.
Loading

0 comments on commit f197856

Please sign in to comment.