Merge branch 'uw-master-patch-86823' into 'master'
Add Windows (WSL2) instructions See merge request csc/syscom-dev-environment!1
This commit is contained in:
commit
d9adff3925
20
README.md
20
README.md
|
@ -4,6 +4,15 @@ development environment which is reasonably close to the services which
|
|||
run on the CSC servers. The idea is to encourage experimentation without
|
||||
breaking the real services and causing outages.
|
||||
|
||||
## For Windows Users
|
||||
Setup WSL2 and open a terminal to it. See the [official setup instructions](https://docs.microsoft.com/en-ca/windows/wsl/install-win10#manual-installation-steps). Make sure you use Ubuntu/Ubuntu Latest from the Windows Store.
|
||||
|
||||
Once setup is complete, run the following command to update everything:
|
||||
```
|
||||
sudo apt update && sudo apt full-upgrade -y --auto-remove --fix-broken --fix-missing --fix-policy --show-progress && sudo apt autoclean
|
||||
```
|
||||
You can skip the Prerequisites section.
|
||||
|
||||
## Prerequisites
|
||||
This repo consists of several Ansible playbooks which will automate tasks
|
||||
in LXC containers. I strongly recommend creating a VM and running the
|
||||
|
@ -46,9 +55,11 @@ 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:
|
||||
```
|
||||
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,
|
||||
|
@ -58,9 +69,10 @@ lxc-create -t download -n dns -- -d debian -r buster -a amd64
|
|||
lxc-start dns
|
||||
lxc-attach dns
|
||||
apt update
|
||||
apt install python3
|
||||
exit
|
||||
apt install -y python3
|
||||
```
|
||||
You can now press Ctrl+D to exit the LXC shell.
|
||||
|
||||
The containers should be privileged since the CSC currently uses privileged
|
||||
LXC containers. If we switch to unprivileged containers in the future, this
|
||||
repo should be correspondingly updated.
|
||||
|
@ -68,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:
|
||||
```
|
||||
apt install ansible python3-lxc
|
||||
apt install -y ansible python3-lxc
|
||||
```
|
||||
Now we are ready to run the playbook:
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue