From e32408f4e874708d560524b6fb7af74a4096b821 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Jun 2014 13:07:31 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index f6e1e37f..b44401ea 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -330,3 +330,11 @@ kiteShellBox = propertyList "kitenet.net shellinabox" `onChange` Service.restarted "shellinabox" , Service.running "shellinabox" ] + +githubBackup :: Property +githubBackup = propertyList "github-backup box" + [ Apt.installed ["github-backup", "moreutils"] + , let f = "/home/joey/.github-keys" + in File.hasPrivContent f + `onChange` File.ownerGroup f "joey" "joey" + ] -- cgit v1.3-2-g0d8e From d75cd6c7a373165944e73505412b674fb32786df Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 16:19:34 -0400 Subject: remove sysvinit and systemd from my docker images sysvinit hangs on upgrade if not running --- config-joey.hs | 1 + src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/config-joey.hs b/config-joey.hs index 2f2ffa03..9363ff5f 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -272,6 +272,7 @@ standardContainer :: Docker.ContainerName -> DebianSuite -> Architecture -> Host standardContainer name suite arch = Docker.container name (dockerImage system) & os (System (Debian suite) arch) & Apt.stdSourcesList suite + & Apt.removed ["sysvinit", "systemd"] & Apt.unattendedUpgrades & Apt.cacheCleaned where diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 3dcafa35..ec1dee89 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -100,6 +100,7 @@ standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder") (dockerImage $ System (Debian Unstable) arch) & Apt.stdSourcesList Unstable + & Apt.removed ["sysvinit", "systemd"] & Apt.unattendedUpgrades & buildDepsApt & autobuilder (show buildminute ++ " * * * *") timeout True @@ -116,6 +117,7 @@ androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name (dockerImage $ System (Debian Stable) "i386") & Apt.stdSourcesList Stable + & Apt.removed ["sysvinit", "systemd"] & User.accountFor builduser & File.dirExists gitbuilderdir & File.ownerGroup homedir builduser builduser @@ -141,6 +143,7 @@ armelCompanionContainer :: (System -> Docker.Image) -> Host armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion" (dockerImage $ System (Debian Unstable) "amd64") & Apt.stdSourcesList Unstable + & Apt.removed ["sysvinit", "systemd"] & Apt.unattendedUpgrades -- This volume is shared with the armel builder. & Docker.volume gitbuilderdir @@ -158,6 +161,7 @@ armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "arme (dockerImage $ System (Debian Unstable) "armel") & Apt.stdSourcesList Unstable & Apt.unattendedUpgrades + & Apt.removed ["sysvinit", "systemd"] & Apt.installed ["openssh-client"] & Docker.link "armel-git-annex-builder-companion" "companion" & Docker.volumes_from "armel-git-annex-builder-companion" -- cgit v1.3-2-g0d8e From 1cf1e21532e72a6f53cad576d7e97058994d39db Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 16:24:47 -0400 Subject: remove sysvinit by installing systemd --- config-joey.hs | 2 +- src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/config-joey.hs b/config-joey.hs index 03e1f272..3b4e57d6 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -272,7 +272,7 @@ standardContainer :: Docker.ContainerName -> DebianSuite -> Architecture -> Host standardContainer name suite arch = Docker.container name (dockerImage system) & os (System (Debian suite) arch) & Apt.stdSourcesList suite - & Apt.removed ["sysvinit", "systemd"] + & Apt.installed ["systemd"] & Apt.unattendedUpgrades & Apt.cacheCleaned where diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index ec1dee89..2f467669 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -100,7 +100,7 @@ standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder") (dockerImage $ System (Debian Unstable) arch) & Apt.stdSourcesList Unstable - & Apt.removed ["sysvinit", "systemd"] + & Apt.installed ["systemd"] & Apt.unattendedUpgrades & buildDepsApt & autobuilder (show buildminute ++ " * * * *") timeout True @@ -117,7 +117,7 @@ androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name (dockerImage $ System (Debian Stable) "i386") & Apt.stdSourcesList Stable - & Apt.removed ["sysvinit", "systemd"] + & Apt.installed ["systemd"] & User.accountFor builduser & File.dirExists gitbuilderdir & File.ownerGroup homedir builduser builduser @@ -143,7 +143,7 @@ armelCompanionContainer :: (System -> Docker.Image) -> Host armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion" (dockerImage $ System (Debian Unstable) "amd64") & Apt.stdSourcesList Unstable - & Apt.removed ["sysvinit", "systemd"] + & Apt.installed ["systemd"] & Apt.unattendedUpgrades -- This volume is shared with the armel builder. & Docker.volume gitbuilderdir @@ -161,7 +161,7 @@ armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "arme (dockerImage $ System (Debian Unstable) "armel") & Apt.stdSourcesList Unstable & Apt.unattendedUpgrades - & Apt.removed ["sysvinit", "systemd"] + & Apt.installed ["systemd"] & Apt.installed ["openssh-client"] & Docker.link "armel-git-annex-builder-companion" "companion" & Docker.volumes_from "armel-git-annex-builder-companion" -- cgit v1.3-2-g0d8e From dbffd982bac47cebd3fc67e51b46182f7e43392d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 16:52:41 -0400 Subject: fix os attribute --- src/Propellor/Property/Apt.hs | 7 +------ src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index f5dd74b5..69144d72 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -214,12 +214,7 @@ unattendedUpgrades = RevertableProperty enable disable "/etc/apt/apt.conf.d/50unattended-upgrades" `File.containsLine` ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") - | otherwise -> do - liftIO $ print ("xxx ", suite) - noChange - _ -> do - liftIO $ print "xxx" - noChange + _ -> noChange -- | Preseeds debconf values and reconfigures the package so it takes -- effect. diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 2f467669..6e4ca81a 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -99,6 +99,7 @@ cabalDeps = flagFile go cabalupdated standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int -> TimeOut -> Host standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder") (dockerImage $ System (Debian Unstable) arch) + & os (System (Debian Unstable) arch) & Apt.stdSourcesList Unstable & Apt.installed ["systemd"] & Apt.unattendedUpgrades @@ -116,6 +117,7 @@ androidAutoBuilderContainer dockerImage crontimes timeout = androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property -> FilePath -> Host androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name (dockerImage $ System (Debian Stable) "i386") + & os (System (Debian Stable) "i386") & Apt.stdSourcesList Stable & Apt.installed ["systemd"] & User.accountFor builduser @@ -142,6 +144,7 @@ androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.containe armelCompanionContainer :: (System -> Docker.Image) -> Host armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion" (dockerImage $ System (Debian Unstable) "amd64") + & os (System (Debian Unstable) "amd64") & Apt.stdSourcesList Unstable & Apt.installed ["systemd"] & Apt.unattendedUpgrades @@ -159,6 +162,7 @@ armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder- armelAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder" (dockerImage $ System (Debian Unstable) "armel") + & os (System (Debian Unstable) "armel") & Apt.stdSourcesList Unstable & Apt.unattendedUpgrades & Apt.installed ["systemd"] -- cgit v1.3-2-g0d8e