~ubuntu-branches/ubuntu/trusty/juju-core/trusty-proposed

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/environs/cloudinit.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-29 11:40:20 UTC
  • mfrom: (23.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140129114020-ejieitm8smtt5vln
Tags: 1.17.1-0ubuntu2
d/tests/local-provider: Don't fail tests if ~/.juju is present as its
created by the juju version command. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
// bootstrap node.  You'll still need to supply more information, but this
43
43
// takes care of the fixed entries and the ones that are always needed.
44
44
// stateInfoURL is the storage URL for the environment's state file.
45
 
func NewBootstrapMachineConfig(stateInfoURL string) *cloudinit.MachineConfig {
 
45
func NewBootstrapMachineConfig(stateInfoURL string, privateSystemSSHKey string) *cloudinit.MachineConfig {
46
46
        // For a bootstrap instance, FinishMachineConfig will provide the
47
47
        // state.Info and the api.Info. The machine id must *always* be "0".
48
48
        mcfg := NewMachineConfig("0", state.BootstrapNonce, nil, nil)
49
49
        mcfg.StateServer = true
50
50
        mcfg.StateInfoURL = stateInfoURL
 
51
        mcfg.SystemPrivateSSHKey = privateSystemSSHKey
51
52
        return mcfg
52
53
}
53
54
 
86
87
        if err := PopulateMachineConfig(mcfg, cfg.Type(), cfg.AuthorizedKeys(), cfg.SSLHostnameVerification(), cfg.SyslogPort()); err != nil {
87
88
                return err
88
89
        }
 
90
        mcfg.ProxySettings = cfg.ProxySettings()
 
91
        mcfg.AptProxySettings = cfg.AptProxySettings()
89
92
 
90
93
        // The following settings are only appropriate at bootstrap time. At the
91
94
        // moment, the only state server is the bootstrap node, but this