summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-06-01 13:40:06 -0400
committerJoey Hess2014-06-01 13:40:06 -0400
commit3df3fd1746c2721d6b1dc08bb1422422abf07f6f (patch)
treea9407922d63c79ce6b89b8a8d45b88291ccb1a48
parentc224625734fb4b6ae11f6fdd897ed83fc7f7bab5 (diff)
propellor spin
-rw-r--r--config-joey.hs4
-rw-r--r--src/Propellor/Property/Docker.hs3
2 files changed, 6 insertions, 1 deletions
diff --git a/config-joey.hs b/config-joey.hs
index 3f0d5154..6d3505ed 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -224,9 +224,11 @@ hosts = -- (o) `
in GitAnnexBuilder.androidContainer dockerImage "android-git-annex" doNothing gitannexdir
& Docker.volume ("/home/joey/src/git-annex:" ++ gitannexdir)
- -- temp for an accuantance
+ -- temp for an acquantance
, standardContainer "voltagex" Stable "amd64"
& Docker.publish "22022:22"
+ & Docker.memory "500m"
+ & Docker.cpuShares 1
& Apt.serviceInstalledRunning "ssh"
& Ssh.permitRootLogin True
& Ssh.passwordAuthentication True
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index adaea548..fa3e2344 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -244,6 +244,9 @@ memory :: String -> Property
memory = runProp "memory"
-- | CPU shares (relative weight).
+--
+-- By default, all containers run at the same priority, but you can tell
+-- the kernel to give more CPU time to a container using this property.
cpuShares :: Int -> Property
cpuShares = runProp "cpu-shares" . show