Skip to content

nosinovacao/name-registry-api

Repository files navigation

NAME Registry API: Central Registration Server for NAME

Travis Build Status AppVeyor Build status

NAME Registry is the service designed to provide Central Registration for applications running the NAME SDK. It fully implements the Central Registration protocol.

Its goal is to provide users with information regarding the lifecycle of services and its dependencies in a queriable, machine-friendly way.

The Registry API keeps the services in three fundamental entities:

  • Registered Service: Unique representation of an application in a specific machine and version. This is kept across service restarts.
  • Service Session: Represents the state of a service since it was started. E.g. when a service restarts a new session is created.
  • Manifest Snapshot: Represents the manifest of a service session at a certain time.

Main Features

  • Zero dependencies
  • Services storage
  • Service lifecycle information
  • Manifest snapshots
  • Cross-platform
  • Query APIs

You can use our existing Web UI solution to access the data in a human-friendly way.

Getting Started

Running on docker

The Registry API is provided as a docker image, to spin up a container listening on the port 80 use the following command.

docker run -d -p 80:5000 nosinovacao/name-registry-api

Since the API uses LiteDB to keep state, when the container is deleted the data will be lost, to keep the data consider mapping the database file in a volume.

docker run -d \
    -e "ConnectionStrings:RegistryLiteDB=/data/db/name-registry-api/Registry.db" \
    -v /data/name-registry-api/db/:/data/name-registry-api/db/ \
    -p 80:5000 \
    nosinovacao/name-registry-api

The environment variable ConnectionStrings:RegistryLiteDB sets the path of the database file.

Building and testing

We define our build using Cake, this allows us to define a common ground for developers on different operating systems, but it requires .Net 4.5 or Mono 4.2.3, so make sure you have those dependencies setup.

Bootstrap scripts are provided for both Windows and Linux environments.

To build and run unit tests on Windows execute the command:

powershell ./build.ps1

To build and run unit tests on Linux execute the command:

./build.sh

Contributing

We really appreciate your interest in contributing to the NAME Registry API. 👍

All we ask is that you follow some simple guidelines, so please read the CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Thank you, contributors!

License

Copyright © NOS Inovação.

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.