Manual Deployment and Management
Guide showing how to deploy LinDB on servers.
LinDB provides three modes:
Mode | Env |
---|---|
Standalone | test/dev |
Cluster | production |
Multiple IDCs/Regions | production |
Standalone Mode
This mode integrates broker/storage/ETCD and other components into a single process to achieve rapid and simple deployment.
Applicable scenario: Quickly deploy LinDB test cluster using MacOS or stand-alone Linux environment to experience the basic functions of LinDB cluster.
-
Download latest version at LinDB version release address;
-
Quick start;
Use the following command to experience the standalone mode with default configuration, you can also quickly generate the default configuration file and adjust the corresponding parameters. For more parameters, refer to.
./lind standalone run
./lind standalone -h
Run as a standalone node with embed broker, storage, etcd)
Usage:
lind standalone [command]
Available Commands:
init-config create a new default standalone-config
run run as standalone mode
Flags:
-h, --help help for standalone
Use "lind standalone [command] --help" for more information about a command.
-
Aceess LinDB Admin Console at http://127.0.0.1:9000 to view the overall status. For more Admin Console, refer to;
-
At the same time, you can also query the status and data in the cluster through Lin Cli. For more Cli, please refer to;
Cluster Mode
This mode requires independent deployment of LinDB components.
Applicable scenario: production environment.
TIP
The following example use the minimum nodes of LinDB cluster to illustrate the LinDB's deployment of cluster mode.
For actual business scenarios, please picks the cluster size according to specific requirements.
IP in the following example is for reference only.
This example takes three hosts as an example. Each host is deployed with three broker/storage/ETCD components.
The host IP are as follows:
- 192.168.1.10
- 192.168.1.11
- 192.168.1.12
The component deployment order is ETCD/Broker/Storage. The component information is as follows:
Components | Configuration |
---|---|
ETCD | Default port Default configuration |
Broker | Default port Default configuration |
Storage | Default port Adjust the node IDs, and use the default configuration for others |
1. Deploy ETCD,For more ETCD details, refer to
2. Deploy Broker.
$ bin/lind broker
Run as a compute node with cluster mode enabled
Usage:
lind broker [command]
Available Commands:
init-config create a new default broker-config
run starts the broker
Flags:
-h, --help help for broker
Use "lind broker [command] --help" for more information about a command.
- Download Default Config. Or you can generate a new config example by next command.
$ lind broker init-config
- Edit config,such as ETCD address and others according to the actual scenario.
[coordinator]
## ETCD register namespace
namespace = "/lindb-broker"
## ETCD address
endpoints = ["http://192.168.1.10:2379","http://192.168.1.11:2379","http://192.168.1.12:2379"]
.......
- Start Broker.
$ lind broker run --config=broker.toml
TIP
Generally, a VIP or LB may be placed in front of the broker to provide a unified entry address.
3. Deploy Storage:
$ bin/lind storage
Run as a storage node with cluster mode enabled
Usage:
lind storage [command]
Available Commands:
init-config create a new default storage-config
run starts the storage
Flags:
-h, --help help for storage
Use "lind storage [command] --help" for more information about a command.
- Download Default Config. Or you can generate a new config example by next command.
$ lind storage init-config
- Edit config,such as ETCD address and Storage Node ID according to the actual scenario.
[storage]
## broker address for storage-cluster registration
broker-endpoint = "http://192.168.1.10:9000"
.......
[coordinator]
## ETCD register namespace
namespace = "/lindb-storage"
## ETCD address
endpoints = ["http://192.168.1.10:2379","http://192.168.1.11:2379","http://192.168.1.12:2379"]
.......
## Self-Monitor details
[monitor]
## Metric Report Address (Broker Write Endpoint)
url = "http://192.168.1.19:9000/api/flat/write?db=_internal"
- Start Storage.
$ lind storage run --config=storage.toml --myid=1
WARNING
The value of myid must be unique within the current storage cluster to indicate the uniqueness within the storage node cluster.
There are 2 ways to set myid:
- As above, you can add the --myid=1 parameter to the start command. This method is used to set the default value of myid. If this file already exists, the parameter does not take effect, otherwise this value will be persisted into myid file;
- Create or modify the value in the myid file under the data storage directory;
The design idea of myid is similar to that of zookeeper.
-
Access LinDB Admin Console at http://192.168.1.10:9000 The interface is used to view the overall status. For more Admin Console, please refer to;
-
At the same time, you can also query the status and data in the cluster through Lin Cli. For more Cli, please refer to;
Multiple IDCs/Regions Mode
Compared with the cluster mode, the multiple IDCs/Regions mode has an additional Root
cluster, which is used to query and aggregate data in each IDC/Region.
The following mainly introduces the deployment of the Root
cluster.
1. Deploy ETCD,For more ETCD details, refer to
2. Deploy Root.
$ bin/lind root
Run as a root compute node with multi idc/regions mode enabled
Usage:
lind root [command]
Available Commands:
init-config create a new default root-config
run starts the root
Flags:
-h, --help help for root
Use "lind root [command] --help" for more information about a command.
- Download Default Config. Or you can generate a new config example by next command.
$ lind root init-config
- Edit config,such as ETCD address and others according to the actual scenario.
[coordinator]
## ETCD register namespace
namespace = "/lindb-root"
## ETCD address
endpoints = ["http://192.168.1.10:2379","http://192.168.1.11:2379","http://192.168.1.12:2379"]
.......
- Start Root.
$ lind root run --config=root.toml
- Access LinDB Admin Console at http://192.168.1.10:3000 The interface is used to view the overall status. For more Admin Console, please refer to;
- Register Broker cluster,please refer to;
- Configure logic database,please refer to;