From f116d6be5f29c53bb0941fb45a8180c547d777cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:00:37 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 73a8f71f..2a6dffe4 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -169,3 +169,20 @@ mainhttpscert True = , " SSLCertificateKeyFile /etc/ssl/private/web.pem" , " SSLCertificateChainFile /etc/ssl/certs/startssl.pem" ] + + +annexRsyncServer :: Property +annexRsyncServer = combineProperties "rsync server for git-annex autobuilders" + [ Apt.installed ["rsync"] + , File.hasPrivContent "/etc/rsyncd.conf" + , File.hasPrivContent "/etc/rsyncd.secrets" + , "/etc/default/rsync" `File.containsLine` "RSYNC_ENABLE=true" + `onChange` Service.running "rsync" + , endpoint "/srv/web/downloads.kitenet.net/git-annex/autobuild" + , endpoint "/srv/web/downloads.kitenet.net/git-annex/autobuild/x86_64-apple-mavericks" + ] + where + endpoint d = combineProperties ("endpoint " ++ d) + [ File.dirExists d + , File.ownerGroup d "joey" "joey" + ] -- cgit v1.3-2-g0d8e From 2097be5ff4a01a6acc9063ce9b62928a5f892b73 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:04:18 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 2 ++ config-joey.hs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 2a6dffe4..4f760640 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -127,6 +127,8 @@ annexWebSite hosts origin hn uuid remotes = propertyList (hn ++" website using g , " " , " Options Indexes FollowSymLinks ExecCGI" , " AllowOverride None" + , " AddHandler cgi-script .cgi" + , " DirectoryIndex index.cgi" , " Order allow,deny" , " allow from all" , " " diff --git a/config-joey.hs b/config-joey.hs index 166e84e4..e5ccac3b 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -18,7 +18,6 @@ import qualified Propellor.Property.OpenId as OpenId import qualified Propellor.Property.Docker as Docker import qualified Propellor.Property.Git as Git import qualified Propellor.Property.Apache as Apache -import qualified Propellor.Property.Service as Service import qualified Propellor.Property.SiteSpecific.GitHome as GitHome import qualified Propellor.Property.SiteSpecific.GitAnnexBuilder as GitAnnexBuilder import qualified Propellor.Property.SiteSpecific.JoeySites as JoeySites -- cgit v1.3-2-g0d8e From 0f08c035c7bafe13b59e3e91b426e93ee8e5092a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:05:42 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 4f760640..7ef6e945 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -128,7 +128,7 @@ annexWebSite hosts origin hn uuid remotes = propertyList (hn ++" website using g , " Options Indexes FollowSymLinks ExecCGI" , " AllowOverride None" , " AddHandler cgi-script .cgi" - , " DirectoryIndex index.cgi" + , " DirectoryIndex index.html index.cgi" , " Order allow,deny" , " allow from all" , " " -- cgit v1.3-2-g0d8e From fc8d3fe541ab019ac545695fc829af9558c8b1ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:40:57 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 11 +++++++++++ config-joey.hs | 1 + 2 files changed, 12 insertions(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 7ef6e945..f409b09b 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -188,3 +188,14 @@ annexRsyncServer = combineProperties "rsync server for git-annex autobuilders" [ File.dirExists d , File.ownerGroup d "joey" "joey" ] + +twitRss :: Property +twitRss = combineProperties "twitter rss" + [ Git.cloned "joey" "git://git.kitenet.net/twitrss.git" dir Nothing + , check (doesFileExist $ dir "twitRss") $ userScriptProperty "joey" + [ "cd " ++ dir + , "ghc --make twitRss" + ] + ] + where + dir = "/srv/web/tmp.kitenet.net/twitrss" diff --git a/config-joey.hs b/config-joey.hs index e5ccac3b..59514557 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -104,6 +104,7 @@ hosts = -- (o) ` "tmp.kitenet.net" "26fd6e38-1226-11e2-a75f-ff007033bdba" [] + & JoeySites.twitRss & Apt.installed ["ntop"] -- cgit v1.3-2-g0d8e From 6808fe60e1ad7593455d477ff456d8dbfbe75331 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:43:04 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index f409b09b..5a2e1644 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -192,10 +192,11 @@ annexRsyncServer = combineProperties "rsync server for git-annex autobuilders" twitRss :: Property twitRss = combineProperties "twitter rss" [ Git.cloned "joey" "git://git.kitenet.net/twitrss.git" dir Nothing - , check (doesFileExist $ dir "twitRss") $ userScriptProperty "joey" - [ "cd " ++ dir - , "ghc --make twitRss" - ] + , check (not <$> doesFileExist (dir "twitRss")) $ + userScriptProperty "joey" + [ "cd " ++ dir + , "ghc --make twitRss" + ] ] where dir = "/srv/web/tmp.kitenet.net/twitrss" -- cgit v1.3-2-g0d8e From 5775643fc0b6da8e58adac49524f82044368c7d6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:43:55 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 5a2e1644..847bd8b9 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -197,6 +197,7 @@ twitRss = combineProperties "twitter rss" [ "cd " ++ dir , "ghc --make twitRss" ] + `requires` Apt.installed ["libghc-xml-dev"] ] where dir = "/srv/web/tmp.kitenet.net/twitrss" -- cgit v1.3-2-g0d8e From de106741ece5cb2fcf206bd7537b88266d2d38c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:44:45 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 847bd8b9..c3ddc116 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -197,7 +197,10 @@ twitRss = combineProperties "twitter rss" [ "cd " ++ dir , "ghc --make twitRss" ] - `requires` Apt.installed ["libghc-xml-dev"] + `requires` Apt.installed + [ "libghc-xml-dev" + , "libghc-feed-dev" + ] ] where dir = "/srv/web/tmp.kitenet.net/twitrss" -- cgit v1.3-2-g0d8e From 23b370398ceb933271cbd19919f2d8b1c6b00188 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:45:36 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index c3ddc116..0c1a1f4f 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -200,6 +200,7 @@ twitRss = combineProperties "twitter rss" `requires` Apt.installed [ "libghc-xml-dev" , "libghc-feed-dev" + , "libghc-http-conduit-dev" ] ] where -- cgit v1.3-2-g0d8e From 8009591be33e4c589557b1abd5259964b6bd81c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:46:53 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 0c1a1f4f..c6050e7e 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -201,6 +201,7 @@ twitRss = combineProperties "twitter rss" [ "libghc-xml-dev" , "libghc-feed-dev" , "libghc-http-conduit-dev" + , "libghc-tagsoup-dev" ] ] where -- cgit v1.3-2-g0d8e From ebe1bd3f1b9daed7df6b8aa9f3f3172a2a336b55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:53:19 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index c6050e7e..d52ddbb3 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -9,6 +9,7 @@ import qualified Propellor.Property.File as File import qualified Propellor.Property.Gpg as Gpg import qualified Propellor.Property.Ssh as Ssh import qualified Propellor.Property.Git as Git +import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Service as Service import qualified Propellor.Property.User as User import qualified Propellor.Property.Obnam as Obnam @@ -189,6 +190,7 @@ annexRsyncServer = combineProperties "rsync server for git-annex autobuilders" , File.ownerGroup d "joey" "joey" ] +-- Twitter, you kill us. twitRss :: Property twitRss = combineProperties "twitter rss" [ Git.cloned "joey" "git://git.kitenet.net/twitrss.git" dir Nothing @@ -203,6 +205,11 @@ twitRss = combineProperties "twitter rss" , "libghc-http-conduit-dev" , "libghc-tagsoup-dev" ] + , feed "http://twitter.com/search/realtime?q=git-annex" "git-annex-twitter.rss" + , feed "http://twitter.com/search/realtime?q=olduse+OR+git-annex+OR+debhelper+OR+etckeeper+OR+ikiwiki+-ashley_ikiwiki" "twittergrep.rss" ] where dir = "/srv/web/tmp.kitenet.net/twitrss" + crontime = "15 * * * *" + feed url file = Cron.job "twitter rss cron job" crontime "joey" dir $ + "./twitRss " ++ shellEscape url ++ " > ../" ++ shellEscape file -- cgit v1.3-2-g0d8e From 723af9c5f24bf91d01a79a1b5365c0db570784f8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 14:55:03 -0400 Subject: propellor spin --- Propellor/Property/SiteSpecific/JoeySites.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index d52ddbb3..ae6c2dc4 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -205,11 +205,11 @@ twitRss = combineProperties "twitter rss" , "libghc-http-conduit-dev" , "libghc-tagsoup-dev" ] - , feed "http://twitter.com/search/realtime?q=git-annex" "git-annex-twitter.rss" - , feed "http://twitter.com/search/realtime?q=olduse+OR+git-annex+OR+debhelper+OR+etckeeper+OR+ikiwiki+-ashley_ikiwiki" "twittergrep.rss" + , feed "http://twitter.com/search/realtime?q=git-annex" "git-annex-twitter" + , feed "http://twitter.com/search/realtime?q=olduse+OR+git-annex+OR+debhelper+OR+etckeeper+OR+ikiwiki+-ashley_ikiwiki" "twittergrep" ] where dir = "/srv/web/tmp.kitenet.net/twitrss" crontime = "15 * * * *" - feed url file = Cron.job "twitter rss cron job" crontime "joey" dir $ - "./twitRss " ++ shellEscape url ++ " > ../" ++ shellEscape file + feed url desc = Cron.job desc crontime "joey" dir $ + "./twitRss " ++ shellEscape url ++ " > " ++ shellEscape ("../" ++ desc ++ ".rss") -- cgit v1.3-2-g0d8e From 0592ab4bd7deaadaa971bc7d19b7beaca5a1253e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Apr 2014 15:08:25 -0400 Subject: since http conduit is broken on stable, go ghetto and use curl --- Propellor/Property/SiteSpecific/JoeySites.hs | 1 - config-joey.hs | 1 - 2 files changed, 2 deletions(-) (limited to 'Propellor/Property/SiteSpecific') diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index ae6c2dc4..dd24bb6c 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -202,7 +202,6 @@ twitRss = combineProperties "twitter rss" `requires` Apt.installed [ "libghc-xml-dev" , "libghc-feed-dev" - , "libghc-http-conduit-dev" , "libghc-tagsoup-dev" ] , feed "http://twitter.com/search/realtime?q=git-annex" "git-annex-twitter" diff --git a/config-joey.hs b/config-joey.hs index 30f46ea9..6039a529 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -109,7 +109,6 @@ hosts = -- (o) ` "tmp.kitenet.net" "26fd6e38-1226-11e2-a75f-ff007033bdba" [] - -- TODO:twitRss is broken on stable & JoeySites.twitRss & Apt.installed ["ntop"] -- cgit v1.3-2-g0d8e