作者:姚嵩
地球人,爱好音乐,动漫,电影,游戏,人文,美食,旅游,还有其他。虽然都很菜,但毕竟是爱好。
本文来源:原创投稿
*爱可生开源社区出品,原创内容未经授权不得随意使用,转载请联系小编并注明来源。
参考:
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/
# 界⾯访问: