skewer 0.1.0
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/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +8 -0
- data/.idea/modules.xml +9 -0
- data/.idea/skewer.iml +61 -0
- data/.idea/vcs.xml +7 -0
- data/.rvmrc +2 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +146 -0
- data/LICENSE +13 -0
- data/README.md +77 -0
- data/Rakefile +59 -0
- data/Vagrantfile +5 -0
- data/assets/Gemfile +5 -0
- data/assets/rubygems.sh +39 -0
- data/bin/skewer +101 -0
- data/features/aws.feature +45 -0
- data/features/bootstrapper.feature +14 -0
- data/features/configuration.feature +15 -0
- data/features/delete.feature +22 -0
- data/features/hooks.feature +15 -0
- data/features/interface.feature +61 -0
- data/features/provision.feature +38 -0
- data/features/rackspace.feature +34 -0
- data/features/step_definitions/cucumber_steps.rb +43 -0
- data/features/step_definitions/delete.rb +32 -0
- data/features/support/env.rb +6 -0
- data/features/support/puppetcode/manifests/classes/foobar.pp +4 -0
- data/features/support/puppetcode/manifests/classes/foobroken.pp +4 -0
- data/features/support/puppetcode/manifests/classes/role.pp +3 -0
- data/features/support/puppetcode/manifests/site.pp +2 -0
- data/features/support/puppetcode/modules/foo/manifests/bar.pp +3 -0
- data/features/support/puppetcode/modules/foo/manifests/broken.pp +8 -0
- data/features/support/puppetcode/modules/puppet/manifests/munge.pp +5 -0
- data/features/update.feature +29 -0
- data/lib/aws/node.rb +52 -0
- data/lib/aws/security_group.rb +37 -0
- data/lib/aws/service.rb +21 -0
- data/lib/bootstrapper.rb +112 -0
- data/lib/cli.rb +96 -0
- data/lib/config.rb +67 -0
- data/lib/cuke.rb +26 -0
- data/lib/ersatz/ersatz_node.rb +31 -0
- data/lib/ersatz/ssh_result.rb +15 -0
- data/lib/eucalyptus.rb +15 -0
- data/lib/hooks.rb +22 -0
- data/lib/node.erb +5 -0
- data/lib/node.rb +43 -0
- data/lib/parser.rb +92 -0
- data/lib/puppet.rb +53 -0
- data/lib/puppet_node.rb +26 -0
- data/lib/puppet_runtime_error.rb +6 -0
- data/lib/rackspace/images.rb +25 -0
- data/lib/rackspace/node.rb +60 -0
- data/lib/skewer.rb +13 -0
- data/lib/skewer/version.rb +3 -0
- data/lib/source.rb +54 -0
- data/lib/stub_node.rb +25 -0
- data/lib/util.rb +17 -0
- data/skewer.gemspec +30 -0
- data/spec/aws/node_spec.rb +70 -0
- data/spec/aws/security_group_spec.rb +20 -0
- data/spec/aws/service_spec.rb +31 -0
- data/spec/bootstrapper_spec.rb +116 -0
- data/spec/cli_spec.rb +71 -0
- data/spec/config_spec.rb +68 -0
- data/spec/cuke_spec.rb +46 -0
- data/spec/ersatz_node_spec.rb +9 -0
- data/spec/ersatz_ssh_result_spec.rb +16 -0
- data/spec/hooks_spec.rb +19 -0
- data/spec/logger_spec.rb +22 -0
- data/spec/parser_spec.rb +93 -0
- data/spec/puppet.rb +47 -0
- data/spec/puppet_node_spec.rb +31 -0
- data/spec/rackspace/images_spec.rb +37 -0
- data/spec/rackspace/node_spec.rb +30 -0
- data/spec/source_spec.rb +45 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/support/features/example.feature +9 -0
- data/spec/support/features/step_definitions/example.rb +8 -0
- data/spec/util_spec.rb +27 -0
- metadata +288 -0
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectResources">
|
4
|
+
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.8.7-p352" project-jdk-type="RUBY_SDK" />
|
7
|
+
</project>
|
8
|
+
|
data/.idea/modules.xml
ADDED
data/.idea/skewer.iml
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager">
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
5
|
+
<orderEntry type="inheritedJdk" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntry type="library" scope="PROVIDED" name="Saikuro (v1.1.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
8
|
+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v3.2.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
9
|
+
<orderEntry type="library" scope="PROVIDED" name="archive-tar-minitar (v0.5.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="aruba (v0.4.11, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.0.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.1.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="childprocess (v0.3.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="chronic (v0.3.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="churn (v0.0.13, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="colored (v1.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber (v1.1.9, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="excon (v0.9.6, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.0.11, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="flay (v1.4.3, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="flog (v2.5.3, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="fog (v1.1.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="gherkin (v2.9.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="git (v1.2.5, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="hirb (v0.6.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.6.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="jeweler (v1.8.3, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v1.5.4, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="json_pure (v1.6.5, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="log4r (v1.1.10, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="main (v4.7.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="metric_fu (v2.1.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v1.17.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.0.4, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="net-scp (v1.0.4, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.2.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
40
|
+
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.5.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
41
|
+
<orderEntry type="library" scope="PROVIDED" name="progressbar (v0.10.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
42
|
+
<orderEntry type="library" scope="PROVIDED" name="rails_best_practices (v1.9.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
43
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v0.9.2.2, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
44
|
+
<orderEntry type="library" scope="PROVIDED" name="rcov (v1.0.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
45
|
+
<orderEntry type="library" scope="PROVIDED" name="rdoc (v3.12, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
46
|
+
<orderEntry type="library" scope="PROVIDED" name="reek (v1.2.8, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="roodi (v2.1.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
48
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.8.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
49
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.8.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
50
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.8.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
51
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.8.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
52
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-hmac (v0.4.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
53
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby2ruby (v1.3.1, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
54
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby_parser (v2.0.6, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
55
|
+
<orderEntry type="library" scope="PROVIDED" name="sexp_processor (v3.0.10, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
56
|
+
<orderEntry type="library" scope="PROVIDED" name="syntax (v1.0.0, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
57
|
+
<orderEntry type="library" scope="PROVIDED" name="term-ansicolor (v1.0.7, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
58
|
+
<orderEntry type="library" scope="PROVIDED" name="vagrant (v0.9.7, RVM: ruby-1.8.7-p352) [gem]" level="application" />
|
59
|
+
</component>
|
60
|
+
</module>
|
61
|
+
|
data/.idea/vcs.xml
ADDED
data/.rvmrc
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
skewer (0.0.1)
|
5
|
+
fog (~> 1.1.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
Saikuro (1.1.0)
|
11
|
+
activesupport (3.2.2)
|
12
|
+
i18n (~> 0.6)
|
13
|
+
multi_json (~> 1.0)
|
14
|
+
archive-tar-minitar (0.5.2)
|
15
|
+
aruba (0.4.11)
|
16
|
+
childprocess (>= 0.2.3)
|
17
|
+
cucumber (>= 1.1.1)
|
18
|
+
ffi (>= 1.0.11)
|
19
|
+
rspec (>= 2.7.0)
|
20
|
+
builder (3.0.0)
|
21
|
+
childprocess (0.3.1)
|
22
|
+
ffi (~> 1.0.6)
|
23
|
+
chronic (0.3.0)
|
24
|
+
churn (0.0.13)
|
25
|
+
chronic (>= 0.2.3)
|
26
|
+
hirb
|
27
|
+
json_pure
|
28
|
+
main
|
29
|
+
ruby_parser (~> 2.0.4)
|
30
|
+
sexp_processor (~> 3.0.3)
|
31
|
+
colored (1.2)
|
32
|
+
cucumber (1.1.9)
|
33
|
+
builder (>= 2.1.2)
|
34
|
+
diff-lcs (>= 1.1.2)
|
35
|
+
gherkin (~> 2.9.0)
|
36
|
+
json (>= 1.4.6)
|
37
|
+
term-ansicolor (>= 1.0.6)
|
38
|
+
diff-lcs (1.1.3)
|
39
|
+
erubis (2.7.0)
|
40
|
+
excon (0.9.6)
|
41
|
+
ffi (1.0.11)
|
42
|
+
flay (1.4.3)
|
43
|
+
ruby_parser (~> 2.0)
|
44
|
+
sexp_processor (~> 3.0)
|
45
|
+
flog (2.5.3)
|
46
|
+
ruby_parser (~> 2.0)
|
47
|
+
sexp_processor (~> 3.0)
|
48
|
+
fog (1.1.2)
|
49
|
+
builder
|
50
|
+
excon (~> 0.9.0)
|
51
|
+
formatador (~> 0.2.0)
|
52
|
+
mime-types
|
53
|
+
multi_json (~> 1.0.3)
|
54
|
+
net-scp (~> 1.0.4)
|
55
|
+
net-ssh (>= 2.1.3)
|
56
|
+
nokogiri (~> 1.5.0)
|
57
|
+
ruby-hmac
|
58
|
+
formatador (0.2.1)
|
59
|
+
gherkin (2.9.0)
|
60
|
+
json (>= 1.4.6)
|
61
|
+
git (1.2.5)
|
62
|
+
hirb (0.6.1)
|
63
|
+
i18n (0.6.0)
|
64
|
+
jeweler (1.8.3)
|
65
|
+
bundler (~> 1.0)
|
66
|
+
git (>= 1.2.5)
|
67
|
+
rake
|
68
|
+
rdoc
|
69
|
+
json (1.5.4)
|
70
|
+
json_pure (1.6.5)
|
71
|
+
log4r (1.1.10)
|
72
|
+
main (4.7.1)
|
73
|
+
metric_fu (2.1.1)
|
74
|
+
Saikuro (>= 1.1.0)
|
75
|
+
activesupport (>= 2.0.0)
|
76
|
+
chronic (~> 0.3.0)
|
77
|
+
churn (>= 0.0.7)
|
78
|
+
flay (>= 1.2.1)
|
79
|
+
flog (>= 2.3.0)
|
80
|
+
rails_best_practices (>= 0.6.4)
|
81
|
+
rcov (>= 0.8.3.3)
|
82
|
+
reek (>= 1.2.6)
|
83
|
+
roodi (>= 2.1.0)
|
84
|
+
syntax
|
85
|
+
mime-types (1.17.2)
|
86
|
+
multi_json (1.0.4)
|
87
|
+
net-scp (1.0.4)
|
88
|
+
net-ssh (>= 1.99.1)
|
89
|
+
net-ssh (2.2.2)
|
90
|
+
nokogiri (1.5.0)
|
91
|
+
progressbar (0.10.0)
|
92
|
+
rails_best_practices (1.9.0)
|
93
|
+
activesupport
|
94
|
+
colored
|
95
|
+
erubis
|
96
|
+
i18n
|
97
|
+
progressbar
|
98
|
+
sexp_processor
|
99
|
+
rake (0.9.2.2)
|
100
|
+
rcov (1.0.0)
|
101
|
+
rdoc (3.12)
|
102
|
+
json (~> 1.4)
|
103
|
+
reek (1.2.8)
|
104
|
+
ruby2ruby (~> 1.2)
|
105
|
+
ruby_parser (~> 2.0)
|
106
|
+
sexp_processor (~> 3.0)
|
107
|
+
roodi (2.1.0)
|
108
|
+
ruby_parser
|
109
|
+
rspec (2.8.0)
|
110
|
+
rspec-core (~> 2.8.0)
|
111
|
+
rspec-expectations (~> 2.8.0)
|
112
|
+
rspec-mocks (~> 2.8.0)
|
113
|
+
rspec-core (2.8.0)
|
114
|
+
rspec-expectations (2.8.0)
|
115
|
+
diff-lcs (~> 1.1.2)
|
116
|
+
rspec-mocks (2.8.0)
|
117
|
+
ruby-hmac (0.4.0)
|
118
|
+
ruby2ruby (1.3.1)
|
119
|
+
ruby_parser (~> 2.0)
|
120
|
+
sexp_processor (~> 3.0)
|
121
|
+
ruby_parser (2.0.6)
|
122
|
+
sexp_processor (~> 3.0)
|
123
|
+
sexp_processor (3.0.10)
|
124
|
+
syntax (1.0.0)
|
125
|
+
term-ansicolor (1.0.7)
|
126
|
+
vagrant (0.9.7)
|
127
|
+
archive-tar-minitar (= 0.5.2)
|
128
|
+
childprocess (~> 0.3.1)
|
129
|
+
erubis (~> 2.7.0)
|
130
|
+
i18n (~> 0.6.0)
|
131
|
+
json (~> 1.5.1)
|
132
|
+
log4r (~> 1.1.9)
|
133
|
+
net-scp (~> 1.0.4)
|
134
|
+
net-ssh (~> 2.2.2)
|
135
|
+
|
136
|
+
PLATFORMS
|
137
|
+
ruby
|
138
|
+
|
139
|
+
DEPENDENCIES
|
140
|
+
aruba
|
141
|
+
jeweler
|
142
|
+
metric_fu
|
143
|
+
rcov (~> 1.0.0)
|
144
|
+
rspec
|
145
|
+
skewer!
|
146
|
+
vagrant (~> 0.9.0)
|
data/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2011 The Build Doctor Limited
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
## Introduction
|
2
|
+
|
3
|
+
Skewer is a tool that helps you run Puppet code on arbitrary
|
4
|
+
machines. Skewer can:
|
5
|
+
|
6
|
+
1. Spawn a new virtual machine via a cloud system
|
7
|
+
2. Provision it with puppet code
|
8
|
+
3. Update the puppet code on a machine that you've provisioned already
|
9
|
+
4. Delete it
|
10
|
+
|
11
|
+
Skewer exists because sometimes, a Puppetmaster server isn't needed.
|
12
|
+
If you run a small number of nodes, or simply want to bootstrap
|
13
|
+
cloud nodes, you might like this tool.
|
14
|
+
|
15
|
+
## Design Goals
|
16
|
+
|
17
|
+
At Build Doctor HQ, we love Puppet. We don't love:
|
18
|
+
|
19
|
+
- The overhead of a server when using a small number of nodes
|
20
|
+
- Stale operating system packaging
|
21
|
+
- Rubygems
|
22
|
+
|
23
|
+
We did use Lindsay Holmwood's excellent Rump, but settled on a
|
24
|
+
different approach:
|
25
|
+
|
26
|
+
- We deploy Puppet with Rubygems
|
27
|
+
- We tame rubygems with Bundler
|
28
|
+
- We ensure that bundler works with your operating system.
|
29
|
+
|
30
|
+
Once a server is bootstrapped into existence, your code is rsynced
|
31
|
+
over to the remote machine. An annoyance of previous incarnations was
|
32
|
+
testing changes to systems. So this approach lets you roll out code
|
33
|
+
in any state of development to test on a real system (we recommend
|
34
|
+
that you use Vagrant too, but you can't reproduce every feature of a
|
35
|
+
cloud VM on a Vagrantbox. There's no substute for 19 inches (of
|
36
|
+
rack-mounted hardware).
|
37
|
+
|
38
|
+
## Usage
|
39
|
+
|
40
|
+
`skewer provision` will provision a new node, and `skewer update` will allow
|
41
|
+
you to roll out new changes. Using `skewer delete` you can delete a node
|
42
|
+
already in one of the supported cloud providers.
|
43
|
+
|
44
|
+
To provision, you'll need to have:
|
45
|
+
|
46
|
+
- A fog configuration file to tell skewer how to access your cloud service,
|
47
|
+
- Image information (e.g. AMI id) for the cloud service you want to access
|
48
|
+
- A .skewer file (optional) to store options in, if you don't like
|
49
|
+
the defaults
|
50
|
+
|
51
|
+
To update, you'll need a hostname and a username. We assume that you have access via SSH public key at this stage.
|
52
|
+
|
53
|
+
Supported clouds:
|
54
|
+
|
55
|
+
- AWS (Sorry to be so predictable)
|
56
|
+
- Rackspace
|
57
|
+
|
58
|
+
Supported operating systems:
|
59
|
+
|
60
|
+
- Ubuntu (Hardy onwards)
|
61
|
+
|
62
|
+
## Development
|
63
|
+
|
64
|
+
This is a fully open source project. It's grown up over years as a
|
65
|
+
private project before being re-written with unit and acceptance
|
66
|
+
tests.
|
67
|
+
|
68
|
+
We use rspec, cucumber, aruba and rcov - that's 3 out of 4 from Aslak
|
69
|
+
Hellesoy.
|
70
|
+
|
71
|
+
Pull requests are welcomed!
|
72
|
+
|
73
|
+
To run the cucumber features, you'll need vagrant and virtualbox
|
74
|
+
installed. You'll also need to hack the ssh config in order to allow
|
75
|
+
the cucumber features to hit the vagrant box:
|
76
|
+
|
77
|
+
vagrant ssh_config >> ~/.ssh/config
|
data/Rakefile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
require 'bundler'
|
4
|
+
|
5
|
+
require 'cucumber'
|
6
|
+
require 'cucumber/rake/task'
|
7
|
+
require 'metric_fu'
|
8
|
+
require 'rake'
|
9
|
+
require 'rake/clean'
|
10
|
+
require 'rspec/core/rake_task'
|
11
|
+
require 'vagrant'
|
12
|
+
|
13
|
+
CLEAN.include ['coverage', 'target', '/tmp/skewer_test_code', '/tmp/more_skewer_test_code', '.skewer.json', '/tmp/skewer*']
|
14
|
+
|
15
|
+
RSPEC_PATTERN = 'spec/**/*spec*.rb'
|
16
|
+
|
17
|
+
Bundler::GemHelper.install_tasks
|
18
|
+
|
19
|
+
MetricFu::Configuration.run do |config|
|
20
|
+
#define which metrics you want to use
|
21
|
+
config.metrics = [:saikuro, :flog, :flay, :reek, :roodi]
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "fire up vagrant so we can test the plain ssh update script"
|
25
|
+
task :vagrant_destroy do
|
26
|
+
env = Vagrant::Environment.new
|
27
|
+
env.cli("destroy")
|
28
|
+
end
|
29
|
+
|
30
|
+
task :vagrant_up do
|
31
|
+
env = Vagrant::Environment.new
|
32
|
+
env.cli("up")
|
33
|
+
end
|
34
|
+
|
35
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
36
|
+
t.cucumber_opts = "features --format pretty --tags=~@wip"
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Run all specs"
|
40
|
+
RSpec::Core::RakeTask.new do |t|
|
41
|
+
t.pattern = RSPEC_PATTERN
|
42
|
+
t.rspec_opts = ['-I lib', '--color']
|
43
|
+
end
|
44
|
+
|
45
|
+
desc "Run all specs with rcov"
|
46
|
+
RSpec::Core::RakeTask.new("spec:coverage") do |t|
|
47
|
+
t.rcov = true
|
48
|
+
|
49
|
+
# The matcher *spec*.rb is used to invoke spec_helper.rb.
|
50
|
+
# This makes sure that the RSpec tests get run from within rcov.
|
51
|
+
# See spec/spec_helper.rb for more info.
|
52
|
+
t.pattern = RSPEC_PATTERN
|
53
|
+
|
54
|
+
t.rcov_opts = %w{--include lib -Ispec --exclude gems\/,spec\/,features\/}
|
55
|
+
t.rspec_opts = ["-c"]
|
56
|
+
end
|
57
|
+
|
58
|
+
task :default => [:clean, :spec]
|
59
|
+
task :features => :vagrant_up
|
data/Vagrantfile
ADDED
data/assets/Gemfile
ADDED
data/assets/rubygems.sh
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
# For the love of all you hold dear, edit this in VIM.
|
3
|
+
|
4
|
+
lsbdistcodename=$(grep DISTRIB_CODENAME /etc/lsb-release |cut -d'=' -f2)
|
5
|
+
if [ "$lsbdistcodename" == "hardy" -o "$lsbdistcodename" == "lucid" ]
|
6
|
+
then
|
7
|
+
# indents must be tabs
|
8
|
+
echo "updating system config"
|
9
|
+
cat <<-EOF > /etc/apt/sources.list.d/maverick.list
|
10
|
+
deb http://archive.ubuntu.com/ubuntu/ maverick universe
|
11
|
+
deb http://archive.ubuntu.com/ubuntu/ maverick-updates universe
|
12
|
+
deb http://security.ubuntu.com/ubuntu maverick-security universe
|
13
|
+
EOF
|
14
|
+
|
15
|
+
cat <<-EOF > /etc/apt/preferences.d/maverick
|
16
|
+
APT::Default-Release "${lsbdistcodename}";
|
17
|
+
Package: rubygems1.8
|
18
|
+
Pin: release a=maverick
|
19
|
+
Pin-Priority: 900
|
20
|
+
Package: rubygems
|
21
|
+
Pin: release a=maverick
|
22
|
+
Pin-Priority: 900
|
23
|
+
EOF
|
24
|
+
|
25
|
+
fi
|
26
|
+
|
27
|
+
cat <<-EOF > /etc/profile.d/rubygems.sh
|
28
|
+
#!/bin/bash
|
29
|
+
export GEM_HOME=/var/lib/gems/1.8
|
30
|
+
export GEM_PATH=/var/lib/gems/1.8
|
31
|
+
PATH=\${PATH}:\${GEM_HOME}/bin
|
32
|
+
EOF
|
33
|
+
|
34
|
+
chmod 0755 /etc/profile.d/rubygems.sh
|
35
|
+
. /etc/profile.d/rubygems.sh
|
36
|
+
aptitude update >/dev/null
|
37
|
+
aptitude install -y rsync ruby rubygems libopenssl-ruby ruby-dev build-essential libxml2-dev libxslt-dev
|
38
|
+
gem install bundler --no-rdoc --no-ri
|
39
|
+
gem install json --no-rdoc --no-ri
|