simple_deploy 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -0
- data/lib/simple_deploy/cli/variables.rb +1 -1
- data/lib/simple_deploy/cli.rb +11 -6
- data/lib/simple_deploy/config.rb +2 -2
- data/lib/simple_deploy/deployment.rb +2 -2
- data/lib/simple_deploy/stack.rb +9 -1
- data/lib/simple_deploy/version.rb +1 -1
- data/simple_deploy.gemspec +1 -1
- metadata +13 -13
data/README.md
CHANGED
@@ -14,6 +14,8 @@ Create a file **~/.simple_deploy.yml** and include within it:
|
|
14
14
|
```
|
15
15
|
deploy:
|
16
16
|
gateway: ADMIN_IP_TO_YOUR_VPC
|
17
|
+
user: SSH_USER_TO_GATEWAY_AND_INSTANCES
|
18
|
+
key: PRIVATE_SSH_KEYFILE_FOR_USER
|
17
19
|
artifacts:
|
18
20
|
- name: live_community_chef_repo
|
19
21
|
bucket_prefix: intu-lc
|
@@ -36,6 +38,13 @@ environments:
|
|
36
38
|
region: us-west-1
|
37
39
|
```
|
38
40
|
|
41
|
+
Configuration File
|
42
|
+
------------------
|
43
|
+
|
44
|
+
The configuration file supports additional optional deployment parameters. Artifacts can have an **endpoint** specified to be passed in (by default they pass in the s3 url).
|
45
|
+
|
46
|
+
Deploy can have a ssh **user** and **key** set. These will be used to connect to both the gateway and tunnel through to instances.
|
47
|
+
|
39
48
|
Commands
|
40
49
|
--------
|
41
50
|
|
@@ -55,6 +64,10 @@ simple_deploy events -n STACK_NAME -e ENVIRONMENT
|
|
55
64
|
simple_deploy resources -n STACK_NAME -e ENVIRONMENT
|
56
65
|
simple_deploy outputs -n STACK_NAME -e ENVIRONMENT
|
57
66
|
simple_deploy template -n STACK_NAME -e ENVIRONMENT
|
67
|
+
|
68
|
+
Attribute pairs are = seperated key value pairs. Multiple can be specified. For example:
|
69
|
+
|
70
|
+
simple_deploy create -t ~/my-template.json -e my-env -n test-stack -a arg1=val1 arg2=vol2
|
58
71
|
```
|
59
72
|
|
60
73
|
For more information, run simple_deploy -h.
|
data/lib/simple_deploy/cli.rb
CHANGED
@@ -22,10 +22,15 @@ simple_deploy events -n STACK_NAME -e ENVIRONMENT
|
|
22
22
|
simple_deploy resources -n STACK_NAME -e ENVIRONMENT
|
23
23
|
simple_deploy outputs -n STACK_NAME -e ENVIRONMENT
|
24
24
|
simple_deploy template -n STACK_NAME -e ENVIRONMENT
|
25
|
+
simple_deploy parameters -n STACK_NAME -e ENVIRONMENT
|
26
|
+
|
27
|
+
Attributes are specified as '=' seperated key value pairs. Multiple can be specified. For example:
|
28
|
+
|
29
|
+
simple_deploy create -t ~/my-template.json -e my-env -n test-stack -a arg1=val1 arg2=vol2
|
25
30
|
|
26
31
|
EOS
|
27
32
|
opt :help, "Display Help"
|
28
|
-
opt :attributes, "CSV list of updates attributes", :type => :
|
33
|
+
opt :attributes, "CSV list of updates attributes", :type => :strings
|
29
34
|
opt :environment, "Set the target environment", :type => :string
|
30
35
|
opt :name, "Stack name to manage", :type => :string
|
31
36
|
opt :template, "Path to the template file", :type => :string
|
@@ -34,7 +39,7 @@ EOS
|
|
34
39
|
@cmd = ARGV.shift
|
35
40
|
|
36
41
|
unless @cmd
|
37
|
-
puts "
|
42
|
+
puts "\nPlease specify a command.\n"
|
38
43
|
exit 1
|
39
44
|
end
|
40
45
|
|
@@ -44,7 +49,7 @@ EOS
|
|
44
49
|
@config = Config.new.environment @opts[:environment]
|
45
50
|
|
46
51
|
unless environment_provided?
|
47
|
-
puts "
|
52
|
+
puts "\nPlease specify an environment.\n\n"
|
48
53
|
Config.new.environments.keys.each { |e| puts e }
|
49
54
|
exit 1
|
50
55
|
end
|
@@ -53,7 +58,7 @@ EOS
|
|
53
58
|
case @cmd
|
54
59
|
when 'create', 'delete', 'deploy', 'destroy', 'instances',
|
55
60
|
'status', 'attributes', 'events', 'resources',
|
56
|
-
'outputs', 'template', 'update'
|
61
|
+
'outputs', 'template', 'update', 'parameters'
|
57
62
|
@stack = Stack.new :environment => @opts[:environment],
|
58
63
|
:name => @opts[:name],
|
59
64
|
:config => @config
|
@@ -80,10 +85,10 @@ EOS
|
|
80
85
|
when 'instances'
|
81
86
|
@stack.instances.each { |s| puts s }
|
82
87
|
when 'list'
|
83
|
-
puts
|
88
|
+
puts Stackster::StackLister.new.all
|
84
89
|
when 'template'
|
85
90
|
jj @stack.template
|
86
|
-
when 'events', 'outputs', 'resources', 'status'
|
91
|
+
when 'events', 'outputs', 'resources', 'status', 'parameters'
|
87
92
|
puts (@stack.send @cmd.to_sym).to_yaml
|
88
93
|
else
|
89
94
|
puts "Unknown command. Use -h for help."
|
data/lib/simple_deploy/config.rb
CHANGED
@@ -56,9 +56,9 @@ module SimpleDeploy
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def ssh_options
|
59
|
-
@logger.info "Setting key to #{@config.
|
59
|
+
@logger.info "Setting key to #{@config.key}." if @config.key
|
60
60
|
{
|
61
|
-
:keys => @config.
|
61
|
+
:keys => @config.key,
|
62
62
|
:paranoid => false
|
63
63
|
}
|
64
64
|
end
|
data/lib/simple_deploy/stack.rb
CHANGED
@@ -57,7 +57,11 @@ module SimpleDeploy
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def instances
|
60
|
-
stack.
|
60
|
+
stack.instances.map do |i|
|
61
|
+
if i['instancesSet'].first['privateIpAddress']
|
62
|
+
i['instancesSet'].first['privateIpAddress']
|
63
|
+
end
|
64
|
+
end
|
61
65
|
end
|
62
66
|
|
63
67
|
def status
|
@@ -68,6 +72,10 @@ module SimpleDeploy
|
|
68
72
|
stack.attributes
|
69
73
|
end
|
70
74
|
|
75
|
+
def parameters
|
76
|
+
stack.parameters
|
77
|
+
end
|
78
|
+
|
71
79
|
def template
|
72
80
|
JSON.parse stack.template
|
73
81
|
end
|
data/simple_deploy.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70176717046820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70176717046820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: capistrano
|
27
|
-
requirement: &
|
27
|
+
requirement: &70176717046380 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,21 +32,21 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70176717046380
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: stackster
|
38
|
-
requirement: &
|
38
|
+
requirement: &70176717045720 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - =
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.2.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70176717045720
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: trollop
|
49
|
-
requirement: &
|
49
|
+
requirement: &70176717045240 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70176717045240
|
58
58
|
description: I am designed to deploy artifacts uploaded by Heirloom
|
59
59
|
email:
|
60
60
|
- brett@weav.net
|
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash:
|
103
|
+
hash: -2471766336351240427
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash:
|
112
|
+
hash: -2471766336351240427
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project: simple_deploy
|
115
115
|
rubygems_version: 1.8.16
|