-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
- Loading branch information
Showing
6 changed files
with
148 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Get Binaries | ||
|
||
This page shows how to get binaries of Banyand. | ||
|
||
## Prebuilt Released binaries | ||
|
||
Get binaries from the [download](https://skywalking.apache.org/downloads/). | ||
|
||
## Build From Source | ||
|
||
### Requirements | ||
|
||
Users who want to build a binary from sources have to set up: | ||
|
||
* Go 1.20 | ||
* Node 18.16 | ||
* Git >= 2.30 | ||
* Linux, macOS or Windows+WSL2 | ||
* GNU make | ||
|
||
### Windows | ||
|
||
BanyanDB is built on Linux and macOS that introduced several platform-specific characters to the building system. Therefore, we highly recommend you use [WSL2+Ubuntu](https://ubuntu.com/wsl) to execute tasks of the Makefile. | ||
|
||
### Build Binaries | ||
|
||
To issue the below command to get basic binaries of banyand and bydbctl. | ||
|
||
```shell | ||
$ make generate | ||
... | ||
$ make build | ||
... | ||
--- banyand: all --- | ||
make[1]: Entering directory '<path_to_project_root>/banyand' | ||
... | ||
chmod +x build/bin/banyand-server | ||
Done building banyand server | ||
make[1]: Leaving directory '<path_to_project_root>/banyand' | ||
... | ||
--- bydbctl: all --- | ||
make[1]: Entering directory '<path_to_project_root>/bydbctl' | ||
... | ||
chmod +x build/bin/bydbctl | ||
Done building bydbctl | ||
make[1]: Leaving directory '<path_to_project_root>/bydbctl' | ||
``` | ||
|
||
The build system provides a series of binary options as well. | ||
|
||
* `make -C banyand banyand-server` generates a basic `banyand-server`. | ||
* `make -C banyand release` builds out a static binary for releasing. | ||
* `make -C banyand debug` gives a binary for debugging without the complier's optimizations. | ||
* `make -C banyand debug-static` is a static binary for debugging. | ||
* `make -C bydbctl release` cross-builds several binaries for multi-platforms. | ||
|
||
Then users get binaries as below | ||
|
||
``` shell | ||
$ ls banyand/build/bin | ||
banyand-server | ||
banyand-server-debug | ||
banyand-server-debug-static | ||
banyand-server-static | ||
|
||
$ ls banyand/build/bin | ||
bydbctl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Cluster Installation<TBD> | ||
|
||
## Setup Meta Nodes | ||
|
||
Meta nodes are a etcd cluster which is required for the metadata module to provide the metadata service and nodes discovery service for the whole cluster. | ||
|
||
The etcd cluster can be setup by the [etcd installation guide](https://etcd.io/docs/v3.5/install/) | ||
|
||
## Role-base Banyand Cluster | ||
|
||
There is an example: The etcd cluster is spread across three nodes with the addresses `10.0.0.1:2379`, `10.0.0.2:2379`, and `10.0.0.3:2379`. | ||
|
||
Data nodes, query nodes and liaison nodes are running as independent processes by | ||
|
||
```shell | ||
$ ./banyand-server storage --mode data --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --mode data --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --mode data --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --mode query --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --mode query --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server liaison --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
``` | ||
|
||
The data node, query node and liaison node would be listening on the `<ports>` if no errors occurred. | ||
|
||
## Mix-mode Data Nodes | ||
|
||
If you want to use a `mix` mode instead of separate query and data nodes, you can run the banyand-server as processes by | ||
|
||
```shell | ||
$ ./banyand-server storage --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server storage --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
$ ./banyand-server liaison --etcd-endpoints=http://10.0.0.1:2379,http://10.0.0.2:2379,http://10.0.0.3:2379 <flags> | ||
``` | ||
|
||
## Node Discovery | ||
|
||
The node discovery is based on the etcd cluster. The etcd cluster is required for the metadata module to provide the metadata service and nodes discovery service for the whole cluster. | ||
|
||
The host is registered to the etcd cluster by the `banyand-server` automatically based on `node-host-provider` : | ||
|
||
- `node-host-provider=hostname` : The OS's hostname is registered as the host part in the address. | ||
- `node-host-provider=ip` : The OS's the first public active IP address(IPv4) is registered as the host part in the address. | ||
- `node-host-provider=flag` : `node-host` is registered as the host part in the address. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Standalone Mode | ||
|
||
The standalone mode is the simplest way to run Banyand. It is suitable for the development and testing environment. The standalone mode is running as a standalone process by | ||
|
||
```shell | ||
$ ./banyand-server standalone | ||
██████╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ███╗ ██╗██████╗ ██████╗ | ||
██╔══██╗██╔══██╗████╗ ██║╚██╗ ██╔╝██╔══██╗████╗ ██║██╔══██╗██╔══██╗ | ||
██████╔╝███████║██╔██╗ ██║ ╚████╔╝ ███████║██╔██╗ ██║██║ ██║██████╔╝ | ||
██╔══██╗██╔══██║██║╚██╗██║ ╚██╔╝ ██╔══██║██║╚██╗██║██║ ██║██╔══██╗ | ||
██████╔╝██║ ██║██║ ╚████║ ██║ ██║ ██║██║ ╚████║██████╔╝██████╔╝ | ||
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ | ||
***starting as a standalone server**** | ||
... | ||
... | ||
***Listening to**** addr::17912 module:LIAISON-GRPC | ||
``` | ||
|
||
The banyand-server would be listening on the `0.0.0.0:17912` to access gRPC requests. if no errors occurred. | ||
|
||
At the same time, the banyand-server would be listening on the `0.0.0.0:17913` to access HTTP requests. if no errors occurred. The HTTP server is used for CLI and Web UI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters