sudo -issh-keygenand add~/.ssh/id_rsa.pubto Deploy Key on Gitlab.- Make sure this repository is in /opt/ustclug/mirrors-main/ on the server.
- Run ./deploy.sh to deploy.
- Make changes on your own machine
- Commit and push it to gitlab
- Login to mirrors-main and
sudo -i cd /opt/ustclug/mirrors-maingit pull./deploy.sh- Make sure that all services are OK. If not, check your changes and fix it!
Except for emergent cases, changes should be made on your own machine, pushed to gitlab and pulled to the server.
If you are not sure of your changes, please test it on your own machine before committing.
lxc-list
In host machine:
lxc-console -n <container-name>
To detach from LXC console, type Ctrl+A Q
If the LXC is created with our script, it should be able to login with root without password.
./start-lxc.sh <container-name>
Please always use start-lxc.sh to start containers. If you wish to do something else, write it in the script.
lxc-stop -n <container-name>
Most changes to LXC config file require restarting (stop, then start) LXC to take effect.
./create-lxc.sh <container-name> <root-partition-size>
Please following the instructions on the screen.
After installation, the script will fix config file, fstab and tty files, and clear root password.
Manually create LXC:
lxc-create -n <container-name> -t debian -B lvm --lvname <logical-volume-name> --vgname vg-xvda2-730g --fstype ext4 --fssize <root-partition-size>
lxc-destroy -n <container-name>
WARNING: Destroy is permanent and not recoverable.