Move builtin clouds to providers #6869

Merged
merged 1 commit into from Jan 25, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Jan 25, 2017

Description of change

Remove the builtin cloud definitions from
the cloud package, and add an interface
that providers can implement to "detect"
clouds. For now this is just implemented
by LXD to return the localhost cloud, but
it could also be used to detect cloud
definitions based on client-side config
such as novarc files, etc.

Also, finalize detected credentials.

These changes will be used in a followup
to have the localhost cloud definition include
the LXD host address included in the cloud
endpoint; and injecting credentials via
cloud credentials, rather than by injecting
files into the containers via cloud-init.

QA steps

  1. juju bootstrap --clouds (shows localhost in list)
  2. juju bootstrap (shows localhost in list, is default selection)
  3. juju bootstrap localhost (bootstraps successfully)
  4. juju bootstrap lxd (bootstraps successfully, cloud is called "localhost")

Documentation changes

No functional changes.

Does it affect current user workflow? CLI? API?

Bug reference

This PR does not fix any bugs. A followup will be made to fix https://bugs.launchpad.net/juju/+bug/1633788.

cmd/juju/commands/bootstrap.go
@@ -248,8 +249,8 @@ func (c *bootstrapCommand) Init(args []string) (err error) {
// BootstrapInterface provides bootstrap functionality that Run calls to support cleaner testing.
type BootstrapInterface interface {
Bootstrap(ctx environs.BootstrapContext, environ environs.Environ, args bootstrap.BootstrapParams) error
+ CloudDetector(environs.EnvironProvider) (environs.CloudDetector, bool)
@wallyworld

wallyworld Jan 25, 2017

Owner

As a drive by would be nice to see these commented

Member

axw commented Jan 25, 2017

$$merge$$

Contributor

jujubot commented Jan 25, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jan 25, 2017

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10108

Move builtin clouds to providers
Remove the builtin cloud definitions from
the cloud package, and add an interface
that providers can implement to "detect"
clouds. For now this is just implemented
by LXD to return the localhost cloud, but
it could also be used to detect cloud
definitions based on client-side config
such as novarc files, etc.
Member

axw commented Jan 25, 2017

$$derp$$

Contributor

jujubot commented Jan 25, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 1b100d9 into juju:develop Jan 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment