From 56fe313887dcc5af202e0f8efcf001a8418132e5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 May 2015 14:50:23 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/IABak.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/SiteSpecific/IABak.hs b/src/Propellor/Property/SiteSpecific/IABak.hs index fe2de7c8..85e62477 100644 --- a/src/Propellor/Property/SiteSpecific/IABak.hs +++ b/src/Propellor/Property/SiteSpecific/IABak.hs @@ -33,7 +33,7 @@ gitServer knownhosts = propertyList "iabak git server" $ props & cmdProperty "ln" ["-sf", "/usr/local/IA.BAK/pushme.cgi", "/usr/lib/cgi-bin/pushme.cgi"] & File.containsLine "/etc/sudoers" "www-data ALL=NOPASSWD:/usr/local/IA.BAK/pushed.sh" & Cron.niceJob "shardstats" (Cron.Times "*/30 * * * *") (User "root") "/" - "/usr/local/IA.BAK/shardstats-all" + "/usr/local/IA.BAK/shardmaint-fast; /usr/local/IA.BAK/shardstats-all" & Cron.niceJob "shardmaint" Cron.Daily (User "root") "/" "/usr/local/IA.BAK/shardmaint" -- cgit v1.2.3 From ff01339b8cf8bc812e9dd93519d065066ffba117 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 May 2015 15:49:30 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/IABak.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/SiteSpecific/IABak.hs b/src/Propellor/Property/SiteSpecific/IABak.hs index 85e62477..8ed3b38f 100644 --- a/src/Propellor/Property/SiteSpecific/IABak.hs +++ b/src/Propellor/Property/SiteSpecific/IABak.hs @@ -33,9 +33,9 @@ gitServer knownhosts = propertyList "iabak git server" $ props & cmdProperty "ln" ["-sf", "/usr/local/IA.BAK/pushme.cgi", "/usr/lib/cgi-bin/pushme.cgi"] & File.containsLine "/etc/sudoers" "www-data ALL=NOPASSWD:/usr/local/IA.BAK/pushed.sh" & Cron.niceJob "shardstats" (Cron.Times "*/30 * * * *") (User "root") "/" - "/usr/local/IA.BAK/shardmaint-fast; /usr/local/IA.BAK/shardstats-all" + "/usr/local/IA.BAK/shardstats-all" & Cron.niceJob "shardmaint" Cron.Daily (User "root") "/" - "/usr/local/IA.BAK/shardmaint" + "/usr/local/IA.BAK/shardmaint-fast; /usr/local/IA.BAK/shardmaint" registrationServer :: [Host] -> Property HasInfo registrationServer knownhosts = propertyList "iabak registration server" $ props -- cgit v1.2.3 From b68b9ee16521967365bb18e4db375d27bb7859e0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 24 May 2015 16:38:18 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 36808919..89b8b46d 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -30,7 +30,6 @@ scrollBox = propertyList "scroll server" $ props "libghc-bytestring-dev", "libghc-mtl-dev", "libghc-ncurses-dev", "libghc-random-dev", "libghc-monad-loops-dev", "libghc-text-dev", "libghc-ifelse-dev", "libghc-case-insensitive-dev", - "libghc-transformers-dev", "libghc-data-default-dev", "libghc-optparse-applicative-dev"] & userScriptProperty (User "scroll") [ "cd " ++ d "scroll" -- cgit v1.2.3 From 3a99c87cdfbbae4cfa31fff5e20c39bfcfdc0aae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 24 May 2015 17:12:17 -0400 Subject: remove unnecessary use of ensureProperty --- src/Propellor/Property/Docker.hs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index fdc312ce..3b8751f3 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -426,16 +426,14 @@ runningContainer cid@(ContainerId hn cn) image runps = containerDesc cid $ prope retry (n-1) a _ -> return v - go img = do - liftIO $ do - clearProvisionedFlag cid - createDirectoryIfMissing True (takeDirectory $ identFile cid) - shim <- liftIO $ Shim.setup (localdir "propellor") Nothing (localdir shimdir cid) - liftIO $ writeFile (identFile cid) (show ident) - ensureProperty $ property "run" $ liftIO $ - toResult <$> runContainer img - (runps ++ ["-i", "-d", "-t"]) - [shim, "--continue", show (DockerInit (fromContainerId cid))] + go img = liftIO $ do + clearProvisionedFlag cid + createDirectoryIfMissing True (takeDirectory $ identFile cid) + shim <- Shim.setup (localdir "propellor") Nothing (localdir shimdir cid) + writeFile (identFile cid) (show ident) + toResult <$> runContainer img + (runps ++ ["-i", "-d", "-t"]) + [shim, "--continue", show (DockerInit (fromContainerId cid))] -- | Called when propellor is running inside a docker container. -- The string should be the container's ContainerId. -- cgit v1.2.3 From d38c48b97f796217f606ada43fbe13445f41417a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 26 May 2015 11:24:22 -0400 Subject: propellor spin --- config-joey.hs | 1 + src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'src/Propellor/Property') diff --git a/config-joey.hs b/config-joey.hs index c4477f01..8c44d104 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -132,6 +132,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.persistentJournal & Docker.configured & Docker.docked (GitAnnexBuilder.standardAutoBuilderContainer dockerImage "amd64" 15 "2h") + & Systemd.nspawned (GitAnnexBuilder.standardAutoBuilderContainerNspawn "amd64" 15 "2h") & Docker.docked (GitAnnexBuilder.standardAutoBuilderContainer dockerImage "i386" 45 "2h") & Docker.docked (GitAnnexBuilder.armelCompanionContainer dockerImage) & Docker.docked (GitAnnexBuilder.armelAutoBuilderContainer dockerImage (Cron.Times "1 3 * * *") "5h") diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 511fd888..6108bf1a 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -9,6 +9,8 @@ import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Ssh as Ssh import qualified Propellor.Property.File as File import qualified Propellor.Property.Docker as Docker +import qualified Propellor.Property.Systemd as Systemd +import qualified Propellor.Property.Chroot as Chroot import Propellor.Property.Cron (Times) builduser :: UserName @@ -105,6 +107,20 @@ standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.conta & autobuilder arch (Cron.Times $ show buildminute ++ " * * * *") timeout & Docker.tweaked +standardAutoBuilderContainerNspawn :: Architecture -> Int -> TimeOut -> Systemd.Container +standardAutoBuilderContainerNspawn arch buildminute timeout = Systemd.container name bootstrap + & os myos + & Apt.stdSourcesList + & Apt.unattendedUpgrades + & User.accountFor (User builduser) + & tree arch + & buildDepsApt + & autobuilder arch (Cron.Times $ show buildminute ++ " * * * *") timeout + where + name = arch ++ "-git-annex-builder" + bootstrap = Chroot.debootstrapped myos mempty + myos = System (Debian Unstable) arch + androidAutoBuilderContainer :: (System -> Docker.Image) -> Times -> TimeOut -> Docker.Container androidAutoBuilderContainer dockerImage crontimes timeout = androidContainer dockerImage "android-git-annex-builder" (tree "android") builddir -- cgit v1.2.3