Commit 693f04af authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/openstack: AZ support

parent 44d86c2e
...@@ -79,6 +79,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -79,6 +79,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
SourceImage: b.config.SourceImage, SourceImage: b.config.SourceImage,
SecurityGroups: b.config.SecurityGroups, SecurityGroups: b.config.SecurityGroups,
Networks: b.config.Networks, Networks: b.config.Networks,
AvailabilityZone: b.config.AvailabilityZone,
}, },
&StepWaitForRackConnect{ &StepWaitForRackConnect{
Wait: b.config.RackconnectWait, Wait: b.config.RackconnectWait,
......
...@@ -17,6 +17,7 @@ type RunConfig struct { ...@@ -17,6 +17,7 @@ type RunConfig struct {
SSHUsername string `mapstructure:"ssh_username"` SSHUsername string `mapstructure:"ssh_username"`
SSHPort int `mapstructure:"ssh_port"` SSHPort int `mapstructure:"ssh_port"`
SSHInterface string `mapstructure:"ssh_interface"` SSHInterface string `mapstructure:"ssh_interface"`
AvailabilityZone string `mapstructure:"availability_zone"`
RackconnectWait bool `mapstructure:"rackconnect_wait"` RackconnectWait bool `mapstructure:"rackconnect_wait"`
FloatingIpPool string `mapstructure:"floating_ip_pool"` FloatingIpPool string `mapstructure:"floating_ip_pool"`
FloatingIp string `mapstructure:"floating_ip"` FloatingIp string `mapstructure:"floating_ip"`
......
...@@ -15,6 +15,7 @@ type StepRunSourceServer struct { ...@@ -15,6 +15,7 @@ type StepRunSourceServer struct {
SourceImage string SourceImage string
SecurityGroups []string SecurityGroups []string
Networks []string Networks []string
AvailabilityZone string
server *servers.Server server *servers.Server
} }
...@@ -46,6 +47,7 @@ func (s *StepRunSourceServer) Run(state multistep.StateBag) multistep.StepAction ...@@ -46,6 +47,7 @@ func (s *StepRunSourceServer) Run(state multistep.StateBag) multistep.StepAction
FlavorRef: flavor, FlavorRef: flavor,
SecurityGroups: s.SecurityGroups, SecurityGroups: s.SecurityGroups,
Networks: networks, Networks: networks,
AvailabilityZone: s.AvailabilityZone,
}, },
KeyName: keyName, KeyName: keyName,
......
...@@ -50,6 +50,10 @@ each category, the available configuration keys are alphabetized. ...@@ -50,6 +50,10 @@ each category, the available configuration keys are alphabetized.
* `api_key` (string) - The API key used to access OpenStack. Some OpenStack * `api_key` (string) - The API key used to access OpenStack. Some OpenStack
installations require this. installations require this.
* `availability_zone` (string) - The availability zone to launch the
server in. If this isn't specified, the default enforced by your OpenStack
cluster will be used. This may be required for some OpenStack clusters.
* `floating_ip` (string) - A specific floating IP to assign to this instance. * `floating_ip` (string) - A specific floating IP to assign to this instance.
`use_floating_ip` must also be set to true for this to have an affect. `use_floating_ip` must also be set to true for this to have an affect.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment