There are two types of nodes in a cluster: prophet nodes and pure storage nodes. The first three nodes are prophet nodes. The others are pure storage nodes. There should be at least three nodes in one cluster.
For example, if there're three nodes in the cluster, all the nodes are prophet nodes. If there're four nodes in the cluster, three are prophet nodes, one is a pure storage node.
Run following command in the directory matrixone to generate default configration.
$ make config
The default configration file system_vars_config.toml is generated.
In the default configration file 'system_vars_config.toml', following parameters need to be changed.
-
nodeID
nodeIDis the Node ID of the cube. In a cluster, each node should have a differentnodeID. -
addr-raft and addr-advertise-raft
addr-raftis the address for raft-group rpc communication.It is the 10000 port of the node.
addr-raft = "localhost:10000"Only docker deployment need adjust
addr-advertise-raftFor docker deployment, the ip is
0.0.0.0addr-raft = "0.0.0.0:10000"In the case that some clients cannot access the raft-group,
addr-advertise-raftmust be manually set.addr-advertise-raft = "${HOST}:10000" -
addr-client and addr-advertise-client
addr-clientis the address for cube service. It is the 20000 port of the node.addr-client = "localhost:20000"Only docker deployment need adjust
addr-advertise-clientFor docker deployment, the ip is
0.0.0.0addr-client = "0.0.0.0:20000"In the case that a client cannot access Cube through the default client URLs listened to by Cube,
addr-advertise-clientmust be manually set.addr-advertise-client = "${HOST}:20000" -
dir-data
dir-datais the directory for cube data. In a cluster, each node should have a differentdir-data. -
prophet name
nameinProphet Configsis the name of the node. In a cluster, each node should have a different prophet name.name = "node0" -
rpc-addr and rpc-advertise-addr
rpc-addris the address for other clients to access prophet. It is the 30000 port of the node.rpc-addr = "localhost:30000"Only docker deployment need adjust
rpc-advertise-addrFor docker deployment, the ip is
0.0.0.0rpc-addr = "0.0.0.0:30000"In the case that a client cannot access prophet,
rpc-advertise-addrmust be manually set.rpc-advertise-addr = "${HOST}:30000" -
storage-node
storage-nodeis whether the node is a pure storage node. For the three prophet nodes,storage-nodeistrue.storage-node = trueFor pure storage nodes,
storage-nodeisfalsestorage-node = false -
external-etcd
For the three prophet nodes,
external-etcdis empty.external-etcd = ["", "", ""]For pure storage nodes,
external-etcdis the list of theclient-urlsof the three prophet nodes, i.e. the 40000 port of the prophet nodes.external-etcd = ["http://ip_of_prophet_node1:40000", "http://ip_of_prophet_node2:40000", "http://ip_of_prophet_node3:40000"] -
join
joinis for the second and third prophet nodes to join the raft group. For the first prophet node,joinis a empty string.join = ""For the second and third prophet node,
joinis thepeer-urlsof the first prophet node.join = "http://ip_of_the_first_prophet_node:40000"For pure storage nodes, there's no need to adjust
join. -
client-urls and advertise-client-urls
client-urlsis exposed to other nodes in the cluster. It is 40000 port of the nodeclient-urls = "http://localhost:40000"Only docker deployment need adjust
advertise-client-urlsFor docker deployment, the ip is
0.0.0.0client-urls = "http://0.0.0.0:40000"In the case that some clients ccannot access prophet through the default client URLs listened to by prophet,
advertise-client-urlsmust be manually set.advertise-client-urls = "http://${HOST}:40000 -
peer-urls and advertise-peer-urls
peer-urlsis the list of peer URLs to be listened to by a prophet node. It is the 40000 port of the node.peer-urls = "http://localhost:50000"Only docker deployment need adjust
advertise-peer-urlsFor docker deployment, the ip is
0.0.0.0peer-urls = "http://0.0.0.0:50000"In the case that a node cannot be listened to by a prophet node,
advertise-peer-urlsshould be manually set.advertise-peer-urls = "http://${HOST}:50000" -
max-replicas
max-replicasis the max number of replica in a prophet group. It should be 3.max-replicas = 3