NSDb runs on Linux and Mac OS X. To be able to run NSDb, the only requirements are:
- Java 8.x (or higher) installation.
- sbt 0.13.x.
It is possible to package the project using sbt with command dist:
$ sbt distOnce project packaging is completed, unzip archive created in path : package.
$ cd package
$ unzip nsdb-0.6.0-SNAPSHOT.zip
$ cd nsdb-0.6.0-SNAPSHOT/bin
$ ./nsdb-clusterIn order to check if the application is up and running properly user can call health-check API:
$ curl -f "http://localhost:9000/status"
RUNNINGCommand Line Interface(CLI) can be launched executing in the same path:
$ ./nsdb-cli --host 127.0.0.1 --port 7817 --database database_name
For a comprehensive documentation regarding NSDb CLI refer to CLI doc.
Alternatively to sbt build, NSDb integrates Docker image publishing and container instantiation. To build docker image locally execute:
$ sbt 'project nsdb-cluster' clean docker:publishLocalIt's possible running a container overriding the env variable:
version: '3'
services:
nsdb:
image: tools.radicalbit.io/nsdb:0.6.0-SNAPSHOT
environment:
AKKA_HOSTNAME: nsdb-node-1
ports:
- 9010:9000
- 9000:7817It's also possible to run an NSDb container mounting the configuration, data, certificates and external library directories:
version: '3'
services:
nsdb:
image: tools.radicalbit.io/nsdb:0.6.0-SNAPSHOT
volumes:
- .conf:/opt/nsdb-cluster/conf
- /host/data/path:/opt/nsdb-cluster/data
- /host/ext-lib/path:/opt/nsdb-cluster/ext-lib
- /host/certs/path:/opt/certs
ports:
- 9000:9000
- 7817:7817
- 9443:9443To start NSDb container:
$ docker-compose upCommand Line Interface(CLI) can be launched executing:
$ docker run --rm -it tools.radicalbit.io/nsdb:0.6.0-SNAPSHOT bin/nsdb-cli --host %HOST_IP% --port 7817 --database database_namewhere %HOST_IP% is the IP where NSDb is running.
For a comprehensive documentation regarding NSDb CLI refer to CLI doc.
It is possible to create a native Debian package of the project using sbt with command deb:
$ sbt debOnce project packaging is completed, deb package could be found in path : package.
$ cd package
$ dpkg --install nsdb_0.6.0-SNAPSHOT_all.deb
$ nsdb-clusterCommand Line Interface(CLI) can be launched executing in the same path:
$ nsdb-cli --host 127.0.0.1 --port 7817 --database database_nameIt is possible to create a native Centos/RHEL package of the project using sbt with command rpm:
$ sbt rpmOnce project packaging is completed, rpm package could be found in path : package.
$ cd package
$ yum install nsdb-0.6.0-1.noarch.rpm
$ nsdb-clusterCommand Line Interface(CLI) can be launched executing in the same path:
$ nsdb-cli --host 127.0.0.1 --port 7817 --database database_nameNSDb exposes data retrieval and insertion using both:
Query subscription can be achieved making use of WebSocket APIs fully described in doc.