Skip to content
Snippets Groups Projects
README.md 2.64 KiB
Newer Older
# FDO Manager Service

**This is WIP - don't use it unless you want to break things.**

Reference implementation of a RESTful Service API for basic FDO operations.
This service exposes the functionality of the
Timm Fitschen's avatar
Timm Fitschen committed
[FDO Manager SDK](https://gitlab.com/fairdo/fdo-manager/sdk).


## Build JAR

```
mvn clean package
```

This results in `application/target/fdo-manager-service.application-${version}.jar`

## Run

Either build the application and start the JAR with

```
java -jar application/target/fdo-manager-service.application-${version}.jar
```

or start it directly from maven with

```
mvn spring-boot:run
```

Timm Fitschen's avatar
Timm Fitschen committed
### Use Mockup Repository

Timm Fitschen's avatar
Timm Fitschen committed
Build the JAR file, then run
Timm Fitschen's avatar
Timm Fitschen committed
java -Dmock=true -jar application/target/fdo-manager-service.application-${version}.jar
By default you can access the service at `http://localhost:8081/api/v1`. Try
curl http://localhost:8081/api/v1/hello
Timm Fitschen's avatar
Timm Fitschen committed
### API Specs

You can view the API specs at `http://localhost:8081/api/v1/swagger-ui/index.html`.
### Stop

Stop the running service with `CTRL-C`.

## Troubleshooting

### Exception on startup

When running the mockup repository as described above, the following exception is shown:
```
java.io.IOException: ERROR: cannot read repository config directory: repositories
        at com.indiscale.fdo.manager.service.ManagerPool.getConfig(ManagerPool.java:58)
        at com.indiscale.fdo.manager.service.ManagerPool.getRepositoryRegistry(ManagerPool.java:68)
        at com.indiscale.fdo.manager.service.ManagerPool.createManager(ManagerPool.java:79)
        at com.indiscale.fdo.manager.service.ManagerPool$2.create(ManagerPool.java:155)
        at com.indiscale.fdo.manager.service.ManagerPool$ManagerAllocator.allocate(ManagerPool.java:124)
        at com.indiscale.fdo.manager.service.ManagerPool$ManagerAllocator.allocate(ManagerPool.java:114)
        at stormpot.ReallocatingAdaptor.allocate(ReallocatingAdaptor.java:37)
        at stormpot.BAllocThread.alloc(BAllocThread.java:255)
        at stormpot.BAllocThread.increaseSizeByAllocating(BAllocThread.java:152)
        at stormpot.BAllocThread.replenishPool(BAllocThread.java:113)
        at stormpot.BAllocThread.continuouslyReplenishPool(BAllocThread.java:97)
        at stormpot.BAllocThread.run(BAllocThread.java:89)
        at java.base/java.lang.Thread.run(Thread.java:1570)

```

This configuration is not needed for the mockup repository and can be ignored.


# Contact

* (Lead) Timm Fitschen <t.fitschen@indiscale.com>

# License

AGPL 3.0 or later. <https://www.gnu.org/licenses/agpl-3.0.en.html>

# Copyright

* Copyright (C) 2024 Timm Fitschen <t.fitschen@indiscale.com>
* Copyright (C) 2024 IndiScale GmbH <info@indiscale.com>