diff --git a/how-to/How-To-Setup-Nc-Env-In-Fedora-Workstation.md b/how-to/How-To-Setup-Nc-Env-In-Fedora-Workstation.md index c234b50..ff4350a 100644 --- a/how-to/How-To-Setup-Nc-Env-In-Fedora-Workstation.md +++ b/how-to/How-To-Setup-Nc-Env-In-Fedora-Workstation.md @@ -31,11 +31,6 @@ $ sudo dnf install vim ``` - -### Check the storage - -You should have a disk or unformatted partition, of 20GB or more, that we can use as LXD ZFS-based storage pool. If you don’t have any, you can use the directory storage backend and change your answers in section "LXD Configuration" below accordingly. - ### LXD Installation Install snap: @@ -68,6 +63,7 @@ --- +If you plan to use ZFS as backend for the LXD storage pools, you should have a disk or unformatted partition, of 20GB or more, for that. The ZFS installation instructions for Fedora can be found at [this link](https://openzfs.github.io/openzfs-docs/Getting%20Started/Fedora/index.html). @@ -95,7 +91,7 @@ Install the vagrant package: ``` -$ sudo apt install vagrant +$ sudo dnf install vagrant ``` @@ -107,7 +103,7 @@ ``` -### Vagrant LXD plugin Installation +### Vagrant-lxd plugin Installation Vagrant plugins are installed by using the `plugin` switch, so let's install the `vagrant-lxd` plugin by issuing the following command: @@ -126,6 +122,11 @@ Fetching hyperkit-1.3.0.gem Fetching vagrant-lxd-0.5.6.gem Installed the plugin 'vagrant-lxd (0.5.6)'! +``` + +Verify that it has been correctly installed: + +``` $ vagrant plugin list vagrant-lxd (0.5.6, global) ``` @@ -137,7 +138,53 @@ $ echo root:$(id -g):1 | sudo tee -a /etc/subgid ``` -### nc-env Installation +### Mkcert Installation + +Download from [the official repository](https://github.com/FiloSottile/mkcert/releases) the latest released binary of mkcert, an utility that makes it easy to create locally trusted TLS certificates: + +``` +$ pwd +/home/fedora_usr/Documents/nc-env/ +$ mkdir my-local-env +$ cd my-local-env +$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 +``` + +Install a needed dependency for mkcert: + +``` +$ sudo dnf install nss-tools +``` + +Rename the mkcert binary by stripping the version: + +``` +$ mv mkcert-v1.4.4-linux-amd64 mkcert +``` + + +Make it executable: + +``` +$ chmod +x mkcert +``` + +Run the install command + +``` +$ ./mkcert -install +The local CA is already installed in the system trust store! 👍 +The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊 +``` + +Check the local CAROOT folder by issuing the following command. We will need to make the files in that folder available to the containers as well: + +``` +$ ./mkcert -CAROOT +``` + + +### Nc-env Installation Pick the latest release of the project from [here](https://codeberg.org/pmarini/nc-env/releases), in this example `v20220421`: 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 dabec88..baf8f0b 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 @@ -2,7 +2,7 @@ ## Introduction -This document describes the step-by-step procedure for the initial setup of nc-env in an Ubuntu Destkop 20.04 system. +This document describes the step-by-step procedure for the initial setup of nc-env in an Ubuntu Destkop system. Check the [project homepage](https://codeberg.org/pmarini/nc-env) to know more about nc-env. @@ -37,11 +37,6 @@ $ sudo apt install vim tree ``` - -### Check the storage - -You should have a disk or unformatted partition, of 20GB or more, that we can use as LXD ZFS-based storage pool. If you don’t have any, you can use the directory storage backend and change your answers in section "LXD Configuration" below accordingly. - ### LXD Installation Install LXD using snap: @@ -62,6 +57,14 @@ ### ZFS Utilities Installation +--- + +:memo: While it is recommeded to use ZFS as backend for the LXD storage pools for this project, you can skip this section if you plan to use directory-based LXD storage pools. + +--- + +If you plan to use ZFS as backend for the LXD storage pools, you should have a disk or unformatted partition, of 20GB or more, for that. + Install the ZFS package: ``` @@ -108,7 +111,7 @@ ``` -### Vagrant LXD plugin Installation +### Vagrant-lxd plugin Installation Vagrant plugins are installed by using the `plugin` switch, so let's install the `vagrant-lxd` plugin by issuing the following command: @@ -127,18 +130,74 @@ Fetching hyperkit-1.3.0.gem Fetching vagrant-lxd-0.5.6.gem Installed the plugin 'vagrant-lxd (0.5.6)'! +``` + +Verify that it has been correctly installed: + +``` $ vagrant plugin list vagrant-lxd (0.5.6, global) ``` -### nc-env Installation +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 + +Download from [the official repository](https://github.com/FiloSottile/mkcert/releases) the latest released binary of mkcert, an utility that makes it easy to create locally trusted TLS certificates: + +``` +$ pwd +/home/fedora_usr/Documents/nc-env/ +$ mkdir my-local-env +$ cd my-local-env +$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 +``` + +Install a needed dependency for mkcert: + +``` +$ sudo dnf install nss-tools +``` + +Rename the mkcert binary by stripping the version: + +``` +$ mv mkcert-v1.4.4-linux-amd64 mkcert +``` + + +Make it executable: + +``` +$ chmod +x mkcert +``` + +Run the install command + +``` +$ ./mkcert -install +The local CA is already installed in the system trust store! 👍 +The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊 +``` + +Check the local CAROOT folder by issuing the following command. We will need to make the files in that folder available to the containers as well: + +``` +$ ./mkcert -CAROOT +``` + +### Nc-env Installation Pick the latest release of the project from [here](https://codeberg.org/pmarini/nc-env/releases), in this example `v20220421`: ``` $ wget https://codeberg.org/pmarini/nc-env/archive/v20220421.tar.gz -$ gzip -d v20220421.tar.gz -$ tar -xf v20220421.tar +$ tar -xzf v20220421.tar $ cd nc-env/ ``` @@ -279,7 +338,7 @@ +--------+----------+---------+---------------+------+-------------+---------+---------+ ``` -Let' start a sample container: +Let's start a sample container: ``` $ lxc launch ubuntu:20.04 c1 @@ -314,7 +373,7 @@ Architecture: x86-64 ``` -Check the ZFS storage pool, using the `zpool` utility: +Leave the container and check the ZFS storage pool, using the `zpool` utility: ``` @@ -330,8 +389,6 @@ $ lxc delete -f c1 ``` - - ## Containers Creation with nc-env Create the first container with nc-env. As a first container let’s choose the Nextcloud Standalone container, that is `template01-nextcloud-standalone`: @@ -403,7 +460,7 @@ --- -:memo: You can safely ignore the warning: `==> default: The host machine does not support LXD synced folders.` +:memo: If it shows up, you can safely ignore the warning: `==> default: The host machine does not support LXD synced folders.` --- diff --git a/how-to/How-To-Setup-Nc-Env-in-Debian-Bullseye.md b/how-to/How-To-Setup-Nc-Env-in-Debian-Bullseye.md index 1303f51..f331ed9 100644 --- a/how-to/How-To-Setup-Nc-Env-in-Debian-Bullseye.md +++ b/how-to/How-To-Setup-Nc-Env-in-Debian-Bullseye.md @@ -33,11 +33,6 @@ $ sudo apt install vim tree ``` -### Check the storage - -You should have a disk or unformatted partition, of 20GB or more, that we can use as LXD ZFS-based storage pool. If you don’t have any, you can use the directory storage backend and change your answers in section "LXD Configuration" below accordingly. - - ### LXD Installation LXD will be installed as a snap, and snap is not pre-installed in the system. So let's install snap first, then install the required snap `core`. @@ -73,11 +68,18 @@ --- - :memo: You can find more extensive ZFS setup instructions [here](https://linuxhint.com/install-zfs-debian/). --- +--- + +:memo: While it is recommeded to use ZFS as backend for the LXD storage pools for this project, you can skip this section if you plan to use directory-based LXD storage pools. + +--- + +If you plan to use ZFS as backend for the LXD storage pools, you should have a disk or unformatted partition, of 20GB or more, for that. + Add the repository where the ZFS packages live: ``` @@ -136,7 +138,7 @@ Vagrant 2.2.19 ``` -### Vagrant LXD plugin Installation +### Vagrant-lxd plugin Installation Vagrant plugins are installed by using the `plugin` switch, so let's install the `vagrant-lxd` plugin by issuing the following command: @@ -157,24 +159,75 @@ Installed the plugin 'vagrant-lxd (0.5.6)'! ``` -Verify the successful installation of the package with the following command: +Verify that it has been correctly installed: ``` $ vagrant plugin list vagrant-lxd (0.5.6, global) ``` -### nc-env Installation +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 + +Download from [the official repository](https://github.com/FiloSottile/mkcert/releases) the latest released binary of mkcert, an utility that makes it easy to create locally trusted TLS certificates: + +``` +$ pwd +/home/fedora_usr/Documents/nc-env/ +$ mkdir my-local-env +$ cd my-local-env +$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 +``` + +Install a needed dependency for mkcert: + +``` +$ sudo dnf install nss-tools +``` + +Rename the mkcert binary by stripping the version: + +``` +$ mv mkcert-v1.4.4-linux-amd64 mkcert +``` + + +Make it executable: + +``` +$ chmod +x mkcert +``` + +Run the install command + +``` +$ ./mkcert -install +The local CA is already installed in the system trust store! 👍 +The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊 +``` + +Check the local CAROOT folder by issuing the following command. We will need to make the files in that folder available to the containers as well: + +``` +$ ./mkcert -CAROOT +``` + +### Nc-env Installation Pick the latest release of the project from [here](https://codeberg.org/pmarini/nc-env/releases), in this example `v20220421`: ``` $ wget https://codeberg.org/pmarini/nc-env/archive/v20220421.tar.gz -$ gzip -d v20220421.tar.gz -$ tar -xf v20220421.tar +$ tar -xzf v20220421.tar $ cd nc-env/ ``` ### Next steps -Please refer to section "LXD Configuration" in guide How-To-Setup-Nc-Env-In-Ubuntu-Desktop-20.04 for the following steps +Please refer to section "LXD Configuration" in guide How-To-Setup-Nc-Env-In-Ubuntu-Desktop.md for the following steps.