getting-started.md

hide:
- navigation
Getting Started
!!! abstract "Abstract"
In this short getting started guide we show the dependencies to run the database repository and perform a small,
local, test deployment for quickly trying out the features that the repository offers.
Requirements
Hardware
For this small, local, test deployment any modern hardware would suffice, we recommend a machine with at least:
- 8 Cores (can be virtual cores)
- 16GB RAM
- 100GB SSD memory
- Fast internet connection
Software
Install :fontawesome-brands-docker: Docker Engine for your OS.
Deployment
We currently maintain 14 images on Dockerhub.
Docker
=== ":fontawesome-brands-linux: Linux"
Download the latest [`docker-compose.yml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml)
and [`.env`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.unix.example)
$ curl -o docker-compose.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml
$ curl -o .env https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.unix.example
Start the services
$ docker-compose up -d
=== ":fontawesome-brands-apple: macOS"
Download the latest [`docker-compose.yml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml)
and [`.env`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.unix.example)
$ curl -o docker-compose.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml
$ curl -o .env https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.unix.example
Start the services
$ docker-compose up -d
The system is auto-configured for a small, local, test deployment. You need to place the .env
file in the same
directory as the docker-compose.yml
.
Firewall
Make sure the following ports can pass through your firewall from the open Internet 0.0.0.0/0
:
-
80/tcp
for the frontend, will be redirected when a SSL/TLS certificate is installed -
443/tcp
for the frontend -
9095/tcp
for the Gateway Service, exposing the HTTP API -
5672/tcp
for the AMQP API
Activate them both in your virtualization infrastructure and the local firewall on your virtual machine.
Development
We invite all open-source developers to help us fixing bugs and introducing features to the source code. Get involved by sending a mail to Prof. Andreas Rauber and Projektass. Martin Weise.
Software
We develop all packages with the following software requirements:
Building
Services and GUI
For local development you need to clone the repository and build the services from scratch:
git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git
make build
Swagger Codegen
It is possible to use the Swagger documentation of the services to generate HTTP clients to interact with DBRepo.
Clients can only begenerated when DBRepo is running. Just download
the swagger-codegen-cli.jar
and start the services:
docker-compose up -d
Run the codegen tool:
java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container
Integration
Please visit the Swagger endpoint documentation
Debugging
Backend
Start all containers with docker-compose:
docker-compose up -d
docker container stop fda-xxxxx-service # <<< replace with the service you want to debug
docker container rm fda-xxxxx-service # <<< replace with the service you want to debug
docker-compose logs -f
Then start the container in your IDE and debug it.
Frontend
Start all containers with docker-compose:
docker-compose up -d
docker container stop fda-ui && docker container rm fda-ui
docker-compose logs -f
Then start the frontend in another console window:
yarn --cwd=./fda-ui dev