Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
EBSストアとしてawsにec2インスタンスを持っているので、サーバーを起動/停止できます。
再起動すると、データは再起動間で保持されます。
しかし、これを自動化するためにフォグや他のルビー宝石を使用するにはどうすればよいでしょうか?
あなたが何を求めているのかわからないが、これはインスタンスを停止するためのショットですFog
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")