Add support for using cloud-init via a ConfigDrive
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
This commit is contained in:
parent
692b227ac3
commit
b57140da47
|
@ -88,6 +88,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
AvailabilityZone: b.config.AvailabilityZone,
|
AvailabilityZone: b.config.AvailabilityZone,
|
||||||
UserData: b.config.UserData,
|
UserData: b.config.UserData,
|
||||||
UserDataFile: b.config.UserDataFile,
|
UserDataFile: b.config.UserDataFile,
|
||||||
|
ConfigDrive: b.config.ConfigDrive,
|
||||||
},
|
},
|
||||||
&StepWaitForRackConnect{
|
&StepWaitForRackConnect{
|
||||||
Wait: b.config.RackconnectWait,
|
Wait: b.config.RackconnectWait,
|
||||||
|
|
|
@ -25,6 +25,8 @@ type RunConfig struct {
|
||||||
UserData string `mapstructure:"user_data"`
|
UserData string `mapstructure:"user_data"`
|
||||||
UserDataFile string `mapstructure:"user_data_file"`
|
UserDataFile string `mapstructure:"user_data_file"`
|
||||||
|
|
||||||
|
ConfigDrive bool `mapstructure:"config_drive"`
|
||||||
|
|
||||||
// Not really used, but here for BC
|
// Not really used, but here for BC
|
||||||
OpenstackProvider string `mapstructure:"openstack_provider"`
|
OpenstackProvider string `mapstructure:"openstack_provider"`
|
||||||
UseFloatingIp bool `mapstructure:"use_floating_ip"`
|
UseFloatingIp bool `mapstructure:"use_floating_ip"`
|
||||||
|
|
|
@ -19,7 +19,7 @@ type StepRunSourceServer struct {
|
||||||
AvailabilityZone string
|
AvailabilityZone string
|
||||||
UserData string
|
UserData string
|
||||||
UserDataFile string
|
UserDataFile string
|
||||||
|
ConfigDrive bool
|
||||||
server *servers.Server
|
server *servers.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ func (s *StepRunSourceServer) Run(state multistep.StateBag) multistep.StepAction
|
||||||
Networks: networks,
|
Networks: networks,
|
||||||
AvailabilityZone: s.AvailabilityZone,
|
AvailabilityZone: s.AvailabilityZone,
|
||||||
UserData: userData,
|
UserData: userData,
|
||||||
|
ConfigDrive: s.ConfigDrive,
|
||||||
},
|
},
|
||||||
|
|
||||||
KeyName: keyName,
|
KeyName: keyName,
|
||||||
|
|
Loading…
Reference in New Issue