gusteau 0.4.8 → 1.0.0.dev
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/.travis.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/README.md +31 -30
- data/bin/gusteau +14 -13
- data/gusteau.gemspec +4 -1
- data/lib/gusteau.rb +1 -0
- data/lib/gusteau/bureau.rb +32 -20
- data/lib/gusteau/chef.rb +2 -2
- data/lib/gusteau/config.rb +39 -0
- data/lib/gusteau/node.rb +11 -43
- data/lib/gusteau/ssh_config.rb +8 -7
- data/lib/gusteau/vagrant.rb +7 -32
- data/lib/gusteau/version.rb +1 -1
- data/spec/config/gusteau.yml +60 -0
- data/spec/config/remi.yml +29 -0
- data/spec/lib/gusteau/bureau_spec.rb +52 -0
- data/spec/lib/gusteau/compressed_tar_stream_spec.rb +31 -0
- data/spec/lib/gusteau/config_spec.rb +31 -0
- data/spec/lib/gusteau/log_spec.rb +34 -0
- data/spec/lib/gusteau/node_spec.rb +40 -85
- data/spec/lib/gusteau/server_spec.rb +12 -0
- data/spec/lib/gusteau/ssh_config_spec.rb +16 -10
- data/spec/lib/gusteau/ssh_spec.rb +110 -0
- data/spec/lib/gusteau/vagrant_spec.rb +46 -17
- data/spec/spec_helper.rb +11 -0
- data/template/.gusteau.yml.erb +21 -0
- data/template/.kitchen.yml +20 -0
- data/template/Berksfile +3 -3
- data/template/Gemfile +6 -1
- data/template/README.md.erb +70 -0
- data/template/Vagrantfile +12 -4
- data/template/init.sh +27 -0
- data/template/site-cookbooks/cowsay/metadata.rb +10 -0
- data/template/site-cookbooks/cowsay/recipes/default.rb +1 -3
- data/template/site-cookbooks/platform/metadata.rb +14 -0
- data/template/site-cookbooks/platform/recipes/default.rb +3 -0
- data/template/test/integration/data_bags/users/remi.json +7 -0
- data/template/test/integration/default/serverspec/localhost/cowsay_spec.rb +5 -0
- data/template/test/integration/default/serverspec/localhost/platform_spec.rb +25 -0
- data/template/test/integration/default/serverspec/spec_helper.rb +9 -0
- metadata +81 -17
- data/bootstrap/centos.sh +0 -17
- data/bootstrap/redhat.sh +0 -17
- data/bootstrap/ubuntu.sh +0 -17
- data/spec/nodes/development.yml +0 -17
- data/spec/nodes/production.yml +0 -18
- data/spec/nodes/staging.yml +0 -12
- data/template/nodes/example.yml.erb +0 -19
- data/template/roles/platform.rb +0 -8
data/template/Vagrantfile
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
# vi:ft=ruby:
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
%W(
|
4
|
+
vagrant-omnibus
|
5
|
+
gusteau
|
6
|
+
).each { |p| Vagrant.require_plugin(p) }
|
6
7
|
|
7
|
-
|
8
|
+
require 'gusteau'
|
9
|
+
|
10
|
+
Vagrant.configure('2') do |config|
|
11
|
+
config.omnibus.chef_version = '11.4.4'
|
12
|
+
|
13
|
+
Gusteau::Vagrant.detect(config) do |setup|
|
14
|
+
setup.defaults.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-13.04_provisionerless.box'
|
15
|
+
end
|
8
16
|
end
|
data/template/init.sh
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "Installing gem dependencies"
|
4
|
+
bundle
|
5
|
+
|
6
|
+
echo "Downloading cookbooks"
|
7
|
+
bundle exec berks install --path ./cookbooks
|
8
|
+
|
9
|
+
if [ ! $(vagrant -v | cut -f3 -d ' ' | cut -f2 -d '.') = "2" ]; then
|
10
|
+
echo "Sorry, 'gusteau init' only works with Vagrant 1.2.x"
|
11
|
+
exit 1
|
12
|
+
fi
|
13
|
+
|
14
|
+
vagrant_boxes_dir="~/.vagrant.d/boxes"
|
15
|
+
if [ -d "$vagrant_boxes_dir/opscode-ubuntu-13.04" ] &&
|
16
|
+
[ ! -d "$vagrant_boxes_dir/example-box"]; then
|
17
|
+
|
18
|
+
echo "Found the opscode-ubuntu-13.04 box, creating a copy"
|
19
|
+
cp -R "$vagrant_boxes_dir/{opscode-ubuntu-13.04,example-box}"
|
20
|
+
fi
|
21
|
+
|
22
|
+
echo "Installing Vagrant plugins"
|
23
|
+
vagrant plugin install vagrant-omnibus
|
24
|
+
vagrant plugin install gusteau
|
25
|
+
|
26
|
+
echo "Done!"
|
27
|
+
echo "You can now run 'vagrant up' and then 'gusteau converge example-box'"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
name 'platform'
|
2
|
+
maintainer 'Vasily Mikhaylichenko'
|
3
|
+
maintainer_email 'vasily@locomote.com.au'
|
4
|
+
license 'BSD'
|
5
|
+
description 'Base OS configuration'
|
6
|
+
version '1.0.0'
|
7
|
+
|
8
|
+
%w{ ubuntu debian }.each do |os|
|
9
|
+
supports os
|
10
|
+
end
|
11
|
+
|
12
|
+
depends 'apt'
|
13
|
+
depends 'build-essential'
|
14
|
+
depends 'user'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'platform role' do
|
4
|
+
|
5
|
+
describe 'build-essential' do
|
6
|
+
describe package('build-essential') do
|
7
|
+
it { should be_installed }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe command('gcc -v') do
|
11
|
+
it { should return_exit_status 0 }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe command('make -v') do
|
15
|
+
it { should return_exit_status 0 }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe user('remi') do
|
20
|
+
it { should exist }
|
21
|
+
it { should belong_to_group 'wheel' }
|
22
|
+
it { should have_login_shell '/bin/bash' }
|
23
|
+
it { should have_authorized_key 'ABC123' }
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gusteau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0.dev
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Vasily Mikhaylichenko
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: optitron
|
@@ -76,6 +76,22 @@ dependencies:
|
|
76
76
|
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: hash-deep-merge
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :runtime
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
79
95
|
- !ruby/object:Gem::Dependency
|
80
96
|
name: net-ssh
|
81
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,7 +156,39 @@ dependencies:
|
|
140
156
|
- - ! '>='
|
141
157
|
- !ruby/object:Gem::Version
|
142
158
|
version: '0'
|
143
|
-
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: simplecov
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
type: :development
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ! '>='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: coveralls
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
|
+
requirements:
|
180
|
+
- - ! '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
type: :development
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ! '>='
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '0'
|
191
|
+
description: Chef Solo wrapper and configuration manager
|
144
192
|
email:
|
145
193
|
- vasily@locomote.com
|
146
194
|
- chris@locomote.com
|
@@ -152,23 +200,22 @@ extra_rdoc_files: []
|
|
152
200
|
files:
|
153
201
|
- .gitignore
|
154
202
|
- .travis.yml
|
203
|
+
- CHANGELOG.md
|
155
204
|
- Gemfile
|
156
205
|
- LICENSE.md
|
157
206
|
- README.md
|
158
207
|
- Rakefile
|
159
208
|
- bin/gusteau
|
160
209
|
- bin/gusteau_ssh_expect
|
161
|
-
- bootstrap/centos.sh
|
162
210
|
- bootstrap/gentoo.sh
|
163
211
|
- bootstrap/omnibus.sh
|
164
|
-
- bootstrap/redhat.sh
|
165
212
|
- bootstrap/solo.rb
|
166
|
-
- bootstrap/ubuntu.sh
|
167
213
|
- gusteau.gemspec
|
168
214
|
- lib/gusteau.rb
|
169
215
|
- lib/gusteau/bureau.rb
|
170
216
|
- lib/gusteau/chef.rb
|
171
217
|
- lib/gusteau/compressed_tar_stream.rb
|
218
|
+
- lib/gusteau/config.rb
|
172
219
|
- lib/gusteau/erb.rb
|
173
220
|
- lib/gusteau/log.rb
|
174
221
|
- lib/gusteau/node.rb
|
@@ -177,24 +224,37 @@ files:
|
|
177
224
|
- lib/gusteau/ssh_config.rb
|
178
225
|
- lib/gusteau/vagrant.rb
|
179
226
|
- lib/gusteau/version.rb
|
227
|
+
- spec/config/gusteau.yml
|
228
|
+
- spec/config/remi.yml
|
229
|
+
- spec/lib/gusteau/bureau_spec.rb
|
180
230
|
- spec/lib/gusteau/chef_spec.rb
|
231
|
+
- spec/lib/gusteau/compressed_tar_stream_spec.rb
|
232
|
+
- spec/lib/gusteau/config_spec.rb
|
233
|
+
- spec/lib/gusteau/log_spec.rb
|
181
234
|
- spec/lib/gusteau/node_spec.rb
|
182
235
|
- spec/lib/gusteau/server_spec.rb
|
183
236
|
- spec/lib/gusteau/ssh_config_spec.rb
|
237
|
+
- spec/lib/gusteau/ssh_spec.rb
|
184
238
|
- spec/lib/gusteau/vagrant_spec.rb
|
185
|
-
- spec/nodes/development.yml
|
186
|
-
- spec/nodes/production.yml
|
187
|
-
- spec/nodes/staging.yml
|
188
239
|
- spec/spec_helper.rb
|
189
240
|
- template/.gitignore
|
241
|
+
- template/.gusteau.yml.erb
|
242
|
+
- template/.kitchen.yml
|
190
243
|
- template/Berksfile
|
191
244
|
- template/Gemfile
|
245
|
+
- template/README.md.erb
|
192
246
|
- template/Vagrantfile
|
193
247
|
- template/data_bags/users/user.json.erb
|
194
|
-
- template/
|
195
|
-
- template/roles/platform.rb
|
248
|
+
- template/init.sh
|
196
249
|
- template/site-cookbooks/cowsay/attributes/default.rb
|
250
|
+
- template/site-cookbooks/cowsay/metadata.rb
|
197
251
|
- template/site-cookbooks/cowsay/recipes/default.rb
|
252
|
+
- template/site-cookbooks/platform/metadata.rb
|
253
|
+
- template/site-cookbooks/platform/recipes/default.rb
|
254
|
+
- template/test/integration/data_bags/users/remi.json
|
255
|
+
- template/test/integration/default/serverspec/localhost/cowsay_spec.rb
|
256
|
+
- template/test/integration/default/serverspec/localhost/platform_spec.rb
|
257
|
+
- template/test/integration/default/serverspec/spec_helper.rb
|
198
258
|
homepage: http://gusteau.gs
|
199
259
|
licenses: []
|
200
260
|
post_install_message:
|
@@ -210,9 +270,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
270
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
271
|
none: false
|
212
272
|
requirements:
|
213
|
-
- - ! '
|
273
|
+
- - ! '>'
|
214
274
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
275
|
+
version: 1.3.1
|
216
276
|
requirements: []
|
217
277
|
rubyforge_project:
|
218
278
|
rubygems_version: 1.8.23
|
@@ -220,12 +280,16 @@ signing_key:
|
|
220
280
|
specification_version: 3
|
221
281
|
summary: Making servers provisioning enjoyable since 2013.
|
222
282
|
test_files:
|
283
|
+
- spec/config/gusteau.yml
|
284
|
+
- spec/config/remi.yml
|
285
|
+
- spec/lib/gusteau/bureau_spec.rb
|
223
286
|
- spec/lib/gusteau/chef_spec.rb
|
287
|
+
- spec/lib/gusteau/compressed_tar_stream_spec.rb
|
288
|
+
- spec/lib/gusteau/config_spec.rb
|
289
|
+
- spec/lib/gusteau/log_spec.rb
|
224
290
|
- spec/lib/gusteau/node_spec.rb
|
225
291
|
- spec/lib/gusteau/server_spec.rb
|
226
292
|
- spec/lib/gusteau/ssh_config_spec.rb
|
293
|
+
- spec/lib/gusteau/ssh_spec.rb
|
227
294
|
- spec/lib/gusteau/vagrant_spec.rb
|
228
|
-
- spec/nodes/development.yml
|
229
|
-
- spec/nodes/production.yml
|
230
|
-
- spec/nodes/staging.yml
|
231
295
|
- spec/spec_helper.rb
|
data/bootstrap/centos.sh
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
install_sh="https://www.opscode.com/chef/install.sh"
|
4
|
-
version="11.4.4"
|
5
|
-
|
6
|
-
if type -p chef-solo > /dev/null; then
|
7
|
-
echo "Using chef-solo $(chef-solo --v | awk '{print $2}') at $(which chef-solo)"
|
8
|
-
else
|
9
|
-
if command -v curl &>/dev/null; then
|
10
|
-
curl -L "$install_sh" | sudo bash -s -- -v "$version"
|
11
|
-
elif command -v wget &>/dev/null; then
|
12
|
-
wget -qO- "$install_sh" | sudo bash -s -- -v "$version"
|
13
|
-
else
|
14
|
-
echo "Neither wget nor curl found. Please install one." >&2
|
15
|
-
exit 1
|
16
|
-
fi
|
17
|
-
fi
|
data/bootstrap/redhat.sh
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
install_sh="https://www.opscode.com/chef/install.sh"
|
4
|
-
version="11.4.4"
|
5
|
-
|
6
|
-
if type -p chef-solo > /dev/null; then
|
7
|
-
echo "Using chef-solo $(chef-solo --v | awk '{print $2}') at $(which chef-solo)"
|
8
|
-
else
|
9
|
-
if command -v curl &>/dev/null; then
|
10
|
-
curl -L "$install_sh" | sudo bash -s -- -v "$version"
|
11
|
-
elif command -v wget &>/dev/null; then
|
12
|
-
wget -qO- "$install_sh" | sudo bash -s -- -v "$version"
|
13
|
-
else
|
14
|
-
echo "Neither wget nor curl found. Please install one." >&2
|
15
|
-
exit 1
|
16
|
-
fi
|
17
|
-
fi
|
data/bootstrap/ubuntu.sh
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
install_sh="https://www.opscode.com/chef/install.sh"
|
4
|
-
version="11.4.4"
|
5
|
-
|
6
|
-
if type -p chef-solo > /dev/null; then
|
7
|
-
echo "Using chef-solo $(chef-solo --v | awk '{print $2}') at $(which chef-solo)"
|
8
|
-
else
|
9
|
-
if command -v curl &>/dev/null; then
|
10
|
-
curl -L "$install_sh" | sudo bash -s -- -v "$version"
|
11
|
-
elif command -v wget &>/dev/null; then
|
12
|
-
wget -qO- "$install_sh" | sudo bash -s -- -v "$version"
|
13
|
-
else
|
14
|
-
echo "Neither wget nor curl found. Please install one." >&2
|
15
|
-
exit 1
|
16
|
-
fi
|
17
|
-
fi
|
data/spec/nodes/development.yml
DELETED
data/spec/nodes/production.yml
DELETED
data/spec/nodes/staging.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
json:
|
2
|
-
net:
|
3
|
-
IP: 33.33.33.10
|
4
|
-
users:
|
5
|
-
- <%= @login %>
|
6
|
-
cowsay:
|
7
|
-
greeting: "Good job, <%= @login %>!"
|
8
|
-
|
9
|
-
roles:
|
10
|
-
- platform
|
11
|
-
|
12
|
-
recipes:
|
13
|
-
- cowsay
|
14
|
-
|
15
|
-
server:
|
16
|
-
host: 33.33.33.10
|
17
|
-
user: vagrant
|
18
|
-
password: vagrant
|
19
|
-
platform: ubuntu
|