saltstack/salt-cloud — pull request #18 by mafrosis (2012-08-15 10:31:34+00:00)
Title: Changes to AWS cloud config

Hey Thomas,

So I finally raised the PR :) There's a few changes, all of which were needed to get my requirements working with AWS:

* Support for AWS regions, called 'location' in salt-cloud
* Support for availability zones, called 'availability_zones' in salt-cloud
* Can configure the username when connecting over SSH
* Can specific internal or external IPs to connect with (I run salt-cloud within the AWS data centre, so need internal)
* A small fix to only accept keys if no errors occur in create()

I also wanted to update the help files, but ran out of time. Here's my current config which should make this all make more sense:

/etc/salt/cloud:

# set default config passed to all minions
minion:
master: salt.basketchaser.com

# set the AWS login data
AWS.id:
AWS.key:
AWS.keyname:
AWS.securitygroup: default
AWS.private_key: /root/key.pem
AWS.ssh_username: ubuntu

# set default cloud provider to AWS
provider: aws

# set our default region for AWS
AWS.location: ap-southeast-1
AWS.availability_zone: ap-southeast-1b
AWS.ssh_interface: private_ips

/etc/salt/cloud.profiles:
base_aws:
provider: aws
image: ami-a6ca8df4
size: Small Instance
os: Ubuntu
minion:
grains:
role: app