Change sudo to a single `sudo -s`

This commit is contained in:
Raymond Li 2021-05-09 23:51:01 -04:00
parent 313734817b
commit b48ff34218
1 changed files with 7 additions and 5 deletions

View File

@ -55,17 +55,19 @@ Once you have restarted the VM, take note of its IP address on lxcbr0,
and write it to the variable `host_ipv4_addr` in the `hosts` file.
## Creating the LXC containers
Start a root shell with `sudo -s`.
Install the lxc-utils package if you have not done so already:
```
sudo apt update && sudo apt install lxc-utils
apt update && apt install lxc-utils
```
For the time being, it is necessary to manually create each container and to
install python3 in it before running the corresponding playbooks. For example,
to setup the DNS container:
```
sudo lxc-create -t download -n dns -- -d debian -r buster -a amd64
sudo lxc-start dns
sudo lxc-attach dns
lxc-create -t download -n dns -- -d debian -r buster -a amd64
lxc-start dns
lxc-attach dns
apt update && apt full-upgrade -y --auto-remove --fix-broken --fix-missing --fix-policy --show-progress && apt autoclean
apt install -y python3
```
@ -78,7 +80,7 @@ repo should be correspondingly updated.
It is also necessary to have Ansible and the Python LXC driver installed
on the host where the LXC containers are running. e.g. for Debian:
```
sudo apt install -y ansible python3-lxc
apt install -y ansible python3-lxc
```
Now we are ready to run the playbook:
```