mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Plugin: ec2_launch ssh key, instance type, etc. +
* added ssh_key parameter to the manifest to connect with (have to be present in AWS) * added readme * changed instance type to something what can run outside VPC (m3.medium)
This commit is contained in:
parent
e5c96195bb
commit
27abceefc1
3 changed files with 26 additions and 1 deletions
22
bootstrapvz/plugins/ec2_launch/README.rst
Normal file
22
bootstrapvz/plugins/ec2_launch/README.rst
Normal file
|
@ -0,0 +1,22 @@
|
|||
ec2-launch
|
||||
----------
|
||||
This plugin is spinning up **AWS classic instance** from the AMI created with
|
||||
the template from which this plugin is invoked.
|
||||
|
||||
Settings
|
||||
~~~~~~~~
|
||||
- ``security_group_ids``: A list of security groups (not VPC) to attach to the
|
||||
instance
|
||||
``required``
|
||||
- ``instance_type``: A string with AWS Classic capable instance to run
|
||||
(default: m3.medium)
|
||||
``optional``
|
||||
- ``ssh_key``: A string with the ssh key name to apply to the instance.
|
||||
``required``
|
||||
- ``print_public_ip``: A string with the path to write instance external IP to
|
||||
``optional``
|
||||
- ``tags``:
|
||||
``optional``
|
||||
- ``deregister_ami``: A boolean value describing if AMI should be kept after
|
||||
sinning up instance or not (default: false)
|
||||
``optional``
|
|
@ -14,6 +14,7 @@ properties:
|
|||
items: {type: string}
|
||||
uniqueItems: true
|
||||
instance_type: {type: string}
|
||||
ssh_key: {type: string}
|
||||
print_public_ip: {type: string}
|
||||
tags: {type: object}
|
||||
deregister_ami: {type: boolean}
|
||||
|
|
|
@ -25,7 +25,9 @@ class LaunchEC2Instance(Task):
|
|||
conn = info._ec2['connection']
|
||||
r = conn.run_instances(info._ec2['image'],
|
||||
security_group_ids=info.manifest.plugins['ec2_launch'].get('security_group_ids'),
|
||||
instance_type=info.manifest.plugins['ec2_launch'].get('instance_type', 't2.micro'))
|
||||
key_name=info.manifest.plugins['ec2_launch'].get('ssh_key'),
|
||||
instance_type=info.manifest.plugins['ec2_launch'].get('instance_type',
|
||||
'm3.medium'))
|
||||
info._ec2['instance'] = r.instances[0]
|
||||
|
||||
if 'tags' in info.manifest.plugins['ec2_launch']:
|
||||
|
|
Loading…
Add table
Reference in a new issue