The EC2 cloud module is used to interact with the Amazon Elastic Cloud Computing. This driver is highly experimental! Use at your own risk!
my-ec2-config:
# The EC2 API authentication id
id: GKTADJGHEIQSXMKKRBJ08H
# The EC2 API authentication key
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
# The ssh keyname to use
keyname: default
# The amazon security group
securitygroup: ssh_open
# The location of the private key which corresponds to the keyname
private_key: /root/default.pem
# Be default, service_url is set to amazonaws.com. If you are using this
# driver for something other than Amazon EC2, change it here:
service_url: amazonaws.com
# The endpoint that is ultimately used is usually formed using the region
# and the service_url. If you would like to override that entirely, you
# can explicitly define the endpoint:
endpoint: myendpoint.example.com:1138/services/Cloud
provider: ec2
Attach a volume to an instance
Return a dict of all available VM images on the cloud provider.
List all available locations
Return a dict of all available VM sizes on the cloud provider with relevant data. Latest version can be found at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
Return the block device mapping:
[{'DeviceName': '/dev/sdb', 'VirtualName': 'ephemeral0'},
{'DeviceName': '/dev/sdc', 'VirtualName': 'ephemeral1'}]
Create a single VM from a data dict
Create and attach volumes to created node
Create an SSH keypair
Create a volume
Delete tags for a node
CLI Example:
salt-cloud -a del_tags mymachine tag1,tag2,tag3
Delete an SSH keypair
Delete a volume
Delete all/specified EBS volumes upon instance termination
CLI Example:
salt-cloud -a delvol_on_destroy mymachine
Destroy a node. Will check termination protection and warn if enabled.
CLI Example:
salt-cloud --destroy mymachine
Detach a volume from an instance
Disable termination protection on a node
CLI Example:
salt-cloud -a disable_term_protect mymachine
Enable termination protection on a node
CLI Example:
salt-cloud -a enable_term_protect mymachine
Return the availability zone to use
Return the first configured instance.
Returns the spot instance configuration for the provided vm
Returns the SubnetId to use
Retrieve tags for a node
Returns the Tenancy to use.
Can be "dedicated" or "default". Cannot be present for spot instances.
Return the IAM profile.
The IAM instance profile to associate with the instances. This is either the Amazon Resource Name (ARN) of the instance profile or the name of the role.
Type: String
Default: None
Required: No
Example: arn:aws:iam::111111111111:instance-profile/s3access
Example: s3access
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
salt-cloud -a keepvol_on_destroy mymachine
Return the keyname
List all availability zones in the current region
Return a list of the VMs that are on the provider
Return a list of the VMs that are on the provider
Return a list of the VMs that are on the provider, with select fields
Reboot a node.
CLI Example:
salt-cloud -a reboot mymachine
Properly rename a node. Pass in the new name as "new name".
CLI Example:
salt-cloud -a rename mymachine newname=yourmachine
Return the script deployment object
Return the security group
Returns the SecurityGroupId
Set tags for a node
CLI Example:
salt-cloud -a set_tags mymachine tag1=somestuff tag2='Other stuff'
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
salt-cloud -a show_delvol_on_destroy mymachine
Show the details from EC2 concerning an AMI
Show the details from EC2 concerning an AMI
Show the details of an SSH keypair
Show the details from EC2 concerning an AMI
Show volume details
Return the ssh_interface type to connect to. Either 'public_ips' (default) or 'private_ips'.
Return the ssh_username. Defaults to a built-in list of users for trying.
Start a node
Stop a node
Current Salt release: 2014.1.6
Docs for previous releases on salt.rtfd.org.
salt.cloud.clouds.digital_ocean