Add chronos, fault tolerant job scheduler for Mesos
This commit is contained in:
parent
14ba80a6e1
commit
aeba2947b0
@ -0,0 +1,18 @@
|
||||
{stdenv, curl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "chronos-maven-deps";
|
||||
builder = ./fetch-chronos-deps.sh;
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "0mm2sb1p5zz6b0z2s4zhdlix6fafydsxmqjy8zbkwzw4f6lazzyl";
|
||||
|
||||
buildInputs = [ curl ];
|
||||
|
||||
# We borrow these environment variables from the caller to allow
|
||||
# easy proxy configuration. This is impure, but a fixed-output
|
||||
# derivation like fetchurl is allowed to do so since its result is
|
||||
# by definition pure.
|
||||
impureEnvVars = ["http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"];
|
||||
}
|
38
pkgs/applications/networking/cluster/chronos/default.nix
Normal file
38
pkgs/applications/networking/cluster/chronos/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, lib, makeWrapper, fetchgit, curl, jdk, maven, nodejs, mesos }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "chronos-${version}";
|
||||
version = "286b2ccb8e4695f8e413406ceca85b60d3a87e22";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/airbnb/chronos";
|
||||
rev = version;
|
||||
sha256 = "6c463c30530dc82276d30087e7ab08d6964b884232c0a93f691cef9fa1ff2651";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper curl jdk maven nodejs mesos ];
|
||||
|
||||
mavenRepo = import ./chronos-deps.nix { inherit stdenv curl; };
|
||||
|
||||
buildPhase = ''
|
||||
ln -s $mavenRepo .m2
|
||||
mvn package -Dmaven.repo.local=$(pwd)/.m2
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,libexec/chronos}
|
||||
cp target/chronos*.jar $out/libexec/chronos/${name}.jar
|
||||
|
||||
makeWrapper ${jdk.jre}/bin/java $out/bin/chronos \
|
||||
--add-flags "-Xmx384m -Xms384m -cp $out/libexec/chronos/${name}.jar com.airbnb.scheduler.Main" \
|
||||
--prefix "MESOS_NATIVE_LIBRARY" : "$MESOS_NATIVE_LIBRARY"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/airbnb/chronos;
|
||||
license = licenses.asl20;
|
||||
description = "Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules";
|
||||
maintainers = with maintainers; [ offline ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
1672
pkgs/applications/networking/cluster/chronos/fetch-chronos-deps.sh
Normal file
1672
pkgs/applications/networking/cluster/chronos/fetch-chronos-deps.sh
Normal file
File diff suppressed because it is too large
Load Diff
@ -9186,6 +9186,8 @@ let
|
||||
hiDPISupport = config.chromium.hiDPISupport or false;
|
||||
};
|
||||
|
||||
chronos = callPackage ../applications/networking/cluster/chronos { };
|
||||
|
||||
chromiumBeta = lowPrio (chromium.override { channel = "beta"; });
|
||||
|
||||
chromiumDev = lowPrio (chromium.override { channel = "dev"; });
|
||||
|
Loading…
Reference in New Issue
Block a user