.2.3'/>
aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/databases.scm
AgeCommit message (Collapse)Author
2023-08-16services: posgresql: Add option to specify UID/GID for postgres user.Martin Baulig
Add 'createAccount?', 'uid' and 'gid' to <postgresql-configuation>. Unlike other system daemons, the PostgreSQL data directory is typically meant to persist across 'guix system reconfigure' and once created, you don't want it's UID or GID to change anymore. Furthermore, if you want to place the data directory on a network share and use NFSv4 with idmap, then the 'postgres' user must exist when the 'rpc.idmapd' daemon is launched; prior to mounting the share. And it needs to be possible to mount the share without configuring PostgreSQL. With NFSv3, the UID and GID typically needs to match those on the server. The added options allow for both of these scenarios: You can either create the user in (operating-system (users)) completely independently of the 'postgresql-service-type' (for instance to get your NFS setup working first prior to configuring your databases) - or "pin" it's UID / GID values. * gnu/services/databases.scm (<postgresql-configuration>)[create-account?] [uid, gid]: New fields. (%postgresql-accounts): Remove. (create-postgresql-account): New procedure. (postgresql-service-type)[extensions]: Use it. * doc/guix.texi (Database Services): Update accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-11services: postgresql: Add more role fields.Miguel Moreno
* gnu/services/databases.scm (postgresql-role): Add more role fields. (postgresql-create-roles): Honor it. * doc/guix.texi (Database Services): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-21services: postgresql: Add default package.Ludovic Courtès
* gnu/services/databases.scm (<postgresql-configuration>)[postgresql]: Add default value, moved from... (postgresql-service-type)[default-value]: ... here.
2023-04-21services: redis: Add 'configuration' action.Ludovic Courtès
* gnu/services/databases.scm (redis-shepherd-service): Add 'actions' field.
2023-04-21services: mysql: Add 'configuration' action.Ludovic Courtès
* gnu/services/databases.scm (mysql-shepherd-service): Add 'actions' field.
2023-04-21services: postgresql: Add 'configuration' action.Ludovic Courtès
* gnu/services/databases.scm (postgresql-shepherd-service): Add 'actions' field.
2023-04-21services: postgresql: Add the 'postgresql' Shepherd service name.Ludovic Courtès
* gnu/services/databases.scm (postgresql-shepherd-service): Add 'postgresql' to 'provision'.
2022-11-20services: mysql: Run mariadb-install-db instead of hard coding schemas.Marius Bakke
* gnu/services/databases.scm (mysql-install): Run "mariadb-install-db" instead of a hard coded set of SQL commands. (mysql-upgrade-wrapper): Explicitly run as mysql user.
2022-11-20services: mysql: Remove mysql-install-service in favor of wrapper.Marius Bakke
* gnu/services/databases.scm (mysql-with-install-lock): Remove variable. (mysql-start): Rename to ... (mysqld-wrapper): ... this. Do the preliminary initialization steps and call out to MYSQL-INSTALL when necessary. (mysql-install): Only initialize table schemas. (mysql-install-shepherd-service): Remove. (mysql-service)[requirement]: Remove 'mysql-install. Add 'user-processes. [start]: Don't pass #:user and #:group. (mysql-shepherd-services): Remove MYSQL-INSTALL-SHEPHERD-SERVICE.
2022-11-20services: mysql-upgrade: Add log file.Marius Bakke
* gnu/services/databases.scm (mysql-upgrade-shepherd-service)[start]: Pass #:log-file.
2022-11-20services: mysql-upgrade: Support custom datadir.Marius Bakke
* gnu/services/databases.scm (mysql-upgrade-wrapper): Take service configuration as argument, and pass the config file to mysql_upgrade. (mysql-upgrade-shepherd-service): Pass CONFIG instead of just socket and executable to MYSQL-UPGRADE-WRAPPER.
2022-11-20gnu: mysql: Support custom data dir.Ellen Papsch
* gnu/services/databases.scm (mysql-configuration): Add datadir property. * gnu/services/databases.scm (mysql-configuration-file): Replace hard coded data dir with property from config. * gnu/services/databases.scm (%mysql-activation): Remove activation, it runs before PID 1. The data dir may reside on a file system not mounted at this time. * gnu/services/databases.scm (mysql-install-shepherd-service): Create service which replaces the activation. Provide mysql-install. * gnu/services/databases.scm (mysql-shepherd-service): Move invocation of mysqld to mysql-start program-file, because the invocation gotten more complex. Require mysql-install. * gnu/services/databases.scm (mysql-start): Invoke mysqld only if a lock file appears. * gnu/services/databases.scm (mysql-shepherd-services): Prepend the install service before the normal service. * gnu/services/databases.scm (mysql-upgrade-wrapper): Increase timeout to 20s to let the mysql install procedure finish. Signed-off-by: Marius Bakke <marius@gnu.org>