X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=DOCUMENTATION.md;h=1697299e34025ffb8d8a407b42a667a62c6cf362;hp=6c68680bf891a1eaab93b482da3715fa59b7cf0f;hb=refs%2Fheads%2Fmaster;hpb=5e2ec9fb8628136e7f9f618c68c0e42ab086b80e diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 6c68680..fcd0b15 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -1,7 +1,7 @@ Get Started =========== -- You may run ./nixops/scripts/setup to setup the directory and variables +- You may run ./scripts/setup to setup the directory and variables The script won’t do anything without asking first, you may stop at any step. @@ -43,8 +43,7 @@ The directory is divided in several sections: of hosts. They tend to be less used now. But sometimes they need to have an identity (mostly to be able to send e-mails) The subsection "roles" (ou=roles,ou=hosts,dc=immae,dc=eu) was from a Puppet age and - is deprecated. Only one host remains handled by Puppet (caldance) and - should be replaced with an internal VM. + is deprecated. - The "groups" section (ou=groups,dc=immae,dc=eu) contains the generic groups of users not associated to a service. - The "group_users" and "users" sections contain the users (usually with @@ -58,7 +57,7 @@ How does nixpkgs resolve To build nixops machines ------------------------ -The `NIX_PATH` environment variable is built in nixops/Makefile and +The `NIX_PATH` environment variable is built in deploy/Makefile and contains three paths: nixpkgs, nixpkgsNext, nixpkgsPrevious. Only the first one is actually used most of the time. Derivations that need pinned nixpkgs should declare it in `nix/sources.json` (it’s the case @@ -236,13 +235,18 @@ Nextcloud --------- - Do not skip major versions! +- Check php supported version (lib/versioncheck.php file) +- Update all the apps: check on https://apps.nextcloud.com/ and build with + ``` + nix-build -E "with import {};webapps.nextcloud.withApps (a: builtins.attrValues webapps.nextcloud.allApps)" + ``` - Put nextcloud in maintenance mode : ``` nextcloud-occ maintenance:mode --on ``` - Do a backup : ``` - sudo -u postgres pg_dump -n owncloud webapps > nextcloud.sql + sudo -u postgres pg_dump owncloud > nextcloud.sql ``` - Upgrade - Run the upgrade task : @@ -256,6 +260,22 @@ Nextcloud - Issues : https://docs.nextcloud.com/server/16/admin_manual/maintenance/manual_upgrade.html +- Farm : + Once a new instance thename is created, create the database: + ``` + CREATE USER nextcloud_thename WITH PASSWORD 'somepassword'; + CREATE DATABASE nextcloud_thename WITH OWNER nextcloud_thename; + ``` + Then add this to the config.php: + ``` + 'appstoreenabled' => false, + ``` + Then run: + ``` + nextcloud-occ-thename maintenance:install --database=pgsql --database-name=nextcloud_thename --database-host=/run/postgresql --database-user=nextcloud_thename --admin-user=immae --data-dir=/var/lib/nextcloud_farm/thename/data + ``` + Finally, edit the config.php to add the correct trusted domain + Flakes ------