Merge branch 'joeyconfig'
This commit is contained in:
commit
d84e7a2848
|
@ -24,9 +24,10 @@ import qualified Propellor.Property.Postfix as Postfix
|
||||||
import qualified Propellor.Property.Grub as Grub
|
import qualified Propellor.Property.Grub as Grub
|
||||||
import qualified Propellor.Property.Obnam as Obnam
|
import qualified Propellor.Property.Obnam as Obnam
|
||||||
import qualified Propellor.Property.Gpg as Gpg
|
import qualified Propellor.Property.Gpg as Gpg
|
||||||
import qualified Propellor.Property.Chroot as Chroot
|
|
||||||
import qualified Propellor.Property.Systemd as Systemd
|
import qualified Propellor.Property.Systemd as Systemd
|
||||||
|
import qualified Propellor.Property.Chroot as Chroot
|
||||||
import qualified Propellor.Property.Debootstrap as Debootstrap
|
import qualified Propellor.Property.Debootstrap as Debootstrap
|
||||||
|
import qualified Propellor.Property.OS as OS
|
||||||
import qualified Propellor.Property.HostingProvider.DigitalOcean as DigitalOcean
|
import qualified Propellor.Property.HostingProvider.DigitalOcean as DigitalOcean
|
||||||
import qualified Propellor.Property.HostingProvider.CloudAtCost as CloudAtCost
|
import qualified Propellor.Property.HostingProvider.CloudAtCost as CloudAtCost
|
||||||
import qualified Propellor.Property.HostingProvider.Linode as Linode
|
import qualified Propellor.Property.HostingProvider.Linode as Linode
|
||||||
|
@ -48,8 +49,17 @@ hosts = -- (o) `
|
||||||
, diatom
|
, diatom
|
||||||
, elephant
|
, elephant
|
||||||
, alien
|
, alien
|
||||||
|
, testvm
|
||||||
] ++ monsters
|
] ++ monsters
|
||||||
|
|
||||||
|
testvm :: Host
|
||||||
|
testvm = host "testvm.kitenet.net"
|
||||||
|
& Chroot.provisioned (Chroot.debootstrapped (System (Debian Unstable) "amd64") Debootstrap.DefaultConfig "/new-os")
|
||||||
|
-- & OS.cleanInstall (OS.Confirmed "foo.example.com") []
|
||||||
|
-- `onChange` propertyList "fixing up after clean install"
|
||||||
|
-- [
|
||||||
|
-- ]
|
||||||
|
|
||||||
darkstar :: Host
|
darkstar :: Host
|
||||||
darkstar = host "darkstar.kitenet.net"
|
darkstar = host "darkstar.kitenet.net"
|
||||||
& ipv6 "2001:4830:1600:187::2" -- sixxs tunnel
|
& ipv6 "2001:4830:1600:187::2" -- sixxs tunnel
|
||||||
|
@ -120,7 +130,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64"
|
||||||
-- multiuser system with eg, user passwords that are not deployed
|
-- multiuser system with eg, user passwords that are not deployed
|
||||||
-- with propellor.
|
-- with propellor.
|
||||||
kite :: Host
|
kite :: Host
|
||||||
kite = standardSystemUnhardened "kite.kitenet.net" Unstable "amd64"
|
kite = standardSystemUnhardened "kite.kitenet.net" Testing "amd64"
|
||||||
[ "Welcome to the new kitenet.net server!"
|
[ "Welcome to the new kitenet.net server!"
|
||||||
]
|
]
|
||||||
& ipv4 "66.228.36.95"
|
& ipv4 "66.228.36.95"
|
||||||
|
|
|
@ -77,12 +77,16 @@ processChainOutput h = go Nothing
|
||||||
where
|
where
|
||||||
go lastline = do
|
go lastline = do
|
||||||
v <- catchMaybeIO (hGetLine h)
|
v <- catchMaybeIO (hGetLine h)
|
||||||
|
debug ["read from chained propellor: ", show v]
|
||||||
case v of
|
case v of
|
||||||
Nothing -> case lastline of
|
Nothing -> case lastline of
|
||||||
Nothing -> pure FailedChange
|
Nothing -> do
|
||||||
|
debug ["chained propellor output nothing; assuming it failed"]
|
||||||
|
return FailedChange
|
||||||
Just l -> case readish l of
|
Just l -> case readish l of
|
||||||
Just r -> pure r
|
Just r -> pure r
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
debug ["chained propellor output did not end with a Result; assuming it failed"]
|
||||||
putStrLn l
|
putStrLn l
|
||||||
hFlush stdout
|
hFlush stdout
|
||||||
return FailedChange
|
return FailedChange
|
||||||
|
|
|
@ -430,7 +430,7 @@ provisionContainer cid = containerDesc cid $ property "provisioned" $ liftIO $ d
|
||||||
let params = ["--continue", show $ toChain cid]
|
let params = ["--continue", show $ toChain cid]
|
||||||
msgh <- mkMessageHandle
|
msgh <- mkMessageHandle
|
||||||
let p = inContainerProcess cid
|
let p = inContainerProcess cid
|
||||||
[ if isConsole msgh then "-it" else "-i" ]
|
(if isConsole msgh then ["-it"] else [])
|
||||||
(shim : params)
|
(shim : params)
|
||||||
r <- withHandle StdoutHandle createProcessSuccess p $
|
r <- withHandle StdoutHandle createProcessSuccess p $
|
||||||
processChainOutput
|
processChainOutput
|
||||||
|
|
Loading…
Reference in New Issue