首页 > 其他分享 >ONgDB集群测试

ONgDB集群测试

时间:2022-11-28 16:03:53浏览次数:63  
标签:node dbms enabled ONgDB connector 集群 ssh 测试 address


ONgDB项目是neo4j企业版的一个开源分支。另外ONgDB的发起组织也在快速更新。目前最新是3.6.0版本,与企业版neo4j-3.6.0版本功能基本一致。目前企业版neo4j已经更新到4.0版本,最大的特点是支持分库操作,ONgDB还不支持分库操作。

群号码:1061594137

一、安装虚拟机

使用VMware虚拟机安装CentOS7,搭建三个节点的集群。

ONgDB集群测试_vim


CentOS7是服务器常用的常用的操作系统,一般安装好系统之后JDK8默认就安装了。三台机器用户名均为ongdb,密码123456。虚拟机装好之后继续操作。

1、配置hosts

vim /etc/hosts
# 新增如下内容
192.168.91.128 node-1
192.168.91.129 node-2
192.168.91.130 node-3

2、配置可打开文件数

vim /etc/security/limits.conf
# 新增如下内容
neo4j soft nofile 40000
neo4j hard nofile 40000

二、关闭防火墙

# 查看防火墙状态
systemctl status firewalld.service
# 关闭防火墙
systemctl disable firewalld.service

三、配置互信

1、修改SSH配置文件

vim /etc/ssh/sshd_config 
# 找到下列行 去掉注释井号#
RSAAuthentication yes //字面意思..允许RSA认证
PubkeyAuthentication yes //允许公钥认证
AuthorizedKeysFile .ssh/authorized_keys //公钥存放在.ssh/au..文件中
# 保存退出。
# 修改后需要重启ssh
systemctl restart sshd
# 分别在host1,host2和host3上执行上述命令。

2、生成密码对

ssh-keygen -t rsa     
# 直接回车几次,可在默认路径~/.ssh/下生成私钥idrsa公钥idrsa.pub。
# 分别在host1,host2和host3上执行上述命令

3、 生成authorized_keys

# 将host2、host3的公钥传到host1上。
# 在host2上输入
scp /home/ongdb/.ssh/id_rsa.pub ongdb@host1:~/.ssh/id_rsa.pub.host2

# 在host3上输入
scp /home/ongdb/.ssh/id_rsa.pub ongdb@host1:~/.ssh/id_rsa.pub.host3

# 以上命令目前还需要输入目标机用户密码。
# 在host1上输入
cd ~/.ssh/
ls

# 查看idrsa.pub.host2、idrsa.pub.host3是否已经传输过来。
$ cat id_rsa.pub >> authorized_keys
$ cat id_rsa.pub.host2 >> authorized_keys
$ cat id_rsa.pub.host3 >> authorized_keys

# 生成authorized_keys。
# 给authorized_keys修改权限
chmod 644 authorized_keys

# 利用scp把该文件传送到host2、host3的.ssh/下
scp authorized_keys hadoop@host2:~/.ssh/
scp authorized_keys hadoop@host3:~/.ssh/

4、 验证

# 测试在host1下输入
$ssh host2
$exit
$ssh host3
$exit
# 应该都不需要密码。 这三个互联都应该不需要密码。

四、节点修改密码

节点在启动之后必须要先进shell修改密码,首次进入默认的用户密码都是neo4j。

[ongdb@node-1 ongdb-node-1]$ bin/cypher-shell 
username: neo4j
password: *****
Connected to Neo4j 3.5.16 at bolt://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.
neo4j> CALL dbms.changePassword('123456');
0 rows available after 320 ms, consumed after another 2 ms
neo4j>

五、配置两个CORE节点

ongdb-node-1配置

#*****************************************************************
# Network connector configuration
#*****************************************************************

dbms.connectors.default_listen_address=0.0.0.0
dbms.connectors.default_advertised_address=node-1

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687

# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=:7473

#*****************************************************************
# Causal Clustering Configuration
#*****************************************************************
dbms.mode=CORE

causal_clustering.minimum_core_cluster_size_at_formation=2
causal_clustering.minimum_core_cluster_size_at_runtime=2
causal_clustering.initial_discovery_members=node-1:5000,node-2:5001
causal_clustering.discovery_listen_address=:5000

# Remote debugging
dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

# algo|apoc|* plugins
dbms.security.procedures.unrestricted=algo.*,apoc.*,*
apoc.export.file.enabled=true
apoc.import.file.enabled=true

#********************************************************************
# Prometheus monitor
#********************************************************************
# Enable the Prometheus endpoint. Default is 'false'.
metrics.prometheus.enabled=true
# The default is localhost:2004.
metrics.prometheus.endpoint=localhost:2004

ongdb-node-2配置

#*****************************************************************
# Network connector configuration
#*****************************************************************

dbms.connectors.default_listen_address=0.0.0.0
dbms.connectors.default_advertised_address=node-2

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687

# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=:7473

#*****************************************************************
# Causal Clustering Configuration
#*****************************************************************
dbms.mode=CORE

causal_clustering.minimum_core_cluster_size_at_formation=2
causal_clustering.minimum_core_cluster_size_at_runtime=2
causal_clustering.initial_discovery_members=node-1:5000,node-2:5001
causal_clustering.discovery_listen_address=:5000

