diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2019-11-10 21:28:09 +0100 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2019-11-10 21:28:09 +0100 |
commit | 472e165b563f87c99275385b1a6979b7f3c01668 (patch) | |
tree | a9f1a3e1ff0585de81d110ddca43c6974f7cf013 /nixos/tests | |
parent | 8219a3b7135f11035884df8196136f69f522bca1 (diff) | |
download | nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar.gz nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar.bz2 nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar.lz nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar.xz nixlib-472e165b563f87c99275385b1a6979b7f3c01668.tar.zst nixlib-472e165b563f87c99275385b1a6979b7f3c01668.zip |
nixos/slurm: add option for external slurmdbd.conf
Slurmdbd requires a password database which is stored in slurmdbd.conf. A seperate config file avoids that the password ends up in the nix store. Slurmdbd does 19.5 does not support MySQL socket conections. Adapated the slurm test to provide username and password.
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/slurm.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/tests/slurm.nix b/nixos/tests/slurm.nix index 4c2cd3c3d264..c0243441ad61 100644 --- a/nixos/tests/slurm.nix +++ b/nixos/tests/slurm.nix @@ -54,10 +54,15 @@ in { networking.firewall.enable = false; services.slurm.dbdserver = { enable = true; + storagePass = "password123"; }; services.mysql = { enable = true; - package = pkgs.mysql; + package = pkgs.mariadb; + initialScript = pkgs.writeText "mysql-init.sql" '' + CREATE USER 'slurm'@'localhost' IDENTIFIED BY 'password123'; + GRANT ALL PRIVILEGES ON slurm_acct_db.* TO 'slurm'@'localhost'; + ''; ensureDatabases = [ "slurm_acct_db" ]; ensureUsers = [{ ensurePermissions = { "slurm_acct_db.*" = "ALL PRIVILEGES"; }; |