Top Level Namespace
Defined Under Namespace
Classes: CloudRunner, HostRecord, SecurityRecord
Instance Method Summary collapse
-
#host(name, security_groups, runlist, options = {}) ⇒ Object
Define a server.
-
#security(name, public_ports = [], group_ports = {}) ⇒ Object
Define a security group.
Instance Method Details
#host(name, security_groups, runlist, options = {}) ⇒ Object
Define a server.
Options: key_name, image_id, size, knife_solo, attributes (filename)
31 32 33 34 |
# File 'lib/ponyup.rb', line 31 def host name, security_groups, runlist, ={} host_namespace = HostRecord.define name, security_groups, runlist, CloudRunner.add_component host_namespace end |
#security(name, public_ports = [], group_ports = {}) ⇒ Object
Define a security group.
To define a group that allows public access:
security 'vulnerable', [22, 80]
security 'webish', 443
To define an internal network accessible by instances on other groups:
security 'shadows', [], vulnerable: [22]
security 'shadows', nil, vulnerable: 22
To define a group that allows both public and internal net traffic:
security 'hybrid', 22, shadows: 8080
security 'hybrid', [22, 80], shadows: 8080
22 23 24 25 |
# File 'lib/ponyup.rb', line 22 def security name, public_ports=[], group_ports={} security_namespace = SecurityRecord.define name, public_ports, group_ports CloudRunner.add_component security_namespace end |