Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391318
provision.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
501 B
Subscribers
None
provision.rb
View Options
require
'rubygems'
require
'fog'
# create a connection
ec2
=
Fog
::
Compute
.
new
({
:provider
=>
'AWS'
,
:region
=>
'eu-west-1'
,
})
response
=
ec2
.
run_instances
(
'ami-6b17201c'
,
1
,
1
,
'InstanceType'
=>
'c3.xlarge'
,
'SecurityGroup'
=>
'ssh'
,
'KeyName'
=>
'travis'
)
instance_id
=
response
.
body
[
"instancesSet"
].
first
[
"instanceId"
]
instance
=
ec2
.
servers
.
get
(
instance_id
)
instance
.
wait_for
{
ready?
}
puts
instance_id
,
':'
,
instance
.
public_ip_address
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:42 PM (14 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3393796
Attached To
R208 puppet-puppet-cassandra
Event Timeline
Log In to Comment