2019-02-09 21:15:18 +00:00
|
|
|
# dn42regsrv
|
|
|
|
|
|
|
|
A REST API for the DN42 registry, written in Go, to provide a bridge between
|
2019-02-12 11:15:01 +00:00
|
|
|
interactive applications and registry data.
|
|
|
|
|
|
|
|
A public instance of the API and explorer web app can be accessed via:
|
|
|
|
|
|
|
|
* [https://explorer.burble.com/](https://explorer.burble.com/) (Internet link)
|
2019-03-31 11:33:18 +01:00
|
|
|
* [http://explorer.collector.dn42/](http://explorer.collector.dn42/) (DN42 Link)
|
2019-02-09 21:15:18 +00:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
2019-02-12 11:15:01 +00:00
|
|
|
* REST API for querying DN42 registry objects
|
|
|
|
* Able to decorate objects with relationship information based on SCHEMA type definitions
|
|
|
|
* Includes a simple webserver for delivering static files which can be used to deliver
|
2019-02-09 21:15:18 +00:00
|
|
|
basic web applications utilising the API (such as the included DN42 Registry Explorer)
|
2019-02-12 11:15:01 +00:00
|
|
|
* Automatic pull from the DN42 git repository to keep the registry up to date
|
|
|
|
* Includes a responsive web app for exploring the registry
|
2019-02-17 11:37:04 +00:00
|
|
|
* API endpoints for ROA data in JSON, and bird formats
|
2019-03-08 19:57:55 +00:00
|
|
|
* API endpoint to support the creation of DNS root zone records
|
2019-02-09 21:15:18 +00:00
|
|
|
|
|
|
|
## Building
|
|
|
|
|
2019-08-31 23:36:17 +01:00
|
|
|
#### Using locally installed go
|
2019-02-09 21:15:18 +00:00
|
|
|
|
2019-08-31 23:36:17 +01:00
|
|
|
Requires [git](https://git-scm.com/) and [go](https://golang.org)
|
2019-02-09 21:15:18 +00:00
|
|
|
```
|
2019-02-09 21:38:54 +00:00
|
|
|
go get -insecure git.dn42.us/burble/dn42regsrv
|
2019-02-09 21:15:18 +00:00
|
|
|
```
|
|
|
|
|
2019-08-31 23:36:17 +01:00
|
|
|
#### Without installing go
|
|
|
|
|
|
|
|
Using container runtime to build with the golang container:
|
|
|
|
```
|
|
|
|
docker run -v ${PWD}:/go/bin golang go get -insecure git.dn42.us/burble/dn42regsrv
|
|
|
|
```
|
|
|
|
|
|
|
|
Or use the *contrib/build.sh* script after cloning the repo.
|
|
|
|
|
2019-02-09 21:15:18 +00:00
|
|
|
## Running
|
|
|
|
|
2019-08-31 23:36:17 +01:00
|
|
|
#### As a service
|
|
|
|
|
2019-02-09 21:15:18 +00:00
|
|
|
Use --help to view configurable options
|
|
|
|
```
|
2019-02-09 21:38:54 +00:00
|
|
|
${GOPATH}/bin/dn42regsrv --help
|
2019-02-09 21:15:18 +00:00
|
|
|
```
|
|
|
|
|
2019-02-12 11:15:01 +00:00
|
|
|
The server requires access to a clone of the DN42 registry and for
|
|
|
|
the git executable to be accessible.
|
2019-02-09 21:15:18 +00:00
|
|
|
If you want to use the auto pull feature then the registry must
|
|
|
|
also be writable by the server.
|
|
|
|
|
|
|
|
```
|
2019-02-09 21:38:54 +00:00
|
|
|
cd ${GOPTH}/src/git.dn42.us/burble/dn42regsrv
|
2019-02-09 21:15:18 +00:00
|
|
|
git clone http://git.dn42.us/dn42/registry.git
|
2019-02-09 21:38:54 +00:00
|
|
|
${GOPATH}/dn42regsrv
|
2019-02-09 21:15:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
A sample service file is included for running the server under systemd
|
|
|
|
|
2019-08-31 23:36:17 +01:00
|
|
|
#### Within a container
|
|
|
|
|
|
|
|
A container build script (*contrib/buildah.sh*) is included in the
|
|
|
|
contrib directory. The script uses [buildah](https://buildah.io/).
|
|
|
|
|
|
|
|
See the *contrib/entrypoint.sh* script for environment variables that can
|
|
|
|
be set when running the container.
|
|
|
|
|
2019-02-09 21:15:18 +00:00
|
|
|
## Using
|
|
|
|
|
|
|
|
By default the server will be listening on port 8042.
|
|
|
|
See the [API.md](API.md) file for a detailed description of the API.
|
|
|
|
|
|
|
|
|
|
|
|
## Support
|
|
|
|
|
|
|
|
Please feel free to raise issues or create pull requests for the project git repository.
|
|
|
|
|
|
|
|
## #ToDo
|
|
|
|
|
|
|
|
### Server
|
|
|
|
|
|
|
|
- Add WHOIS interface
|
|
|
|
|
|
|
|
### DN42 Registry Explorer Web App
|
|
|
|
|
|
|
|
- Allow for attribute searches
|
|
|
|
|