dockerize this cluster

This commit is contained in:
Christine Dodrill 2015-08-15 00:48:39 -07:00
parent 35e0371223
commit 062d0258f0
1 changed files with 19 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import Propellor
import Propellor.CmdLine import Propellor.CmdLine
import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Cron as Cron
import qualified Propellor.Property.Docker as Docker
main :: IO () main :: IO ()
main = defaultMain hosts main = defaultMain hosts
@ -13,9 +14,27 @@ hosts =
& Apt.stdSourcesList & Apt.stdSourcesList
& Apt.installed ["ssh", "build-essential"] & Apt.installed ["ssh", "build-essential"]
& Cron.runPropellor (Cron.Times "30 * * * *") & Cron.runPropellor (Cron.Times "30 * * * *")
& Docker.configured
, host "empress" , host "empress"
& os (System (Debian (Stable "jessie")) "amd64") & os (System (Debian (Stable "jessie")) "amd64")
& Apt.stdSourcesList & Apt.stdSourcesList
& Apt.installed ["ssh", "build-essential"] & Apt.installed ["ssh", "build-essential"]
& Cron.runPropellor (Cron.Times "30 * * * *") & 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"