Merge lp:~axwalk/juju-core/lp1234127-add-cloud-tools-pocket into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Dimiter Naydenov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1948 |
Proposed branch: | lp:~axwalk/juju-core/lp1234127-add-cloud-tools-pocket |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
96 lines (+35/-6) 2 files modified
environs/cloudinit/cloudinit.go (+26/-2) environs/cloudinit/cloudinit_test.go (+9/-4) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1234127-add-cloud-tools-pocket |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimiter Naydenov (community) | Approve | ||
Review via email: mp+189023@code.launchpad.net |
Commit message
environs/cloudinit: use cloud-tools on precise
Use the cloud-tools pocket of the cloud archive on
12.04 (presumably we'll update for later LTS'). Also,
remove the PPA for precise, as cloud-tools has a recent
enough version of mongodb-server for our needs.
I've added cloud-tools to apt not just for state
servers, but so it's picked up by all; thus we'll get
up-to-date LXC for when we support containers on
non-local providers.
The OpenStack pockets are not added, as there are
separate ones for separate releases. It'll have to
be up to the charms to add that, I think.
Fixes #1234127
Description of the change
environs/cloudinit: use cloud-tools on precise
Use the cloud-tools pocket of the cloud archive on
12.04 (presumably we'll update for later LTS'). Also,
remove the PPA for precise, as cloud-tools has a recent
enough version of mongodb-server for our needs.
I've added cloud-tools to apt not just for state
servers, but so it's picked up by all; thus we'll get
up-to-date LXC for when we support containers on
non-local providers.
The OpenStack pockets are not added, as there are
separate ones for separate releases. It'll have to
be up to the charms to add that, I think.
Fixes #1234127
Reviewers: mp+189023_ code.launchpad. net,
Message:
Please take a look.
Description:
environs/cloudinit: use cloud-tools on precise
Use the cloud-tools pocket of the cloud archive on
12.04 (presumably we'll update for later LTS'). Also,
remove the PPA for precise, as cloud-tools has a recent
enough version of mongodb-server for our needs.
I've added cloud-tools to apt not just for state
servers, but so it's picked up by all; thus we'll get
up-to-date LXC for when we support containers on
non-local providers.
The OpenStack pockets are not added, as there are
separate ones for separate releases. It'll have to
be up to the charms to add that, I think.
Fixes #1234127
https:/ /code.launchpad .net/~axwalk/ juju-core/ lp1234127- add-cloud- tools-pocket/ +merge/ 189023
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14329043/
Affected files (+37, -6 lines): cloudinit/ cloudinit. go cloudinit/ cloudinit_ test.go
A [revision details]
M environs/
M environs/
Index: [revision details] 20131003034818- qhcpzxqc7ianxg2 n
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go' cloudinit/ cloudinit. go 2013-10-02 09:52:01 +0000 cloudinit/ cloudinit. go 2013-10-03 09:45:30 +0000
=== modified file 'environs/
--- environs/
+++ environs/
@@ -191,12 +191,18 @@
return nil, err
}
+ // Add the cloud archive cloud-tools pocket to apt sources udArchiveCloudT ools(c) d(`echo ENABLE_MONGODB="no" > /etc/default/ mongodb` )
+ // for series that need it. This gives us up-to-date LXC,
+ // MongoDB, and other infrastructure.
+ cfg.MaybeAddClo
+
if cfg.StateServer {
// disable the default mongodb installed by the mongodb-server package.
c.AddBootCm
if cfg.NeedMongoPPA() { "ppa:juju/ stable" , "1024R/C8068B11") "ppa:juju/ stable" , key) e("mongodb- server" ) cfg.StateServer Cert) + string( cfg.StateServer Key)
- c.AddAptSource(
+ const key = "" // key is loaded from PPA
+ c.AddAptSource(
}
c.AddPackag
certKey := string(
@@ -377,11 +383,29 @@
return hosts
}
+// MaybeAddCloudAr chiveCloudTools adds the cloud-archive cloud-tools chiveCloudTools (c Version. Series ubuntu- cloud.archive. canonical. com/ubuntu" cloud-tools main", url, series) ithKeyId( name, keyid, keyserver) Version. Series
+// pocket to apt sources, if the series requires it.
+func (cfg *MachineConfig) MaybeAddCloudAr
*cloudinit.Config) {
+ series := cfg.Tools.
+ if series != "precise" {
+ // Currently only precise; presumably we'll
+ // need to add each LTS in here as they're
+ // added to the cloud archive.
+ return
+ }
+ const url = "http://
+ const keyid = "EC4926EA"
+ const keyserver = "" // use default
+ name := fmt.Sprintf("deb %s %s-updates/
+ c.AddAptSourceW
+}
+
func (cfg *MachineConfig) NeedMongoPPA() bool {
series := cfg.Tools.
// 11.10 and earlier are not supported.
+ // 12.04 can get a compatible version from the cloud-archive.
// 13.04 and later ship a compatible vers...