diff --git a/how-to/How-To-Setup-Nc-Env-In-Ubuntu-Desktop.md b/how-to/How-To-Setup-Nc-Env-In-Ubuntu-Desktop.md index 0db76b6..2474728 100644 --- a/how-to/How-To-Setup-Nc-Env-In-Ubuntu-Desktop.md +++ b/how-to/How-To-Setup-Nc-Env-In-Ubuntu-Desktop.md @@ -43,6 +43,13 @@ $ sudo apt install vim tree ``` +However, rysnc is needed, so install it: + +``` +$ sudo apt install rsync +``` + + ### LXD Installation Install LXD using snap: @@ -78,7 +85,7 @@ --- -:memo: Go thorugh this section only if you choose option 1 above. +:memo: Go through this section only if you choose option 1 above. --- @@ -104,7 +111,8 @@ ``` -$ wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg +$ wget -O /tmp/hashicorp-gpg https://apt.releases.hashicorp.com/gpg +$ sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg /tmp/hashicorp-gpg $ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list $ sudo apt update @@ -139,13 +147,6 @@ vagrant-lxd (0.6.0, global) ``` -As recommended in the vagrant-lxd documentation ([here](https://gitlab.com/catalyst-it/devtools/vagrant-lxd#synced-folders)), to ensure synced folders work as expected, run the following commands: - -``` -$ echo root:$(id -u):1 | sudo tee -a /etc/subuid -$ echo root:$(id -g):1 | sudo tee -a /etc/subgid -``` - ### Mkcert Installation Install mkcert, an utility that makes it easy to create locally trusted TLS certificates, from APT repositories @@ -172,18 +173,18 @@ --- -:memo: mkcert has browser detection logic, so if one is detected (Chrome, Firefox) the install command will let you know. If the browser is not detected for some reason (ex. Firefox installed via snap) the browser is not detected, you will need to manually import +:memo: mkcert has browser detection logic, so if one is detected (Chrome, Firefox) the install command will let you know. If the browser is not detected for some reason (ex. Firefox installed via snap), you will need to manually import the certificate in the browser. --- ### Nc-env Installation -Pick the latest release of the project from [here](https://codeberg.org/pmarini/nc-env/releases), in this example `v20230421`: +Pick the latest release of the project from [here](https://codeberg.org/pmarini/nc-env/releases), in this example `v20230420`: ``` -$ wget https://codeberg.org/pmarini/nc-env/archive/v20230421.tar.gz -$ tar -xzf v20230421.tar.gz +$ wget https://codeberg.org/pmarini/nc-env/archive/v20230420.tar.gz +$ tar -xzf v20230420.tar.gz $ cd nc-env/ ``` @@ -207,7 +208,7 @@ $ lxd init Would you like to use LXD clustering? (yes/no) [default=no]: no Do you want to configure a new storage pool? (yes/no) [default=yes]: yes -Name of the new storage pool [default=default]: pool01 +Name of the new storage pool [default=default]: lxdpool01 Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: zfs Create a new ZFS pool? (yes/no) [default=yes]: yes Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: yes @@ -230,11 +231,12 @@ Create a LXD profile for the containers created in nc-env: ``` -$ lxc profile create prf-nc-env -$ lxc profile device add prf-nc-env root disk path=/ pool=pool01 size=5GB -$ lxc profile device add prf-nc-env eth0 nic nictype=bridged name=eth0 parent=lxdbr0 -$ lxc profile set prf-nc-env limits.memory 1GiB -$ lxc profile set prf-nc-env limits.cpu 1 +$ lxc profile create nc-env-prf +$ lxc profile device add nc-env-prf root disk path=/ pool=lxdpool01 size=5GB +$ lxc profile device add nc-env-prf eth0 nic nictype=bridged name=eth0 parent=lxdbr0 +$ lxc profile set nc-env-prf boot.autostart false +$ lxc profile set nc-env-prf limits.memory 1GB +$ lxc profile set nc-env-prf limits.cpu 1 $ lxc profile list +----------------+---------------------+---------+ | NAME | DESCRIPTION | USED BY |