]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - DOCUMENTATION.md
Add monitoring script with smartctl
[perso/Immae/Config/Nix.git] / DOCUMENTATION.md
index 6c68680bf891a1eaab93b482da3715fa59b7cf0f..fcd0b15164863fa040b7d12f907c87aa441f0b54 100644 (file)
@@ -1,7 +1,7 @@
 Get Started
 ===========
 
 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.
 
   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
   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
 - 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
 ------------------------
 
 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
 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!
 ---------
 
 - 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 <nixpkgs> {};webapps.nextcloud.withApps (a: builtins.attrValues webapps.nextcloud.allApps)"
+  ```
 - Put nextcloud in maintenance mode :
   ```
   nextcloud-occ maintenance:mode --on
   ```
 - Do a backup :
   ```
 - 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 :
   ```
 - Upgrade
 - Run the upgrade task :
@@ -256,6 +260,22 @@ Nextcloud
 - Issues :
   https://docs.nextcloud.com/server/16/admin_manual/maintenance/manual_upgrade.html
 
 - 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
 ------
 
 Flakes
 ------