This repository contains a command tool hdt, which can be used to set up a HStreamDB Cluster with docker.
-
Start HStreamDB requires an operating system kernel version greater than at least Linux 4.14. Check with command:
uname -r
-
Make sure docker is installed.
-
Make sure that the log-in user has
sudoexecute privileges,and configuresudowithout password. -
For nodes which deploy
HStoreinstances, mount the data disk to/mnt/data*/.- "*" Matching incremental numbers, start from zero
- one disk should mount to one directory. e.g. if we have two data disks
/dev/vdband/dev/vdc, then/dev/vdbshould mount to/mnt/data0and/dev/vdcshould mount to/mnt/data1
Binaries are available here: https://github.com/hstreamdb/deployment-tool/releases
./hdt initThe current directory structure will be as follows after running the init command:
├── hdt
└── template
├── config.yaml
├── grafana
│ ├── dashboards
│ └── datasources
├── prometheus
└── scriptUpdate the config.yaml file with cluster-related information. The configuration in the config.yaml template will deploy a cluster on 3 nodes, each consisting of a HServer instance, a HStore instance, a Meta-Store instance and associated monitoring components. Prometheus 、Grafana and other monitor components will be deploy on a separate node.
To use this configuration file, just update the host information of the node and the ssh key-pair path. The final configuration file may looks like:
global:
user: "root"
key_path: "~/.ssh/hstream.pem"
ssh_port: 22
monitor:
node_exporter_port: 9100
cadvisor_port: 7000
grafana_disable_login: true
hserver:
- host: 172.24.47.173
- host: 172.24.47.174
- host: 172.24.47.175
hstore:
- host: 172.24.47.173
enable_admin: true
- host: 172.24.47.174
- host: 172.24.47.175
meta_store:
- host: 172.24.47.173
- host: 172.24.47.174
- host: 172.24.47.175
prometheus:
- host: 172.24.47.172
grafana:
- host: 172.24.47.172
hstream_exporter:
- host: 172.24.47.172./hdt start ./hdt remove