diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-02 12:10:15 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-02 12:22:12 +0100 |
commit | a0cf449fa58f0432cf01578c6104ed1eb21ebd29 (patch) | |
tree | 05e75d150acdcc6e356cb43b36d0e3c781530818 /nixos | |
parent | 36a5384ec9193a12b57989c647a4653a24a92ab0 (diff) | |
download | nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar.gz nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar.bz2 nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar.lz nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar.xz nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.tar.zst nixlib-a0cf449fa58f0432cf01578c6104ed1eb21ebd29.zip |
mesos: add docker support
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/mesos-slave.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nixos/modules/services/misc/mesos-slave.nix b/nixos/modules/services/misc/mesos-slave.nix index e9a898167161..d89531f7e909 100644 --- a/nixos/modules/services/misc/mesos-slave.nix +++ b/nixos/modules/services/misc/mesos-slave.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.mesos.slave; - + in { options.services.mesos = { @@ -29,30 +29,30 @@ in { ''; type = types.str; }; - + withHadoop = mkOption { description = "Add the HADOOP_HOME to the slave."; default = false; type = types.bool; }; - + workDir = mkOption { description = "The Mesos work directory."; default = "/var/lib/mesos/slave"; type = types.str; }; - + extraCmdLineOptions = mkOption { description = '' Extra command line options for Mesos Slave. - + See https://mesos.apache.org/documentation/latest/configuration/ ''; default = [ "" ]; type = types.listOf types.string; example = [ "--gc_delay=3days" ]; }; - + logLevel = mkOption { description = '' The logging level used. Possible values: @@ -72,6 +72,7 @@ in { description = "Mesos Slave"; wantedBy = [ "multi-user.target" ]; after = [ "network-interfaces.target" ]; + environment.MESOS_CONTAINERIZERS = "docker,mesos"; serviceConfig = { ExecStart = '' ${pkgs.mesos}/bin/mesos-slave \ @@ -80,6 +81,7 @@ in { ${optionalString cfg.withHadoop "--hadoop-home=${pkgs.hadoop}"} \ --work_dir=${cfg.workDir} \ --logging_level=${cfg.logLevel} \ + --docker=${pkgs.docker}/libexec/docker/docker \ ${toString cfg.extraCmdLineOptions} ''; PermissionsStartOnly = true; @@ -89,5 +91,5 @@ in { ''; }; }; - -} \ No newline at end of file + +} |