Skip to content

Commit

Permalink
Update global README and fix ingestion accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
fpotier committed Apr 3, 2024
1 parent c404abe commit 316bde7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 26 deletions.
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can use older versions of SciCat Live by checking out specific tags using `g

`v1.0` - the first stable version

Note: older versions might not contain certain functionality (e.g. archival mock in `v1.0`). Be sure to take a look at that version's `README.md` as well.
Note: older versions might not contain certain functionality (e.g. archival mock in `v1.0`). Be sure to take a look at that version's `README.md` as well.

## Steps

Expand All @@ -23,7 +23,7 @@ Note: older versions might not contain certain functionality (e.g. archival mock

## Default setup

By running `docker-compose up -d` these steps take place:
By running `docker-compose up -d` these steps take place:
1. a [mongodb](./services/mongodb/) container is created with some intial data.
2. a [rabbitmq](./services/rabbitmq/) container is created.
3. the SciCat [backend v3](./services/backend/) container is created and connected to (1) and (2).
Expand All @@ -33,27 +33,33 @@ By running `docker-compose up -d` these steps take place:
7. a reverse [proxy](./services/proxy) container is created and routes trafic to (2), (3), (4) and (5) through localhost subdomains, in the form: `http://${service}.localhost` (for the ones of need). The frontend is available at simply `http://localhost`.


Here below we show the dependencies (if `B` depends on `A`, then we visualize as `A --> B`):
Here below we show the dependencies (if `B` depends on `A`, then we visualize as `A --> B`):

```mermaid
graph TD;
subgraph services;
rabbitmq --> archivemock;
rabbitmq --> backend;
mongodb --> backend;
backend --> archivemock;
backend --> frontend;
backend --> searchapi;
end;
proxy -.- backend;
proxy -.- frontend;
proxy -.- searchapi;
proxy -.- rabbitmq;
graph TD
subgraph services
subgraph backends
backend
backend-next
end
rabbitmq --> archivemock
rabbitmq --> backend
mongodb --> backends
backend --> archivemock
backend --> frontend
backend --> searchapi
end
proxy -.- backends
proxy -.- frontend
proxy -.- searchapi
proxy -.- rabbitmq
```

## Select the services

The user can selectively decide the containers to spin up and the dependencies will be resolved accordingly. The available services are in the [services](./services/) folder and called consistently.
The user can selectively decide the containers to spin up and the dependencies will be resolved accordingly. The available services are in the [services](./services/) folder and called consistently.

For example, one could decide to only run the `backend` by running (be aware that this will not run the `proxy`, so the service will not be available at `backend.localhost`):

Expand All @@ -63,26 +69,26 @@ docker-compose up -d backend

(or a list of services, for example, with the proxy `docker-compose up -d backend proxy`)

This will run, from the [previous section](#default-setup), (1), (2) and (3) but skip the rest.
This will run, from the [previous section](#default-setup), (1), (2) and (3) but skip the rest.

Accordingly,
```sh
docker-compose up -d frontend(/searchapi)
```

Will run, from the [previous section](#default-setup), (1), (2), (3) and (4/(5)) but skip (5/(4)), (6) and (7).
Will run, from the [previous section](#default-setup), (1), (2), (3) and (4/(5)) but skip (5/(4)), (6) and (7).

## Custom configure a service

Every service folder (inside the [services](./services/) parent directory) contains its configuration and some instructions, at least for the non third-party containers.

For example, to configure the [frontend](./services/frontend/), the user can change any file in the [frontend config](./services/frontend/config/) folder, for which instructions are available in the [README](./services/frontend/README.md) file.
For example, to configure the [frontend](./services/frontend/), the user can change any file in the [frontend config](./services/frontend/config/) folder, for which instructions are available in the [README](./services/frontend/README.md) file.

After any configuration change, `docker-compose up -d` must be rerun, to allow loading the changes.

## Add a new service

To add a new service:
To add a new service:
1. create a dedicated folder in the [services](./services/) one
2. call it as the service should be named
3. create the `docker-compose.yaml` file with the required dependencies (if any)
Expand Down
2 changes: 2 additions & 0 deletions services/backend-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The SciCat backend-next is a rewrite of the original backend, built on top of th

The backend-next service is mainly configured via environment variables. For an extensive list of available options see [here](https://scicatproject.github.io/documentation/Development/v4.x/backend/configuration.html).

It can also serve the frontend theme and configuration by mounting the files in `/home/node/app/dist/config/frontend.theme.json` and `/home/node/app/dist/config/frontend.config.json`.

### Functional Accounts

There are a few functional accounts available for handling data:
Expand Down
7 changes: 6 additions & 1 deletion services/backend-next/config/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
MONGODB_URI=mongodb://mongodb:27017/dacat-next
SITE=FACILITY
JWT_SECRET=secret
JWT_NEVER_EXPIRES=true
EXPRESS_SESSION_SECRET=secret

ADMIN_GROUPS=admin
DELETE_GROUPS=jerk
CREATE_DATASET_GROUPS=ingestor
PROPOSAL_GROUPS=proposalingestor
SAMPLE_GROUPS=ingestor
6 changes: 2 additions & 4 deletions services/backend-next/config/functionalAccounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"username": "admin",
"password": "2jf0TPNZsS",
"email": "[email protected]",
"role": "admin",
"global": true
"role": "admin"
},
{
"username": "ingestor",
"password": "aman",
"email": "[email protected]",
"role": "ingestor",
"global": true
"role": "ingestor"
},
{
"username": "archiveManager",
Expand Down

0 comments on commit 316bde7

Please sign in to comment.