在宿主机上安装
介绍 SmartGate 在 CentOS、Debian 等 Linux 系统上的部署流程
下载安装包
登录 Bonree ONE 平台,在 部署配置 > 安装部署 > SmartGate 页面,下载最新的 SmartGate Linux 对应架构安装包。
执行安装/更新
根据 WEB 界面的步骤描述,下载安装 SmartGate 。
安装脚本执行完,程序会自动启动运行。
指定参数安装
# -a, --account 账号GUID
# -u, --url controller地址
# --set-network-zone 网络区域 默认: default
# --set-cluster-name 集群名称 默认为空
sudo bash Bonree-SmartGate-xxx.sh config -a xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -u "https://xxx.xxx.com" --set-network-zone beijing01 --set-cluster-name cluster-1
启动、停止、重启命令
# 启动
systemctl start smartgate
# 停止
systemctl stop smartgate
# 重启
systemctl restart smartgate
程序目录结构
默认安装路径 /opt/bonree/smartgate
root@debian9:/opt/bonree/smartgate# tree
.
├── bin # 可执行文件目录
│ ├── smartgatewatchdog
│ ├── smartgate
│ └── autoupdate
├── cache # 缓存目录
├── conf # 配置文件目录
│ ├── autoupdate.yml # 自动更新配置
│ └── smartgate.yml # 程序配置
├── downloads # 下载目录
├── logs # 日志文件目录
│ ├── install
│ │ └── install.log # 安装日志
│ ├── collector.log # 中间件指标采集器日志
│ ├── autoupdate.log # 自动更新日志
│ ├── smartgate.log # 主程序日志
│ └── kubernetes.log # k8s集群监控日志
├── README.md # 使用文档
├── scripts # 脚本目录
│ ├── smartgate.sh # 控制脚本
│ └── uninstall.sh # 卸载脚本
└── version.txt # 版本信息文件
注意
运行时会生成 /var/lib/bonree 文件夹,请不要随意删除。
卸载程序
执行卸载脚本,卸载过程会自动停止SmartGate运行。
# 卸载
sudo bash /opt/bonree/smartgate/scripts/uninstall.sh