Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2014-06-05 17:21:57 -04:00
commit 4fdd1b9ea4
6 changed files with 23 additions and 25 deletions

View File

@ -246,8 +246,7 @@ hosts = -- (o) `
standardSystem :: HostName -> DebianSuite -> Architecture -> Host standardSystem :: HostName -> DebianSuite -> Architecture -> Host
standardSystem hn suite arch = host hn standardSystem hn suite arch = host hn
& os (System (Debian suite) arch) & os (System (Debian suite) arch)
& Apt.stdSourcesList suite & Apt.stdSourcesList `onChange` Apt.upgrade
`onChange` Apt.upgrade
& Apt.cacheCleaned & Apt.cacheCleaned
& Apt.installed ["etckeeper"] & Apt.installed ["etckeeper"]
& Apt.installed ["ssh"] & Apt.installed ["ssh"]
@ -270,8 +269,8 @@ standardSystem hn suite arch = host hn
-- This is my standard container setup, featuring automatic upgrades. -- This is my standard container setup, featuring automatic upgrades.
standardContainer :: Docker.ContainerName -> DebianSuite -> Architecture -> Host standardContainer :: Docker.ContainerName -> DebianSuite -> Architecture -> Host
standardContainer name suite arch = Docker.container name (dockerImage system) standardContainer name suite arch = Docker.container name (dockerImage system)
& os (System (Debian suite) arch) & os system
& Apt.stdSourcesList suite & Apt.stdSourcesList `onChange` Apt.upgrade
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
& Apt.cacheCleaned & Apt.cacheCleaned

7
debian/changelog vendored
View File

@ -3,11 +3,12 @@ propellor (0.6.0) UNRELEASED; urgency=medium
* Docker containers now propigate DNS attributes out to the host they're * Docker containers now propigate DNS attributes out to the host they're
docked in. So if a docker container sets a DNS alias, every container docked in. So if a docker container sets a DNS alias, every container
it's docked in will automatically be added to a DNS round-robin, it's docked in will automatically be added to a DNS round-robin,
if propellor is used to manage DNS for the domain. when propellor is used to manage DNS for the domain.
* Propellor's output now includes the hostname being provisioned, or * Apt.stdSourcesList no longer needs a suite to be specified.
when provisioning a docker container, the container name.
* Added --dump to dump out a field of a host's privdata. Useful for editing * Added --dump to dump out a field of a host's privdata. Useful for editing
it. it.
* Propellor's output now includes the hostname being provisioned, or
when provisioning a docker container, the container name.
-- Joey Hess <joeyh@debian.org> Sat, 31 May 2014 16:41:56 -0400 -- Joey Hess <joeyh@debian.org> Sat, 31 May 2014 16:41:56 -0400

View File

@ -64,12 +64,19 @@ securityUpdates suite
| otherwise = [] | otherwise = []
-- | Makes sources.list have a standard content using the mirror CDN, -- | Makes sources.list have a standard content using the mirror CDN,
-- with a particular DebianSuite. -- with the Debian suite configured by the os.
-- --
-- Since the CDN is sometimes unreliable, also adds backup lines using -- Since the CDN is sometimes unreliable, also adds backup lines using
-- kernel.org. -- kernel.org.
stdSourcesList :: DebianSuite -> Property stdSourcesList :: Property
stdSourcesList suite = stdSourcesList' suite [] stdSourcesList = withOS ("standard sources.list") $ \o ->
case o of
(Just (System (Debian suite) _)) ->
ensureProperty $ stdSourcesListFor suite
_ -> error "os is not declared to be Debian"
stdSourcesListFor :: DebianSuite -> Property
stdSourcesListFor suite = stdSourcesList' suite []
-- | Adds additional sources.list generators. -- | Adds additional sources.list generators.
-- --

View File

@ -100,7 +100,7 @@ standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int
standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder") standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder")
(dockerImage $ System (Debian Unstable) arch) (dockerImage $ System (Debian Unstable) arch)
& os (System (Debian Unstable) arch) & os (System (Debian Unstable) arch)
& Apt.stdSourcesList Unstable & Apt.stdSourcesList
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
& buildDepsApt & buildDepsApt
@ -118,7 +118,7 @@ androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property
androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name
(dockerImage $ System (Debian Stable) "i386") (dockerImage $ System (Debian Stable) "i386")
& os (System (Debian Stable) "i386") & os (System (Debian Stable) "i386")
& Apt.stdSourcesList Stable & Apt.stdSourcesList
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& User.accountFor builduser & User.accountFor builduser
& File.dirExists gitbuilderdir & File.dirExists gitbuilderdir
@ -145,7 +145,7 @@ armelCompanionContainer :: (System -> Docker.Image) -> Host
armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion" armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion"
(dockerImage $ System (Debian Unstable) "amd64") (dockerImage $ System (Debian Unstable) "amd64")
& os (System (Debian Unstable) "amd64") & os (System (Debian Unstable) "amd64")
& Apt.stdSourcesList Unstable & Apt.stdSourcesList
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
-- This volume is shared with the armel builder. -- This volume is shared with the armel builder.
@ -163,7 +163,7 @@ armelAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeO
armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder" armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder"
(dockerImage $ System (Debian Unstable) "armel") (dockerImage $ System (Debian Unstable) "armel")
& os (System (Debian Unstable) "armel") & os (System (Debian Unstable) "armel")
& Apt.stdSourcesList Unstable & Apt.stdSourcesList
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& Apt.installed ["openssh-client"] & Apt.installed ["openssh-client"]

View File

@ -66,7 +66,7 @@ data Property = Property
} }
instance Show Property where instance Show Property where
show = propertyDesc show p = "property " ++ show (propertyDesc p)
-- | A property that can be reverted. -- | A property that can be reverted.
data RevertableProperty = RevertableProperty Property Property data RevertableProperty = RevertableProperty Property Property

View File

@ -14,7 +14,7 @@ data Attr = Attr
, _namedconf :: Dns.NamedConfMap , _namedconf :: Dns.NamedConfMap
, _dockerattr :: DockerAttr , _dockerattr :: DockerAttr
} }
deriving (Eq) deriving (Eq, Show)
instance Monoid Attr where instance Monoid Attr where
mempty = Attr mempty mempty mempty mempty mempty mempty = Attr mempty mempty mempty mempty mempty
@ -26,15 +26,6 @@ instance Monoid Attr where
, _dockerattr = _dockerattr old <> _dockerattr new , _dockerattr = _dockerattr old <> _dockerattr new
} }
instance Show Attr where
show a = unlines
[ "OS " ++ show (_os a)
, "sshPubKey " ++ show (_sshPubKey a)
, "dns " ++ show (_dns a)
, "namedconf " ++ show (_namedconf a)
, show (_dockerattr a)
]
data Val a = Val a | NoVal data Val a = Val a | NoVal
deriving (Eq, Show) deriving (Eq, Show)