Skip to content

Instantly share code, notes, and snippets.

@mattmb
mattmb / mesos_draining.patch
Created October 5, 2018 10:38
mesos_draining.patch
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 52e25ad..3270326 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -7586,6 +7586,22 @@ void Master::offer(
}
#endif // ENABLE_PORT_MAPPING_ISOLATOR
+ // Do not send the offer from the agent, if it is marked for
+ // maintenance.
@mattmb
mattmb / mesos.diff
Last active October 30, 2017 10:03
Example patch to Mesos to add a hook for injecting environment variables Raw
diff --git a/include/mesos/hook.hpp b/include/mesos/hook.hpp
index 019887095..64d7744a0 100644
--- a/include/mesos/hook.hpp
+++ b/include/mesos/hook.hpp
@@ -53,6 +53,19 @@ public:
return None();
}
+ // This environment variable decorator hook is called from within
+ // master during the launchTask routine. A module implementing the
@mattmb
mattmb / jenkins-create-node.sh
Last active April 26, 2016 16:10 — forked from sergeyhush/jenkins-create-node.sh
Jenkins create new node
#!/bin/bash
set -eu
JENKINS_URL=$1
NODE_NAME=$2
USERID=$3
PASSWORD=$4
NODE_SLAVE_HOME='/var/lib/jenkins'
EXECUTORS=2
LABELS=build
### Keybase proof
I hereby claim:
* I am mattmb on github.
* I am mattmb (https://keybase.io/mattmb) on keybase.
* I have a public key whose fingerprint is 0056 7274 3948 EDC2 1F13 61EB 6860 6463 83DF 3BFD
To claim this, I am signing this object:
@mattmb
mattmb / -
Created October 20, 2014 20:22
on run {targetBuddy, targetMessage}
tell application "Messages"
tell application "System Events"
set visible of process "Messages" to false
end tell
send targetMessage to buddy targetBuddy
end tell
end run