一、supervisor 配置
说明:如果只是使用 supervisor 自带的 web,仅如下配置就可以
vim /etc/supervisor/supervisord.conf
[inet_http_server] ; inet (TCP) server disabled by default
port=192.168.5.149:9001 ; ip_address:port specifier, *:port for all iface
username=user ; default is no username (open server)
password=123 ; default is no password (open server)
二、cesi 地址
GitHub 地址: https://github.com/Gamegos/cesi
三、centos7 下面的安装和配置
cd /usr/local
mkdir cesi
cd cesi/
wget https://github.com/gamegos/cesi/releases/download/v2.6.8/cesi-extended.tar.gz -O cesi.tar.gz
tar -xvf cesi.tar.gz
workon testdemo # 进入 python 的虚拟环境
pip install -r requirements.txt
npm install -g n # 升级 node 到最新版本 ,前提 yum -y install npm bzip2
n latest
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum -y install yarn
cd ./cesi/ui/
yarn install
yarn build
cd -
cp ./defaults/cesi.conf.toml /etc/cesi.conf.toml # cesi 的配置文件
cp ./defaults/cesi.service /lib/systemd/system/cesi.service # cesi 服务
vim /lib/systemd/system/cesi.service
systemctl daemon-reload
systemctl start cesi.service
/lib/systemd/system/cesi.service
[Unit]
Description=cesi
[Service]
Environment=
ExecStart=/data/virtualenvs/testdemo/bin/python /usr/local/cesi/cesi/run.py --config-file /etc/cesi.conf.toml
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=TERM
User=root
WorkingDirectory=/usr/local/cesi
Restart=on-failure
[Install]
WantedBy=multi-user.target
四、cesi 配置
nodes 中填写的 信息要跟 supervisor 中配置填写的信息保持一致
vim /etc/cesi.conf.toml
[[nodes]]
name = "111111111111111111111111"
environment = ""
username = "user"
password = "123"
host = "192.168.5.149"
port = "9001"