Update: Wed Jan 6 22:33:21 CST 2021
lxdui 是一個圖形化界面,讓你方便管理 lxc/lxd 的開放原始碼界面。不過根據 git 上次變更時間是十個月前了XD 不過還是能用,畢竟很方便!
安裝 lxdui
sudo apt install -y git build-essential libssl-dev python3-venv python3-pip python3-dev zfsutils-linux bridge-utils
git clone https://github.com/AdaptiveScale/lxdui.git
pip3 install --upgrade pip
cd lxdui
sudo python3 setup.py install
sudo lxdui init
sudo lxdui start
執行 lxdui
sudo lxdui init
sudo lxdui start
登入 lxdui
http://127.0.0.1:15151
lxdui 設定(CLI Commands)
預設 port 為 15151,如要更改如下:
變更登入的 port
app/__metadata__.py:lxdui.port = 15151
Binary file app/__pycache__/__metadata__.cpython-36.pyc matches
build/lib/app/__metadata__.py:lxdui.port = 15151
Dockerfile:# docker run -it -p 15151:15151 -v /var/snap/lxd/common/lxd/unix.socket:/var/snap/lxd/common/lxd/unix.socket lxdui
Dockerfile:EXPOSE 15151
README.md:[http://127.0.0.1:15151](http://127.0.0.1:15151)
tests/test_conf.py: self.assertEqual(c, '15151')
lxdui 其他指令(CLI Commands)
直接照抄喔XD 因為沒有很難!
lxdui init -- configures lxdui upon first use - admin password, generate certs
lxdui start -- start the app and display the endpoint URL http://hostname:port
lxdui stop -- stop the app
lxdui restart -- restart the app
lxdui status -- show the pid and the http endpoint for the UI http://hostname:port
lxdui config show -- print out running config to console
lxdui config set -c <path_to_conf_file> -- use external conf file
lxdui config set <key> <value> -- set the value for a configuration key
lxdui cert add -- add existing certs from file path
lxdui cert create -- generate new SSL certs (overwrite old files)
lxdui cert list -- list SSL certs
lxdui cert delete -- remove SSL certs
lxdui user add -u <username> -p <password> -- create a new user that can access the UI
lxdui user update -u <username> -p <password> -- the user specified in lxdui.admin.user can't be deleted
lxdui user delete -u <username> -- remove a user from the auth file
lxdui user list -- list the users in the auth file