juju/juju — pull request #557 by axw (2014-08-20 10:29:01+00:00)
Title: Refactor Bootstrap

This is a step towards eliminating our reliance
on provider storage, specifically for supporting
the uploading of tools during bootstrap. A followup
PR will remove the EnsureToolsAvailability function
and make environs/bootstrap solely responsible for
locating and delivering tools to the bootstrapped
instances.

- Environ.Bootstrap now returns the architecture
and series of the started instance, and a function
that must be called to finalize the bootstrap
process. The caller is responsible for filling in
the Tools of the machine config that is passed in
to the finalizer.
- environs/bootstrap.Bootstrap now generates the
system SSH key, and then calls Environ.Bootstrap;
it finds appropriate tools for the instance based
on the architecture and series reported, and then
calls the finalizer.

There are some other refactoring changes:
- MachineConfig.Constraints is now set by
NewBootstrapMachineConfig, not FinishMachineConfig;
only bootstrap machine configs actually set it,
and the constraints do not change during the bootstrap
process.
- environs/manual/bootstrap*.go have been deleted,
and the minimally required logic moved into
provider/manual.