Reputation: 10161
I've ec2 instance at aws as EBS store thats why I can start/stop the server.
When I start it again, the data is persisted between restarts.
But how to use fog or other ruby gems to automate this?
Upvotes: 3
Views: 695
Reputation: 15286
Not sure what you are asking but here is a shot to stop insance via Fog
conn = Fog::Compute::AWS.new(
{
:aws_access_key_id=>"YOUR_KEY",
:aws_secret_access_key=>"YOUR_SECRET"}
)
conn.start_instances("i-a3432cbb")
conn.stop_instances("i-a3432cbb")
Upvotes: 2