Sign inSign up

griddb/node-api

By griddb

•Updated about 4 years ago

Image
0

92

griddb/node-api repository overview

⁠Overview GridDB Node Api?

GridDB Node API is developed using GridDB C Client and node-addon-api.

⁠How to use this image

⁠Start a GridDB Node API instance

Starting a GridDB Node API instance is simple.

Run images GridDB Node API default mode and default setting

$ docker run --network="host" griddb/nodeapi

All variable of docker GridDB nodeapi client

VariableValue defaultType of variable
GRIDDB_CLUSTER_NAMEdockerGridDBSTRING
GRIDDB_USERNAMEadminSTRING
GRIDDB_PASSWORDadminSTRING
NOTIFICATION_PORT31999NUMBER
NOTIFICATION_ADDRESS239.0.0.1STRING
IP_NOTIFICATION_MEMBERNULLSTRING

All method of docker GridDB nodeapi

MODESTATUS(default)
MULTICASTON
FIXED LISTOFF

⁠About run GridDB Node Api with connection method

⁠GridDB Node Api run sample with Multicast mode

Run images GridDB nodeapi simple with multicast mode

$ docker run --network="host" griddb/nodeapi

Run image GridDB nodeapi with environment config for multicast mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e NOTIFICATION_PORT=<port> \
    -e NOTIFICATION_ADDRESS=<multicast_address> \
    -e GRIDDB_USERNAME=<user> \
    -e GRIDDB_PASSWORD=<passwd> \
    griddb/nodeapi
⁠GridDB Node Api run sample with fixed list mode

Run images GridDB Node API simple with fixed list mode

$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/nodeapi

Run image GridDB Node API with environment config for fixed list mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_USERNAME=<user> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e IP_NOTIFICATION_MEMBER=<ip_machine_member> \
    griddb/nodeapi

Note :

  • GridDB server version 4.5, 4.6 and 5.0 CE support 1 member for fixed list method.
  • GridDB use option --network="host" to forward ports.

⁠Execute a sample program (GriddB Node Api on Ubuntu)

⁠Run sample nodeapi

⁠Multicast method
$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/nodeapi

Output :

--> [ 'name01', false, 1, <Buffer 41 42 43 44 45 46 47 48 49 4a> ]
⁠Fixed list method
$ docker run -d --network="host" -e NOTIFICATION_MEMBER=1 griddb/griddb
$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/nodeapi

Output :

--> [ 'name01', false, 1, <Buffer 41 42 43 44 45 46 47 48 49 4a> ]

The more information about nodeapi. Could please refer to here⁠

⁠Container shell access

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your GridDB nodeapi container:

$ docker exec -it container-name bash

About use docker exec for excute container nodeapi:

Step 1: Start GridDB server⁠

Step 2: Run image GridDB Node Api

$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_nodeapi griddb/nodeapi tail -f /dev/null

Note: After finshed to run step 2. Image GridDB nodeapi has:

  1. Name container is griddb_nodeapi
  2. Mount current folder into docker container.
  3. Process docker image GridDB nodeapi will run hidden. Run command $ docker ps about show it.
  4. In command: The pwd is current path when run image. The "/root/." is path into docker container. This 2 value can change with user purpose
  5. With command step 2. GridDB nodeapi can docker execute for 2 method(multicast method and fixed list method)

Step 3: Sample execute

$ docker execute -it griddb_nodeapi /bin/bash -xec "Your command"

Example:

$ docker execute -it griddb_nodeapi /bin/bash -xec "nodeapi sample1.js 239.0.0.1 31999 dockerGridDB admin admin"

⁠Stop a GridDB Node Api

If run sample GridDB nodeapi.

$ docker run --network="host" griddb/nodeapi

After finshed run sample image auto finish process.

If run execute GridDB nodeapi image

$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_nodeapi griddb/nodeapi tail -f /dev/null

GridDB nodeapi will stop with command:

$ docker container stop griddb_nodeapi
or
$ docker kill griddb_nodeapi

⁠Image Variants

The griddb nodeapi images come in many flavors, each designed for a specific use case.

⁠griddb/nodeapi

  • This is default image of GridDB Node Api.

⁠griddb/nodeapi:<version>-focal

  • This is image of GridDB Node Api on Ubuntu. This image dedicated of GridDB Node Api on Ubuntu 20.04.

⁠griddb/nodeapi:<version>-centos7

  • This is image of GridDB Node Api on CentOS. This image dedicated of GridDB Node Api on CentOS 7.

⁠griddb/nodeapi:<version>-bionic

  • This is image of GridDB Node Api on Ubuntu. This image dedicated of GridDB Node Api on Ubuntu 18.04.

⁠License

View license information⁠ for the software contained in this image.

Tag summary

Content type

Image

Digest

sha256:91728afc9…

Size

335.3 MB

Last updated

about 4 years ago

docker pull griddb/node-api:0.8.5-centos7