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 f78c689..e3dcc26 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 @@ -18,9 +18,9 @@ | Component |Version | |----------------|----------------------------------| |Operating System|Ubuntu 22.04 LTS (Jammy Jellyfish)| -|LXD |5.1 | -|vagrant |2.2.19 | -|vagrant-lxd |0.5.6 | +|LXD |5.10 | +|vagrant |2.3.4 | +|vagrant-lxd |0.6.0 | ## Procedure @@ -50,8 +50,8 @@ ``` $ snap list lxd -Name Version Rev Tracking Publisher Notes -lxd 5.0.0-b0287c1 22923 latest/stable canonical✓ - +Name Version Rev Tracking Publisher Notes +lxd 5.10-b392610 24323 latest/stable canonical✓ - ``` @@ -75,27 +75,21 @@ ``` $ sudo zpool --version -zfs-0.8.3-1ubuntu12.13 -zfs-kmod-2.0.6-1ubuntu2.1 +zfs-2.1.4-0ubuntu0.1 +zfs-kmod-2.1.4-0ubuntu0.1 ``` ### Vagrant Installation -Install the curl package: +From the official [installation documentation page](https://developer.hashicorp.com/vagrant/downloads): + ``` -$ sudo apt install curl -``` - -Get the signing key and the Vagrant official repository address in the local APT sources: - -``` -$ sudo curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - -OK -$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" +$ wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.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 -``` +``` Install the vagrant package: ``` @@ -107,7 +101,7 @@ ``` $ vagrant --version -Vagrant 2.2.19 +Vagrant 2.3.4 ``` @@ -136,7 +130,7 @@ ``` $ vagrant plugin list -vagrant-lxd (0.5.6, global) +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: @@ -148,28 +142,16 @@ ### 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: +Install mkcert, an utility that makes it easy to create locally trusted TLS certificates, from APT repositories ``` -$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -``` - -Rename the mkcert binary by stripping the version: - -``` -$ mv mkcert-v1.4.4-linux-amd64 mkcert -``` - -Make it executable: - -``` -$ chmod +x mkcert +$ sudo apt install mkcert ``` Run the install command ``` -$ ./mkcert -install +$ mkcert -install Created a new local CA 💥 The local CA is now installed in the system trust store! ⚡️ ``` @@ -177,9 +159,11 @@ 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 +$ mkcert -CAROOT ``` +It should be under `${HOME}/.local/share/mkcert` + ### 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/templates/template01-nextcloud-standalone/artifacts/crontab-www-data b/templates/template01-nextcloud-standalone/artifacts/crontab-www-data new file mode 100644 index 0000000..0666fa0 --- /dev/null +++ b/templates/template01-nextcloud-standalone/artifacts/crontab-www-data @@ -0,0 +1 @@ +*/5 * * * * php -f /var/www/nextcloud/cron.php diff --git a/templates/template01-nextcloud-standalone/provision.sh b/templates/template01-nextcloud-standalone/provision.sh index 525ec80..7f03409 100644 --- a/templates/template01-nextcloud-standalone/provision.sh +++ b/templates/template01-nextcloud-standalone/provision.sh @@ -250,12 +250,22 @@ occ config:system:set filelocking.enabled --value 'true' +occ config:app:set backgroundjob backgroundjobs_name --value="cron" + +occ app:disable recommendations + +occ config:app:set text workspace_available --value=0 + echo "END - Tweaking some Nextcloud settings" systemctl restart apache2 systemctl status apache2 +## Install crontab for www-data for Nextcloud Background jobs +crontab -u www-data /vagrant/artifacts/crontab-www-data + + ## Adding system user to www-data group (to ease command line operations) adduser ${NEXTCLOUD_USER} www-data diff --git a/templates/template02-collabora-online/provision.sh b/templates/template02-collabora-online/provision.sh index d168f34..dd8fb49 100644 --- a/templates/template02-collabora-online/provision.sh +++ b/templates/template02-collabora-online/provision.sh @@ -74,7 +74,7 @@ if [ "${CUSTOMER_HASH}" == "" ]; then apt install -y coolwsd code-brand else - apt install -y coolwsd collabora-online-brand + apt install -y coolwsd collabora-online-brand nextcloud-office-brand fi export CAROOT=/vagrant/artifacts/ diff --git a/templates/template05-elasticsearch/Readme.md b/templates/template05-elasticsearch/Readme.md index 8bd721a..0a8f372 100644 --- a/templates/template05-elasticsearch/Readme.md +++ b/templates/template05-elasticsearch/Readme.md @@ -1,22 +1,24 @@ ### ElasticSearch server +| :zap: As of December 2022, Nextcloud FullTextSearch requires ElasticSearch 7, it's not compatible with ElasticSearch 8| +|----------------------------------------------------------------------------------------------------| + + + #### Setup * Assuming that the copy of the template is called `elasticsearch-instance`, move to folder `elasticsearch-instance`. * Check the content of folder `artifacts` -| :zap: As of June 2022, Nextcloud FullTextSearch requires ElasticSearch 7, it's not compatible with ElasticSearch 8| -|----------------------------------------------------------------------------------------------------| - - |File name | Description| | --- | --- | -| `elasticsearch-${ELASTICSEARCH_VERSION}-amd64.deb` | The Debian DEB archive can be downloaded from [here](https://www.elastic.co/downloads/past-releases#elasticsearch) | +| `elasticsearch-${ELASTICSEARCH_VERSION}-amd64.deb` | Debian archive for version 7.17.X to be downloaded from [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/deb.html#install-deb) | | `memory.options` | Limit the total memory assigned to the JVM | | `elasticsearch.yml` | ElasticSearch core configuration file | * Create folder `log` -* Open `Vagrantfile` and change the value of variable `lxd.name`. It makes sense to give the same name as the folder, in this example `elasticsearch-instance`. Also as Elastic Search is resource-intensive you may want to create a dedicated LXD profile and assign the container to that profile (property `lxd.profiles`) +* Open `Vagrantfile` and change the value of variable `lxd.name`. It makes sense to give the same name as the folder, in this example `elasticsearch-instance`. Also as Elastic Search is resource-intensive you may want to create a dedicated LXD profile and +assign the container to that profile (property `lxd.profiles`) * Open `provision.sh` and change the value of variable `MACHINE_HOSTNAME` and `ELASTICSEARCH_VERSION`. It makes sense to give the same name as the folder, plus the domain, in this example `elasticsearch-instance.localenv.com`. * Run `vagrant up > log/provisioning.log` * Make sure your system is able to resolve the domain name that you specified in variable `MACHINE_HOSTNAME`, for example by adding an entry in `/etc/hosts` diff --git a/templates/template05-elasticsearch/Vagrantfile b/templates/template05-elasticsearch/Vagrantfile index 4aecd17..a174b63 100644 --- a/templates/template05-elasticsearch/Vagrantfile +++ b/templates/template05-elasticsearch/Vagrantfile @@ -4,27 +4,51 @@ Vagrant.configure("2") do |config| - config.vm.box = "hibox/focal64" + config.vm.box = "isc/lxc-ubuntu-22.04" config.vm.box_check_update = false - - ## This is the latest box version as of 22/03/2022 - ## Box versions are available here: https://app.vagrantup.com/hibox/boxes/focal64 - config.vm.box_version = "1.0.1639726498" - + config.vm.provider 'lxd' do |lxd| lxd.api_endpoint = 'https://127.0.0.1:8443' lxd.timeout = 10 - lxd.name = 'elastic-search' + lxd.name = 'your-container-name' + lxd.project = 'default' + lxd.profiles = ['default'] # lxd.nesting = nil # lxd.privileged = nil # lxd.ephemeral = false # lxd.profiles = ['default'] # lxd.environment = {} # lxd.config = {} + end - - config.vm.provision :shell, path: "provision.sh" - + + config.vm.provision :shell, path: "provision.sh" + end + + + + + + + + + + + + + + + + + + + + + + + + +