stack-kicker 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +48 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +202 -22
- data/README.md +127 -10
- data/README.rdoc +5 -1
- data/bin/stack-kicker +84 -0
- data/doc/examples/Stackfile +41 -0
- data/features/stack-kicker.feature +27 -0
- data/features/step_definitions/{kicker_steps.rb → stack-kicker_steps.rb} +0 -0
- data/lib/stack-kicker/version.rb +5 -0
- data/lib/stack-kicker.rb +7 -0
- data/lib/stack.rb +733 -158
- data/stack-kicker.gemspec +26 -0
- metadata +37 -27
- data/bin/kicker +0 -77
- data/features/kicker.feature +0 -13
- data/kicker.gemspec +0 -32
- data/lib/kicker/version.rb +0 -3
- data/lib/kicker.rb +0 -5
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'stack-kicker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "stack-kicker"
|
8
|
+
gem.version = Stack::Kicker::VERSION
|
9
|
+
gem.authors = ["Simon McCartney"]
|
10
|
+
gem.email = ["simon.mccartney@hp.com"]
|
11
|
+
gem.description = %q{application stack management tool for OpenStack}
|
12
|
+
gem.summary = %q{applicarion stack management tool for OpenStack that uses stock images & chef-server to kick the instance into shape}
|
13
|
+
gem.homepage = "https://github.com/simonmcc/stack-kicker"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
gem.add_development_dependency('rdoc')
|
20
|
+
gem.add_development_dependency('aruba')
|
21
|
+
gem.add_development_dependency('rake', '~> 0.9.2')
|
22
|
+
gem.add_dependency('methadone', '~> 1.2.4')
|
23
|
+
gem.add_dependency('openstack', '~> 1.0.9')
|
24
|
+
# this is a hack - or potentially dangerous, can we access teh API without installing all of the chef gem?
|
25
|
+
gem.add_dependency('chef', '~> 10.18.2')
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack-kicker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2013-
|
12
|
+
date: 2013-04-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
@@ -76,13 +76,13 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 1.2.4
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: openstack
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
83
|
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
85
|
+
version: 1.0.9
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,31 +90,49 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.
|
94
|
-
|
93
|
+
version: 1.0.9
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: chef
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 10.18.2
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 10.18.2
|
110
|
+
description: application stack management tool for OpenStack
|
95
111
|
email:
|
96
|
-
- simon@
|
112
|
+
- simon.mccartney@hp.com
|
97
113
|
executables:
|
98
|
-
- kicker
|
114
|
+
- stack-kicker
|
99
115
|
extensions: []
|
100
116
|
extra_rdoc_files: []
|
101
117
|
files:
|
102
118
|
- .gitignore
|
119
|
+
- .rvmrc
|
103
120
|
- Gemfile
|
104
121
|
- LICENSE.txt
|
105
122
|
- README.md
|
106
123
|
- README.rdoc
|
107
124
|
- Rakefile
|
108
|
-
- bin/kicker
|
109
|
-
-
|
110
|
-
- features/
|
125
|
+
- bin/stack-kicker
|
126
|
+
- doc/examples/Stackfile
|
127
|
+
- features/stack-kicker.feature
|
128
|
+
- features/step_definitions/stack-kicker_steps.rb
|
111
129
|
- features/support/env.rb
|
112
|
-
- kicker.
|
113
|
-
- lib/kicker.rb
|
114
|
-
- lib/kicker/version.rb
|
130
|
+
- lib/stack-kicker.rb
|
131
|
+
- lib/stack-kicker/version.rb
|
115
132
|
- lib/stack.rb
|
133
|
+
- stack-kicker.gemspec
|
116
134
|
- test/tc_something.rb
|
117
|
-
homepage: https://github.com/simonmcc/kicker
|
135
|
+
homepage: https://github.com/simonmcc/stack-kicker
|
118
136
|
licenses: []
|
119
137
|
post_install_message:
|
120
138
|
rdoc_options: []
|
@@ -137,18 +155,10 @@ rubyforge_project:
|
|
137
155
|
rubygems_version: 1.8.24
|
138
156
|
signing_key:
|
139
157
|
specification_version: 3
|
140
|
-
summary:
|
141
|
-
|
142
|
-
of methods. Supported models include: EC2 Create with user-data, cloud-init from
|
143
|
-
user-data (installs masterless puppet), puppet provision the instance. Other models
|
144
|
-
could include using a puppet master, Chef Solo or Chef Server/Hosted. Amazon EC2
|
145
|
-
interaction is done through fog, so other providers should be easily added. The
|
146
|
-
guiding principle is that your Stackfile should be shareable & re-useable by others,
|
147
|
-
and support templates, so that other users can use the template and easily adjust
|
148
|
-
items in the stack (such as the instance size used, DNS Domain updated during deploy,
|
149
|
-
EC2 account & location)'
|
158
|
+
summary: applicarion stack management tool for OpenStack that uses stock images &
|
159
|
+
chef-server to kick the instance into shape
|
150
160
|
test_files:
|
151
|
-
- features/kicker.feature
|
152
|
-
- features/step_definitions/kicker_steps.rb
|
161
|
+
- features/stack-kicker.feature
|
162
|
+
- features/step_definitions/stack-kicker_steps.rb
|
153
163
|
- features/support/env.rb
|
154
164
|
- test/tc_something.rb
|
data/bin/kicker
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'optparse'
|
4
|
-
require 'methadone'
|
5
|
-
require 'kicker'
|
6
|
-
require 'stack'
|
7
|
-
|
8
|
-
class App
|
9
|
-
include Methadone::Main
|
10
|
-
include Methadone::CLILogging
|
11
|
-
|
12
|
-
main do |stack|
|
13
|
-
config = Stack.load_config(options['configfile'], stack)
|
14
|
-
if config.nil?
|
15
|
-
exit_now!("#{stack} doesn't exist in #{options['configfile']}")
|
16
|
-
end
|
17
|
-
|
18
|
-
if options['show-stack']
|
19
|
-
puts stack
|
20
|
-
hostnames = Stack.generate_hostnames(config)
|
21
|
-
hostnames.each { |hostname| puts " #{hostname}" }
|
22
|
-
end
|
23
|
-
|
24
|
-
if options['show-running']
|
25
|
-
Stack.show_running(config)
|
26
|
-
end
|
27
|
-
|
28
|
-
if options['show-dns']
|
29
|
-
Stack.show_dns(config)
|
30
|
-
end
|
31
|
-
|
32
|
-
if options['show-details']
|
33
|
-
Stack.show_details(config)
|
34
|
-
end
|
35
|
-
|
36
|
-
if options['deploy-all']
|
37
|
-
Stack.deploy_all(config)
|
38
|
-
end
|
39
|
-
|
40
|
-
if options['delete-node']
|
41
|
-
info { "delete-node passed #{options['delete-node']}" }
|
42
|
-
Stack.delete_node(config, options['delete-node'])
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# supplemental methods here
|
47
|
-
|
48
|
-
# Declare command-line interface here
|
49
|
-
|
50
|
-
description "Deploy your stack to the cloud"
|
51
|
-
#
|
52
|
-
# Accept flags via:
|
53
|
-
# on("--flag VAL","Some flag")
|
54
|
-
# on("--flag VAL","Some flag")
|
55
|
-
# options[flag] will contain VAL
|
56
|
-
#
|
57
|
-
# Specify switches via:
|
58
|
-
# on("--[no-]switch","Some switch")
|
59
|
-
|
60
|
-
arg :stack
|
61
|
-
options['configfile'] = 'Stackfile'
|
62
|
-
on("--configfile configfile", "Specify an alternative to ./Stackfile")
|
63
|
-
on("--show-stack", "Show the nodes defined in a stack")
|
64
|
-
on("--show-details", "Show the nodes defined in a stack in detail")
|
65
|
-
on("--show-running", "Show the running nodes")
|
66
|
-
on("--show-dns", "Show the current DNS config")
|
67
|
-
on("--deploy-all", "Deploy the stack, skipping existing nodes")
|
68
|
-
on("--replace-node NODE", "Replace a give node")
|
69
|
-
on("--delete-node NODE", "Destroy a node, including any shared CM & DNS")
|
70
|
-
on("--validate", "Validate the config, check as much as possible with out creating nodes")
|
71
|
-
|
72
|
-
version Kicker::VERSION
|
73
|
-
|
74
|
-
use_log_level_option
|
75
|
-
|
76
|
-
go!
|
77
|
-
end
|
data/features/kicker.feature
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: My bootstrapped app kinda works
|
2
|
-
In order to get going on coding my awesome app
|
3
|
-
I want to have aruba and cucumber setup
|
4
|
-
So I don't have to do it myself
|
5
|
-
|
6
|
-
Scenario: App just runs
|
7
|
-
When I get help for "kicker"
|
8
|
-
Then the exit status should be 0
|
9
|
-
And the banner should be present
|
10
|
-
And the banner should document that this app takes options
|
11
|
-
And the following options should be documented:
|
12
|
-
|--version|
|
13
|
-
And the banner should document that this app takes no arguments
|
data/kicker.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'kicker/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |gem|
|
7
|
-
gem.name = "stack-kicker"
|
8
|
-
gem.version = Kicker::VERSION
|
9
|
-
gem.authors = ["Simon McCartney"]
|
10
|
-
gem.email = ["simon@mccartney.ie"]
|
11
|
-
gem.description = %q{Utility for kicking an application stack into life on Amazon EC2}
|
12
|
-
gem.summary = %q{Stacks are built from a collection of instances required to build an application stack.
|
13
|
-
Each instance is described in the Stackfile & provisioned using variety of methods. Supported models include:
|
14
|
-
EC2 Create with user-data, cloud-init from user-data (installs masterless puppet), puppet provision the instance.
|
15
|
-
|
16
|
-
Other models could include using a puppet master, Chef Solo or Chef Server/Hosted.
|
17
|
-
Amazon EC2 interaction is done through fog, so other providers should be easily added.
|
18
|
-
|
19
|
-
The guiding principle is that your Stackfile should be shareable & re-useable by others, and support templates, so that other users can use the template and easily adjust items in the stack (such as the instance size used, DNS Domain updated during deploy, EC2 account & location)
|
20
|
-
}
|
21
|
-
gem.homepage = "https://github.com/simonmcc/kicker"
|
22
|
-
|
23
|
-
gem.files = `git ls-files`.split($/)
|
24
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
25
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
26
|
-
gem.require_paths = ["lib"]
|
27
|
-
gem.add_development_dependency('rdoc')
|
28
|
-
gem.add_development_dependency('aruba')
|
29
|
-
gem.add_development_dependency('rake', '~> 0.9.2')
|
30
|
-
gem.add_dependency('methadone', '~> 1.2.4')
|
31
|
-
gem.add_dependency('fog', '~> 1.7.0')
|
32
|
-
end
|
data/lib/kicker/version.rb
DELETED