当前位置:网站首页>Figure data platform solution: cluster deployment

Figure data platform solution: cluster deployment

2022-06-22 02:51:00 Ma Chao's blog


Here’s the table of contents:

Figure data platform solution : Cluster deployment

     This paper mainly introduces ONgDB Cause and effect cluster deployment mode . It should be noted that , This article only introduces the most basic configuration for running the cluster , Other advanced configurations will be introduced later in the blog .

One 、 Design cluster node roles

     The design cluster is a three node causal cluster deployment , among CentOS-1、CentOS-2 Designed as CORE role ,CORE Role nodes can support read / write requests ;CentOS-3 Designed as REPLICA role ,REPLICA The role only supports read requests .

CentOS-1:CORE [ Reading and writing ]
CentOS-2:CORE [ Reading and writing ]
CentOS-1:REPLICA [ Read ]

Two 、 Prepare deployment files

     Upload the prepared deployment file to CentOS Anywhere in the system , And execute the following command to extract , Please perform this operation on three machines respectively . For the preparation of deployment files, please refer to : Figure data platform solution : Single node deployment .

tar -zxvf ongdb-enterprise-1.0.2-unix.tar.gz

ONgDB Deployment file preparation

3、 ... and 、 close CentOS A firewall

     In order to ensure network interaction between clusters , Please close the firewall on three machines .

#  Turn off firewall 
systemctl stop firewalld.service
#  Turn off firewall and start automatically 
systemctl disable firewalld.service
#  View firewall service status 
systemctl status firewalld.service

3、 ... and 、 Modify the host name and hosts

     Switch to root Modify host name and /etc/hosts To configure .

  1. modify CentOS-1 The host name
hostnamectl set-hostname core-1
  1. modify CentOS-2 The host name
hostnamectl set-hostname core-2
  1. modify CentOS-3 The host name
hostnamectl set-hostname replica-1

 Modify hostname
4. modify CentOS-1 and CentOS-2 Of hosts To configure

192.168.101.128	core-1
192.168.101.129	core-2

 modify hosts
5. modify CentOS-3 Of hosts To configure

192.168.101.128	core-1
192.168.101.129	core-2
192.168.101.130	replica-1

Four 、 modify ONgDB The configuration file

    ONgDB The configuration file is located in... Of the installation directory conf Under the folder , The file named ongdb.conf. In addition to the configuration mentioned below , Other configurations may not be modified , Just use the default .

  1. All three machines cancel the comment of this configuration
# With default configuration ONgDB only accepts local connections.
# To accept non-local connections, uncomment this line:
dbms.connectors.default_listen_address=0.0.0.0
  1. Configure host name
# CentOS-1
dbms.connectors.default_advertised_address=core-1
# CentOS-2
dbms.connectors.default_advertised_address=core-1
# CentOS-3
dbms.connectors.default_advertised_address=replica-1
  1. To configure CORE node
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=core-1:5000,core-2:5000
  1. To configure REPLICA node
dbms.mode=READ_REPLICA
causal_clustering.initial_discovery_members=core-1:5000,core-2:5000

5、 ... and 、 Start cluster

     Execute the database service startup command on the three machines .

bin/ongdb start

 Start the service

     After the database service is started successfully , It can be accessed on the browser side . Here I created some sample data after visiting . Click the position of the five pointed star in the browser , You can create some sample data to test .

 Cluster started successfully

原网站

版权声明
本文为[Ma Chao's blog]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220250113644.html