~rogpeppe/juju-core/050-juju-provisioning-service

« back to all changes in this revision

Viewing changes to environs/cloudinit/cloudinit.go

  • Committer: Roger Peppe
  • Date: 2012-09-07 10:11:04 UTC
  • Revision ID: roger.peppe@canonical.com-20120907101104-v09v03081ndq8en8
state: add AddAgentService; cmd/jujud: add provisioning agent setup

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
// Creation of cloudinit data from this struct is largely provider-independent,
25
25
// but we'll keep it internal until we need to factor it out.
26
26
type MachineConfig struct {
27
 
        // Provisioner specifies whether the new machine will run a provisioning agent.
28
 
        Provisioner bool
29
 
 
30
27
        // StateServer specifies whether the new machine will run a ZooKeeper 
31
28
        // or MongoDB instance.
32
29
        StateServer bool
138
135
        if err := addAgentScript(c, cfg, "machine", fmt.Sprintf("--machine-id %d "+debugFlag, cfg.MachineId)); err != nil {
139
136
                return nil, err
140
137
        }
141
 
        if cfg.Provisioner {
142
 
                if err := addAgentScript(c, cfg, "provisioning", debugFlag); err != nil {
143
 
                        return nil, err
144
 
                }
145
 
        }
146
138
 
147
139
        // general options
148
140
        c.SetAptUpgrade(true)