使用cesi管理Supervisor中的进程

github地址:https://github.com/gamegos/cesi

1.安装python34环境

1
2
sudo yum install -y git epel-release
sudo yum install -y python34 python34-pip

2.部署cesi

2.1 部署cesi

1
2
3
4
5
6
7
8
9
10
export CESI_SETUP_PATH=/work/admin/cesi
mkdir ${CESI_SETUP_PATH}
cd ${CESI_SETUP_PATH}
wget https://github.com/gamegos/cesi/releases/download/v2.6.3/cesi-extended.tar.gz -O cesi.tar.gz
tar -xvf cesi.tar.gz
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
deactivate
sudo cp ${CESI_SETUP_PATH}/defaults/cesi.service

2.2 配置示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#haifly-bj-es群集
[[nodes]]
name = "haifly-bj-es1"
environment = "haifly-bj-es"
username = "supervisor"
password = "111111111111"
host = "192.168.7.206"
port = "9001"

[[nodes]]
name = "haifly-bj-es2"
environment = "haifly-bj-es"
username = "supervisor"
password = "111111111111"
host = "192.168.6.217"
port = "9001"

#--------------------------------------------------------
[cesi]
database = "sqlite:///users.db" # Relative path
activity_log = "activity.log" # File path for CeSI logs
admin_username = "admin" # Username of admin user
admin_password = "***********" # Password of admin user

2.3 开机启动

1
2
3
4
5
/etc/systemd/system/cesi.service   //到这一步修改启动文件里的配置路径
cp ${CESI_SETUP_PATH}/defaults/cesi.conf.toml /work/admin/cesi/cesi.conf

sudo systemctl start cesi
sudo systemctl daemon-reload

3.cesi界面

-------------本文结束感谢您的阅读-------------