# Remote debugging
dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

# algo|apoc|* plugins
dbms.security.procedures.unrestricted=algo.*,apoc.*,*
apoc.export.file.enabled=true
apoc.import.file.enabled=true

#********************************************************************
# Prometheus monitor
#********************************************************************
# Enable the Prometheus endpoint. Default is 'false'.
metrics.prometheus.enabled=true
# The default is localhost:2004.
metrics.prometheus.endpoint=localhost:2004

六、增加一个只读READ_REPLICA节点

ongdb-node-3配置

#*****************************************************************
# Network connector configuration
#*****************************************************************

dbms.connectors.default_listen_address=0.0.0.0
dbms.connectors.default_advertised_address=node-3

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687

# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=:7473

#*****************************************************************
# Causal Clustering Configuration
#*****************************************************************
dbms.mode=READ_REPLICA

causal_clustering.minimum_core_cluster_size_at_formation=2
causal_clustering.minimum_core_cluster_size_at_runtime=2
causal_clustering.initial_discovery_members=node-1:5000,node-2:5001,node-3:5002
causal_clustering.discovery_listen_address=:5002

# Remote debugging
dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

# algo|apoc|* plugins
dbms.security.procedures.unrestricted=algo.*,apoc.*,*
apoc.export.file.enabled=true
apoc.import.file.enabled=true

#********************************************************************
# Prometheus monitor
#********************************************************************
# Enable the Prometheus endpoint. Default is 'false'.
metrics.prometheus.enabled=true
# The default is localhost:2004.
metrics.prometheus.endpoint=localhost:2004

七、检验apoc和algo插件

CALL algo.list()
CALL apoc.config.list()

八、查看集群成员角色

CALL dbms.cluster.overview()
CALL dbms.cluster.role()

ONgDB集群测试_sed_02


kill掉节点2,之后再看一下:

ONgDB集群测试_数据库_03

九、更多信息

​apoc与Neo4j的版本对应关系及下载​​​​algo与Neo4j的版本对应关系及下载​​​​自定义插件包​​​​ONgDB下载​​ - 本次测试使用的版本3.5.16
相关插件包与配置文件的下载


标签:node,dbms,enabled,ONgDB,connector,集群,ssh,测试,address
From: https://blog.51cto.com/u_13618048/5891690

相关文章

  • 安卓性能测试工具之SoloPi
    SoloPi.apk下载:链接:https://pan.baidu.com/s/1q6lbTv2cmTZ9BTaToWyT4g提取码:90hsadb下载:链接:https://pan.baidu.com/s/17pLXaQpS1LxPW462S2AdnQ提取码:nrge ......
  • 卸载K8S集群
    一、配置命令自动补全yuminstall-ybash-completionsource/usr/share/bash-completion/bash_completionsource<(kubectlcompletionbash)echo"source<(kubect......
  • 了解Oracle RAC Brain Split Resolution集群脑裂协议
    CSS工作原理在理解脑裂(BrainSplit)处理过程前,有必要介绍一下OracleRACCss(ClusterSynchronizationServices)的工作框架:OracleRACCSS提供2种后台服务包括群组管理(G......
  • Vulnhub之Phineas靶机详细测试过程
    Phineas识别目标主机IP地址┌──(kali㉿kali)-[~/Vulnhub/Phineas]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.60.0/16|ScreenView:Unique......
  • 性能测试TPS目标值确定-二八原则
    在性能测试中通常使用二八原则来量化业务需求。二八原则:指80%的业务量在20%的时间里完成。例:如某个公司1000个员工,在周五下午3点-5点有90%的员工登陆公司周报系统则:业务......
  • 集群部署看过来,低代码@AWS智能集群的架构与搭建方案
    为了帮助充分利用AWS的托管服务快速构建起一套集群环境,彻底去掉“单一故障点”,实现最高的可用性,我们准备了《低代码智能集群@AWS的架构与搭建方案》看完本文,带你掌握“基于......
  • 一款免费的.NET智能持续测试运行工具——Mighty-Moose
    ​​Mighty-Moose​​是一款面向.NET的持续构建和测试运行工具,现在它免费发放了。那么Mightly-Moose到底是干什么的呢?当你每次在VisualStudio中编辑文件后点击保存时,它会自......
  • A/B测试有哪些常见应用场景?——火山引擎DataTester科普
     更多技术交流、求职机会,欢迎关注字节跳动数据平台微信公众号,回复【1】进入官方交流群火山引擎DataTester不仅对外提供服务,也是字节跳动内部所应用的A/B实验......
  • Vulnhub之Odin 1靶机详细测试过程
    Odin1作者:jason_huawen目标主机基本信息名称:Odin:1地址:https://www.vulnhub.com/entry/odin-1,619/提示:add/etc/hosts->ipvm+odinexample:192.168.1.1o......
  • 使用NUnit做单元测试(总结版)
    使用NUnit做单元测试(总结版)一、本文摘要: ●什么单元测试 ●什么是NUnit ●NUnit的下载以及安装 ●NUnit的启动 ●NUnit的最简单使用 ●验证设计的功能是否实现 ......