From 062d0258f021161320c6d255e4cd86b4f6157aa0 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 15 Aug 2015 00:48:39 -0700 Subject: [PATCH] dockerize this cluster --- config-simple.hs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config-simple.hs b/config-simple.hs index eb6aed9..e7ea473 100644 --- a/config-simple.hs +++ b/config-simple.hs @@ -2,6 +2,7 @@ import Propellor import Propellor.CmdLine import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Cron as Cron +import qualified Propellor.Property.Docker as Docker main :: IO () main = defaultMain hosts @@ -13,9 +14,27 @@ hosts = & Apt.stdSourcesList & Apt.installed ["ssh", "build-essential"] & Cron.runPropellor (Cron.Times "30 * * * *") + & Docker.configured , host "empress" & os (System (Debian (Stable "jessie")) "amd64") & Apt.stdSourcesList & Apt.installed ["ssh", "build-essential"] & Cron.runPropellor (Cron.Times "30 * * * *") + & Docker.configured ] + +standardStableContainer :: Docker.ContainerName -> Docker.Container +standardStableContainer name = standardContainer name (Stable "jessie") "amd64" + +standardContainer :: Docker.ContainerName -> DebianSuite -> Architecture -> Docker.Container +standardContainer name suite arch = Docker.container name (dockerImage system) + & os system + & Apt.stdSourcesList `onChange` Apt.upgrade + & Apt.unattendedUpgrades + & Apt.cacheCleaned + & Docker.tweaked + where + system = System (Debian suite) arch + +dockerImage :: System -> Docker.Image +dockerImage _ = Docker.latestImage "debian"