关于高可用:技术分享-orchetrator安装一个高可用-orchestrator

104次阅读

共计 2504 个字符,预计需要花费 7 分钟才能阅读完成。

作者:姚嵩

地球人,爱好音乐,动漫,电影,游戏,人文,美食,游览,还有其余。尽管都很菜,但毕竟是喜好。

本文起源:原创投稿

* 爱可生开源社区出品,原创内容未经受权不得随便应用,转载请分割小编并注明起源。


参考:

https://github.com/openark/or…

https://github.com/openark/or…

https://github.com/github/orc…

https://github.com/openark/or…

版本:

https://github.com/openark/or…

环境阐明:

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/or…

# 装置

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

"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

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

正文完
 0