forked from mirrors/nixpkgs
Merge pull request #6454 from rushmorem/mesos-marathon-squashed
New package: Mesos marathon framework (updated)
This commit is contained in:
commit
77235e24bf
|
@ -159,6 +159,7 @@
|
|||
roelof = "Roelof Wobben <rwobben@hotmail.com>";
|
||||
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
|
||||
rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
|
||||
rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
|
||||
rycee = "Robert Helgesson <robert@rycee.net>";
|
||||
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
||||
schristo = "Scott Christopher <schristopher@konputa.com>";
|
||||
|
|
|
@ -178,6 +178,7 @@
|
|||
nylon = 168;
|
||||
apache-kafka = 169;
|
||||
panamax = 170;
|
||||
marathon = 171;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
./services/scheduling/chronos.nix
|
||||
./services/scheduling/cron.nix
|
||||
./services/scheduling/fcron.nix
|
||||
./services/scheduling/marathon.nix
|
||||
./services/search/elasticsearch.nix
|
||||
./services/search/solr.nix
|
||||
./services/security/clamav.nix
|
||||
|
|
58
nixos/modules/services/scheduling/marathon.nix
Normal file
58
nixos/modules/services/scheduling/marathon.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.marathon;
|
||||
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options.services.marathon = {
|
||||
enable = mkOption {
|
||||
description = "Whether to enable the marathon mesos framework.";
|
||||
default = false;
|
||||
type = types.uniq types.bool;
|
||||
};
|
||||
|
||||
httpPort = mkOption {
|
||||
description = "Marathon listening port";
|
||||
default = 8080;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
master = mkOption {
|
||||
description = "Marathon mesos master zookeeper address";
|
||||
default = "zk://${head cfg.zookeeperHosts}/mesos";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
zookeeperHosts = mkOption {
|
||||
description = "Marathon mesos zookepper addresses";
|
||||
default = [ "localhost:2181" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.marathon = {
|
||||
description = "Marathon Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-interfaces.target" "zookeeper.service" "mesos-master.service" "mesos-slave.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.marathon}/bin/marathon --master ${cfg.master} --zk zk://${head cfg.zookeeperHosts}/marathon";
|
||||
User = "marathon";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.marathon = {
|
||||
uid = config.ids.uids.marathon;
|
||||
description = "Marathon mesos framework user";
|
||||
};
|
||||
};
|
||||
}
|
30
pkgs/applications/networking/cluster/marathon/default.nix
Normal file
30
pkgs/applications/networking/cluster/marathon/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, makeWrapper, jdk, mesos, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "marathon-v${version}";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.mesosphere.com/marathon/v${version}/marathon-${version}.tgz";
|
||||
sha256 = "794c915e205aebd8273f2b40c6faea1517fc683cdc0169194c4a67ce8779fa41";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper jdk mesos ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,libexec/marathon}
|
||||
cp target/scala-*/marathon*.jar $out/libexec/marathon/${name}.jar
|
||||
|
||||
makeWrapper ${jdk.jre}/bin/java $out/bin/marathon \
|
||||
--add-flags "-Xmx512m -jar $out/libexec/marathon/${name}.jar" \
|
||||
--prefix "MESOS_NATIVE_LIBRARY" : "$MESOS_NATIVE_LIBRARY"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://mesosphere.github.io/marathon;
|
||||
description = "Cluster-wide init and control system for services in cgroups or Docker containers.";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ rushmorem ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -10015,6 +10015,8 @@ let
|
|||
|
||||
magit = callPackage ../applications/editors/emacs-modes/magit { };
|
||||
|
||||
marathon = callPackage ../applications/networking/cluster/marathon { };
|
||||
|
||||
maudeMode = callPackage ../applications/editors/emacs-modes/maude { };
|
||||
|
||||
metaweblog = callPackage ../applications/editors/emacs-modes/metaweblog { };
|
||||
|
|
Loading…
Reference in a new issue