A CRUD style implementation of the GA4GH Service Registry specification. Could be used to back any kind of installation as long as there is a compatible client that can create, update, and remove service instances when necessary.
This repository contains a reference implementation of the Service Registry standard.
- OpenJDK 11 or newer. AdoptOpenJDK is a good source.
- A PostgreSQL database v9.2 or newer (we use the JSON data type). You can just install the
postgres
package on your OS and configure a user and a database:createuser -d serviceregistry createdb -U serviceregistry serviceregistry
- Or you can use this Docker incantation to get one temporarily:
docker run -d -p 5432:5432 --name serviceregistry -e POSTGRES_USER=serviceregistry -e POSTGRES_PASSWORD=serviceregistry postgres
Mac or Windows:
docker run --rm -it -v $(pwd)/ci/predeploy/:/liquibase/changelog/ \
$LIQUIBASE_DOCKER_IMAGE \
--driver=org.postgresql.Driver \
--changeLogFile=/liquibase/changelog/db.changelog.yml \
--url=jdbc:postgresql://host.docker.internal/serviceregistry \
--username=serviceregistry \
--password=serviceregistry \
update
Linux:
docker run --rm -it -v $(pwd)/ci/predeploy/:/liquibase/changelog/ \
$LIQUIBASE_DOCKER_IMAGE \
--driver=org.postgresql.Driver \
--changeLogFile=/liquibase/changelog/db.changelog.yml \
--url=jdbc:postgresql://localhost/serviceregistry \
--username=serviceregistry \
--password=serviceregistry \
update
where $LIQUIBASE_DOCKER_IMAGE should be set to your Liquibase Docker Image link. See https://cloud.google.com/container-registry/docs/quickstart for Container Registry setup and look up your image at at https://console.cloud.google.com/gcr/images/. This value should be of form gcr.io/container-store/liquibase-docker-image:version
.
Make sure the database schema is up-to-date, then:
./gradlew clean build bootRun
Normally the CI server runs this to build the image, but you can do it on your local machine to test the shell script and Dockerfile.
image_name=dnastack-service-registry
image_version=$(git describe)
docker_tag=my.docker.repo/${image_name}:{image_version}
ci/build-docker-image ${docker_tag} ${image_name} ${image_version}
To run the tests, execute the following from e2e-tests
directory:
./gradlew endToEndTest
Environment variables for development setup as required by the tests can be obtained by sourcing test-secrets.env
. Use set -a
to export variables so that they're accessible by gradlew
.