zettadb / cloudnative

Apache License 2.0
0 stars 1 forks source link

Modify one-key installation script to support rbr mode #98

Closed jd-zhang closed 2 years ago

jd-zhang commented 2 years ago

Issue migrated from trac ticket # 434 www.kunlunbase.com

component: cluster provision | priority: major | resolution: fixed

2022-02-15 10:03:44: zhangjindong@zettadb.com created the issue


Currently, the one-key installation script only supports ha_mode of no_rep and mgr

jd-zhang commented 2 years ago

2022-02-18 10:19:01: zhangjindong@zettadb.com commented


It is finished, including the following changes:

  • one-key installation script, Version using release binaries.
  • Version of docker images, including all-in-one and node-seperate images.
  • one-key installation script, Version for docker.
  • one-key installation script, Version for kubernetes.
jd-zhang commented 2 years ago

2022-02-21 09:53:12: zhangjindong@zettadb.com commented


Whether to support rbr in open source code is still a question, so this rbr support is not ported to cloudnative repo currently. Later, if we decide to port rbr code to open-source code, this script change will also be ported there.

We will close this currently.

jd-zhang commented 2 years ago

2022-02-21 09:54:23: zhangjindong@zettadb.com set resolution to fixed

jd-zhang commented 2 years ago

2022-02-21 09:54:23: zhangjindong@zettadb.com changed status from assigned to closed

jd-zhang commented 2 years ago

2022-03-02 15:45:49: zhangjindong@zettadb.com

jd-zhang commented 2 years ago

2022-03-02 15:45:49: zhangjindong@zettadb.com commented


To support using a meta group for multi-clusters, we add the following table in meta_inuse.sql:

DROP TABLE IF EXISTS `global_configuration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `global_configuration` (
  `name` varchar(128) NOT NULL,
  `value` varchar(128) ,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

This can also be used for storing other global configurations.

Also, when bootstrap, we add the following line to set meta's ha_mode:

meta_cursor.execute("insert into global_configuration(name, value) values(%s, %s)", ("meta_ha_mode", args.ha_mode))

After this, in kunlun_metadata_db.global_configuration, the content is like:

instance_name 07:38:26>select * from global_configuration;
+---------+--------+
| name    | value  |
+---------+--------+
| meta_ha_mode| no_rep |
+---------+--------+
1 row in set (0.00 sec)