-
Notifications
You must be signed in to change notification settings - Fork 0
/
sandbox.nix
36 lines (30 loc) · 1.02 KB
/
sandbox.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
with import <nixpkgs> {}; {
mesosEnv = stdenv.mkDerivation {
name = "mesos-sandbox";
buildInputs = [ screen jdk zookeeper mesos marathon ];
shellHook = ''
mkdir -p tmp
screen -dmLS zookeeper \
${jdk.jre}/bin/java \
-cp "${zookeeper}/lib/*:${zookeeper}/${zookeeper.name}.jar:." \
-Dzookeeper.datadir.autocreate=true \
org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
export MESOS_ZK=zk://127.0.0.1:2181/mesos
export MESOS_QUORUM=1
export MESOS_CLUSTER=sandbox
export MESOS_WORK_DIR=tmp/mesos
screen -dmLS mesos-master \
mesos-master
export MESOS_MASTER=zk://127.0.0.1:2181/mesos
export MESOS_CONTAINERIZERS=docker,mesos
export MESOS_SYSTEMD_ENABLE_SUPPORT=false
export MESOS_PORT=5051
export MESOS_RESOURCES="ports(*):[11000-11999]"
screen -dmLS mesos-slave \
mesos-slave
screen -dmLS marathon \
marathon --master zk://127.0.0.1:2181/mesos
tail -f screenlog.0
'';
};
}