此文章只介绍类生产环境中集群的配置,想看完整下载安装过程请阅读这篇文章https://blog.csdn.net/weixin_44328192/article/details/127306856
部署方案
为了测试方便把所有机器的都设成一样的配置
机器名称 | IP地址 | metad 进程数量 | graphd 进程数量 | storaged 进程数量 |
---|---|---|---|---|
bigdata01 | 192.168.10.101 | 1 | 1 | 1 |
bigdata02 | 192.168.10.102 | 1 | 1 | 1 |
bigdata03 | 192.168.10.103 | 1 | 1 | 1 |
因为三台主机都要修改三个配置文件,所以只列出一台主机,其他两台只需修改ip地址即可
1.1、nebula-metad.conf
(1)修改basics
添加时区信息(以我们所属的东八区为例)
########## basics ##########
# Specifying the Time Zone
--timezone_name=UTC+08:00
(2)修改logging
########## logging ##########
# The directory to host logging files
--log_dir=logs= /mnt/data/nebula/logs # 这个日志路径在生产环境中一般会单独放在一个磁盘中,按照实际修改
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=1 # 把最低日志级别改为1(WARNING)
(3)修改networking
########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=192.168.10.101:9559,192.168.10.102:9559,192.168.10.103:9559
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.10.102
# Meta daemon listening port
--port=9559
(4)修改storage
########## storage ##########
# Root data path, here should be only single path for metad
--data_path=/mnt/data/nebula/meta # meta数据存储路径在生产环境中一般会单独放在一个磁盘中,按照实际修改
1.2、nebula-graphd.conf
(1)修改basics
增加时区信息
########## basics ##########
# Specifying the Time Zone
--timezone_name=UTC+08:00
(2)修改logging
########## logging ##########
# The directory to host logging files
--log_dir=/mnt/data/nebula/logs
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=1
(3)修改networking
########## networking ##########
# Comma separated Meta Server Addresses
--meta_server_addrs=192.168.10.101:9559,192.168.10.102:9559,192.168.10.103:9559
# Local IP used to identify the nebula-graphd process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.10.102
# Network device to listen on
--listen_netdev=any
# Port to listen on
--port=9669
(4)修改authentication
这里根据实际需求选择是否需要开启身份验证
(5)修改metrics
这里根据实际需求选择是否需要开启
1.3、nebula-storaged.conf
(1)修改basics
增加时区信息
########## basics ##########
# Specifying the Time Zone
--timezone_name=UTC+08:00
(2)修改logging
########## logging ##########
# The directory to host logging files
--log_dir=logs= /mnt/data/nebula/logs # 这个日志路径在生产环境中一般会单独放在一个磁盘中,按照实际修改
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=1 # 把最低日志级别改为1(WARNING)
(3)修改networking
########## networking ##########
# Comma separated Meta server addresses
--meta_server_addrs=192.168.10.101:9559,192.168.10.102:9559,192.168.10.103:9559
# Local IP used to identify the nebula-storaged process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.10.102
# Storage daemon listening port
--port=9779
(4)修改Disk
########## Disk ##########
# Root data path. Split by comma. e.g. --data_path=/disk1/path1/,/disk2/path2/
# One path per Rocksdb instance.
--data_path=/mnt/data/nebula/storage