前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >技术分享 | orchetrator--安装一个高可用 orchestrator

技术分享 | orchetrator--安装一个高可用 orchestrator

原创
作者头像
爱可生开源社区
修改2022-09-07 16:34:06
4410
修改2022-09-07 16:34:06
举报
文章被收录于专栏:爱可生开源社区

作者:姚嵩

地球人,爱好音乐,动漫,电影,游戏,人文,美食,旅游,还有其他。虽然都很菜,但毕竟是爱好。

本文来源:原创投稿

*爱可生开源社区出品,原创内容未经授权不得随意使用,转载请联系小编并注明来源。


参考:

https://github.com/openark/orchestrator/blob/master/docs/install.md

https://github.com/openark/orchestrator/blob/master/docs/raft-vs-sync-repl.md

https://github.com/github/orchestrator/blob/master/docs/configuration-raft.md

https://github.com/openark/orchestrator/blob/master/docs/high-availability.md

版本:

https://github.com/openark/orchestrator/releases

环境说明:

orchestrator主机环境

10.186.65.5

10.186.65.11

10.186.65.26

orchestrator 后端数据库链接(MySQL 数据库)

10.186.65.29:3307

安装步骤:

# 下载指定版本orchestrator(此处以3.2.6为例)

yum -y install wget jq

dir_software="/opt/software/"

mkdir -p ${dir_software}

cd ${dir_software}

wget -c https://github.com/openark/orchestrator/releases/download/v3.2.6/orchestrator-3.2.6-linux-amd64.tar.gz

# 安装

dir_software="/opt/software/"

cd /

tar -zxvf /${dir_software}/orchestrator-3.2.6-linux-amd64.tar.gz

# (后端数据库)设置后端数据库账号

-- 创建orchestrator的元数据存储schema

CREATE DATABASE IF NOT EXISTS orchestrator;

-- 创建数据库账号,以便orchestrator连接后端数据库

CREATE USER 'orchestrator'@'10.186.65.5' IDENTIFIED BY 'Orch@123';

GRANT ALL PRIVILEGES ON orchestrator.* TO 'orchestrator'@'10.186.65.5';

CREATE USER 'orchestrator'@'10.186.65.11' IDENTIFIED BY 'Orch@123';

GRANT ALL PRIVILEGES ON orchestrator.* TO 'orchestrator'@'10.186.65.11';

CREATE USER 'orchestrator'@'10.186.65.26' IDENTIFIED BY 'Orch@123';

GRANT ALL PRIVILEGES ON orchestrator.* TO 'orchestrator'@'10.186.65.26';

# 设置配置⽂件

(orchestrator节点都需要配置,此处以10.186.65.26节点为例)

cp /usr/local/orchestrator/orchestrator-sample.conf.json /etc/orchestrator.conf.json

vi /etc/orchestrator.conf.json

代码语言:javascript
复制
"MySQLOrchestratorHost": "10.186.65.29",                // 后端数据库连接ip
"MySQLOrchestratorPort": 3307, // 后端数据库端⼝
"MySQLOrchestratorDatabase": "orchestrator", // 后端数据库使⽤的schema
"MySQLOrchestratorUser": "orchestrator", // 后端数据库连接账户
"MySQLOrchestratorPassword": "Orch@123", // 后端数据库连接密码
.........
"MySQLTopologyUser": "orchestrator", // 接管的MySQL需要创建的账户,运维数据库使⽤
"MySQLTopologyPassword": "orch_topology_password", // 接管的MySQL创建账户的密码,运维数据库使⽤
.........
"MySQLOrchestratorUseMutualTLS": false,
........
"HostnameResolveMethod": "none",
"MySQLHostnameResolveMethod": "@@report_host", // 确保接管的数据库都配置了report_host
........
"RaftEnabled": true, // 是否开启raft,使⽤orch⾼可⽤时需要开启
"BackendDB": "mysql", // 后端连接的数据库类型
"RaftBind": "10.186.65.26", // raft的bind地址,写本机的ip
"RaftDataDir": "/usr/local/orchestrator", // raft的数据⽬录
"DefaultRaftPort": 10008, // raft使⽤的端⼝
"RaftNodes": [ // raft的节点,即3个orch的主机
  "10.186.65.5",
  "10.186.65.11",
  "10.186.65.26"
]
说明:设置配置⽂件记得去掉配置⽂件中的注释;

# 启动

cd /usr/local/orchestrator

nohup ./orchestrator -config /etc/orchestrator.conf.json http &

# 配置环境变量

vi /etc/profile

代码语言:javascript
复制
export PATH=$PATH:/usr/local/orchestrator/:/usr/local/orchestrator/resources/bin/

export PATH=$PATH:/usr/local/orchestrator/:/usr/local/orchestrator/resources/bin/

# 界⾯访问:

http://10.186.65.5:3000

http://10.186.65.11:3000

http://10.186.65.26:3000

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 参考:
  • 版本:
  • 环境说明:
  • 安装步骤:
    • 说明:设置配置⽂件记得去掉配置⽂件中的注释;
    相关产品与服务
    云数据库 SQL Server
    腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档