Sign inSign up

griddbnet/5.0.0-ubuntu18

By griddbnet

•Updated about 4 years ago

GridDB 5.0 running on Ubuntu 18

Image
0

764

griddbnet/5.0.0-ubuntu18 repository overview

⁠What is GridDB?

GridDB⁠ is Database for IoT with both NoSQL interface and SQL Interface. Please refer to GridDB Features Reference⁠ for functionality. This repository includes server and Java client. And jdbc repository⁠ includes JDBC Driver.

⁠How to use this image

⁠Start a GridDB server instance

Starting a GridDB instance is simple.

Run images griddb sever default mode and default setting

$ docker run --network="host" griddbnet/5.0.0-ubuntu18

All variable of docker GridDB

VariableValue defaultType of variable
GRIDDB_CLUSTER_NAMEdockerGridDBSTRING
GRIDDB_PASSWORDadminSTRING
NOTIFICATION_PORT31999NUMBER
NOTIFICATION_ADDRESS239.0.0.1STRING
NOTIFICATION_MEMBERNULLNUMBER

All method of docker GridDB

MODESTATUS(default)
MULTICASTON
FIXED LISTOFF

⁠About run GridDB with connection method

⁠GridDB run with Multicast mode

Run images GridDB server simple with multicast mode

$ docker run --network="host" griddbnet/5.0.0-ubuntu18

Run image GridDB server with environment config for multicast mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e NOTIFICATION_PORT=<port> \
    -e NOTIFICATION_ADDRESS=<multicast_address> \
    griddbnet/5.0.0-ubuntu18

Start docker GridDB via docker-compose

Example docker-compose.yaml for GridDB:

version: '3'

services:
  griddb:
    container_name: griddb_server
    image: griddbnet/5.0.0-ubuntu18
    network_mode: "host"
    volumes:
      - "vol:/var/lib/gridstore"

volumes:
    vol:

Try command line in current folder :

$ docker-compose up
⁠GridDB run with fixed list mode

Run images GridDB server simple with fixed list mode

$ docker run --network="host" -e NOTIFICATION_MEMBER=1 griddbnet/5.0.0-ubuntu18

Run image GridDB server with environment config for fixed list mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e NOTIFICATION_MEMBER=1 \
    griddbnet/5.0.0-ubuntu18

Note :

  • GridDB 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 server on Ubuntu)

⁠Run sample Client (Java)

$ docker run -d --network="host" griddbnet/5.0.0-ubuntu18
$ docker run --network="host" griddb/java-client

Output:

--> Person:  name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]

The more information about griddb server and java client. Could please refer to here⁠

⁠Run sample JDBC Driver

$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/jdbc

Output :

--> SQL Create Table name=SampleJDBC_Select
    SQL Insert count=5
    SQL row(id=3, value=test3)
    SQL row(id=4, value=test4)
    success!

The more information about JDBC Driver. 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 container:

$ docker exec -it container-name bash

Check status container for griddb sever:

$ docker exec container_name /bin/bash -c "gs_stat -u admin/admin"

The log is available through Docker's container log:

$ docker logs container_name

⁠About data from volume

$ docker run --name container_name \
  -v my_vol:/var/lib/gridstore \
  griddb/griddb

With: my_vol is volume ( $ docker volume ls ) Or you can see more infor in path: "/var/lib/docker/volumes/my_vol/_data"

⁠Stop a GridDB server

Use docker exec for stop griddb sever:

$ docker exec container_name /bin/bash -c "gs_stopcluster -u admin/admin"
$ docker exec container_name /bin/bash -c "gs_stopnode -u admin/admin"
$ docker container stop container_name
or
$ docker kill container_name

Note: You can restart griddb server and you can add flag "-i" into command for more information. Using command in below:

$ docker container start container_name -i

Tag summary

Content type

Image

Digest

sha256:93dbf6f09…

Size

49.2 MB

Last updated

about 4 years ago

docker pull griddbnet/5.0.0-ubuntu18