ec2-blackout 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -2,20 +2,74 @@
2
2
 
3
3
  Want to reduce your EC2 costs?
4
4
 
5
- ec2-blackout is a command-line tool to stop running EC2 instances.
5
+ Do you stop EC2 instances out of business hours?
6
+
7
+ If you don't, `ec2-blackout` could save you money
8
+
9
+ `ec2-blackout` is a command-line tool to stop running EC2 instances.
6
10
 
7
11
  Use ec2-blackout to shutdown EC2 instances when they are idle, for example when you are not in the office.
8
12
 
9
- Definitely not suitable for production instances but development and test instances can generally be shutdown overnight to save money.
13
+ Certinaly not suitable for production instances but development and test instances can generally be shutdown overnight to save money.
10
14
 
11
15
  ## Installation
12
16
 
13
17
  $ gem install ec2-blackout
14
18
 
19
+ It is recommended you create an access policy using Amazon IAM
20
+
21
+ 1. Sign in to your AWS management console and go to the IAM section
22
+ 2. Create a group and paste in the following policy
23
+
24
+ {
25
+ "Statement": [
26
+ {
27
+ "Action": [
28
+ "ec2:StartInstances",
29
+ "ec2:StopInstances",
30
+ "ec2:CreateTags",
31
+ "ec2:DeleteTags",
32
+ "ec2:DescribeInstances",
33
+ "ec2:DescribeRegions"
34
+ ],
35
+ "Effect": "Allow",
36
+ "Resource": "\*"
37
+ }
38
+ ]
39
+ }
40
+
41
+ 3. Create a user account and download the access key.
42
+ 4. Add the user to the previously created group.
43
+
44
+
45
+ Once installed you need to export your AWS credentials
46
+
47
+ export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
48
+ export AWS_SECRET_ACCESS_KEY=YOUR_SECREY_KEY
49
+
15
50
  ## Usage
16
51
 
17
52
  $ ec2-blackout --help
18
53
 
54
+ To run a blackout across all AWS regions:
55
+
56
+ $ ec2-blackout on
57
+
58
+ To run a blackout across a subset of AWS regions:
59
+
60
+ $ ec2-blackout on --regions us-east-1,us-west-1
61
+
62
+ To run a blackout but exclude instances that have been tagged:
63
+
64
+ $ ec2-blackout on --exclude-by-tag do_not_blackout
65
+
66
+ To leave a blackout and start the instances that were previously stopped:
67
+
68
+ $ ec2-blackout off
69
+
70
+ `ec2-blackout` also provides a dry-run using the `--dry-run` option.
71
+
72
+
19
73
  ## Contributing
20
74
 
21
75
  1. Fork it
@@ -12,7 +12,7 @@ def aws
12
12
  :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'])
13
13
  end
14
14
 
15
- DEFAULT_REGIONS = ['us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1', 'ap-southeast-1',
15
+ DEFAULT_REGIONS = ['us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1', 'ap-southeast-1', 'ap-southeast-2',
16
16
  'ap-northeast-1', 'sa-east-1'].join(',')
17
17
 
18
18
  command "on" do |c|
@@ -1,6 +1,6 @@
1
1
  module Ec2
2
2
  module Blackout
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
 
5
5
  def self.name
6
6
  'ec2-blackout'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-blackout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-17 00:00:00.000000000 Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander