cluster_chef-knife 3.0.8 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -212,8 +212,7 @@ to the chef server. (see below for details).
212
212
  Hooray! You're ready to launch a cluster:
213
213
 
214
214
  ```ruby
215
- knife cluster launch demosimple homebase --bootstrap
216
- </pre>
215
+ knife cluster launch demosimple homebase --bootstrap```
217
216
 
218
217
  It will kick off a node and then bootstrap it. You'll see it install a whole bunch of things. Yay.
219
218
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.8
1
+ 3.0.9
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cluster_chef-knife"
8
- s.version = "3.0.8"
8
+ s.version = "3.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2011-12-14"
12
+ s.date = "2011-12-16"
13
13
  s.description = "cluster_chef allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -1,4 +1,4 @@
1
- bash -c '
1
+ bash <<EOF || echo "Chef bootstrap failed!"
2
2
 
3
3
  # This is the ubuntu-10.04-cluster_chef script from infochimps, which
4
4
  # is based on the ubuntu-10.04-gems script from opscode, but it
@@ -21,7 +21,7 @@ export DEBIAN_FRONTEND=noninteractive
21
21
 
22
22
  # source for sun java if you want to install it later
23
23
  apt-get install -y python-software-properties
24
- add-apt-repository ppa:ferramroberto/java
24
+ add-apt-repository -y ppa:ferramroberto/java
25
25
  apt-get -y update
26
26
 
27
27
  if [ ! -f /usr/bin/chef-client ]; then
@@ -34,9 +34,14 @@ apt-get install -y build-essential wget ruby1.9.1 ruby1.9.1-dev runit zlib1g-dev
34
34
 
35
35
  if ruby -e "exit(%x{gem --version} < \"1.6.2\" ? 0 : -1 )" ; then
36
36
  echo -e "`date` \n\n**** \n**** Updating rubygems:\n****\n"
37
- gem update --system
37
+ # screw you Debian
38
+ REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
38
39
  # screw you rubygems
39
- for foo in /usr/lib/ruby/site_ruby/*/rubygems/deprecate.rb ; do sudo sed -i.bak 's!@skip ||= false!true!' "$foo" ; done
40
+ for foo in /usr/lib/ruby/site_ruby/*/rubygems/deprecate.rb
41
+ do
42
+ # Don't have to be any such deprecations, in which case $foo won't exist
43
+ [ -f "$foo" ] && sudo sed -i.bak 's!@skip ||= false!true!' "$foo"
44
+ done
40
45
  fi
41
46
 
42
47
  echo -e "`date` \n\n**** \n**** Installing chef:\n****\n"
@@ -96,19 +101,19 @@ EOP
96
101
  echo -e "`date` \n\n**** \n**** Adding chef client runit scripts:\n****\n"
97
102
  (service chef-client stop >/dev/null 2>&1 ; sleep 1 ; killall chef-client 2>/dev/null) || true
98
103
  mkdir -p /var/log/chef /var/chef /etc/service /etc/sv/chef-client/{log/main,supervise}
99
- cat > /etc/sv/chef-client/log/run <<EOF
104
+ cat > /etc/sv/chef-client/log/run <<EOP
100
105
  #!/bin/bash
101
106
  exec svlogd -tt ./main
102
- EOF
103
- cat > /etc/sv/chef-client/run <<EOF
107
+ EOP
108
+ cat > /etc/sv/chef-client/run <<EOP
104
109
  #!/bin/bash
105
110
  exec 2>&1
106
111
  exec /usr/bin/env chef-client -i 43200 -s 20 -L /var/log/chef/client.log
107
- EOF
112
+ EOP
108
113
  chmod +x /etc/sv/chef-client/log/run /etc/sv/chef-client/run
109
114
  ln -nfs /usr/bin/sv /etc/init.d/chef-client
110
115
 
111
- service chef-client stop || true
116
+ service chef-client stop >/dev/null 2>&1 || true
112
117
 
113
118
  <%- if (@config[:bootstrap_runs_chef_client].to_s == 'true') || (@chef_config.knife[:bootstrap_runs_chef_client].to_s == 'true') %>
114
119
  echo -e "`date` \n\n**** \n**** First run of chef:\n****\n"
@@ -125,4 +130,4 @@ ln -nfs /etc/sv/chef-client /etc/service/chef-client
125
130
  service chef-client start
126
131
 
127
132
  echo -e "`date` \n\n**** \n**** Cluster Chef client bootstrap complete\n****\n"
128
- ' || echo "Chef bootstrap failed!"
133
+ EOF
@@ -116,14 +116,18 @@ class Chef
116
116
  # Wait for node creation on amazon side
117
117
  server.fog_server.wait_for{ ready? }
118
118
 
119
- # Attach volumes, etc
120
- server.sync_to_cloud
121
-
122
119
  # Try SSH
123
120
  unless config[:dry_run]
124
121
  nil until tcp_test_ssh(server.fog_server.dns_name){ sleep @initial_sleep_delay ||= 10 }
125
122
  end
126
123
 
124
+ # Make sure our list of volumes is accurate
125
+ ClusterChef.fetch_fog_volumes
126
+ server.discover_volumes!
127
+
128
+ # Attach volumes, etc
129
+ server.sync_to_cloud
130
+
127
131
  # Run Bootstrap
128
132
  if config[:bootstrap]
129
133
  run_bootstrap(server, server.fog_server.dns_name)
@@ -24,7 +24,7 @@ class Chef
24
24
  include ClusterChef::KnifeCommon
25
25
 
26
26
  deps do
27
- ClusterChef::KnifeCommon.load_deps
27
+ require 'formatador'
28
28
  end
29
29
 
30
30
  banner "knife cluster list (options)"
@@ -4,7 +4,6 @@ module ClusterChef
4
4
  module KnifeCommon
5
5
 
6
6
  def self.load_deps
7
- require 'readline'
8
7
  require 'formatador'
9
8
  require 'chef/node'
10
9
  require 'chef/api_client'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cluster_chef-knife
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
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: 2011-12-14 00:00:00.000000000 Z
12
+ date: 2011-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &70174880466240 !ruby/object:Gem::Requirement
16
+ requirement: &70343609384260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70174880466240
24
+ version_requirements: *70343609384260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fog
27
- requirement: &70174880464680 !ruby/object:Gem::Requirement
27
+ requirement: &70343609383380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70174880464680
35
+ version_requirements: *70343609383380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: formatador
38
- requirement: &70174880479940 !ruby/object:Gem::Requirement
38
+ requirement: &70343609382760 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70174880479940
46
+ version_requirements: *70343609382760
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: gorillib
49
- requirement: &70174880477380 !ruby/object:Gem::Requirement
49
+ requirement: &70343609397920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.1.7
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70174880477380
57
+ version_requirements: *70343609397920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70174880475480 !ruby/object:Gem::Requirement
60
+ requirement: &70343609396860 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70174880475480
68
+ version_requirements: *70343609396860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &70174880473820 !ruby/object:Gem::Requirement
71
+ requirement: &70343609395620 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.6'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70174880473820
79
+ version_requirements: *70343609395620
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70174880472800 !ruby/object:Gem::Requirement
82
+ requirement: &70343609393700 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '2.5'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70174880472800
90
+ version_requirements: *70343609393700
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: yard
93
- requirement: &70174880488500 !ruby/object:Gem::Requirement
93
+ requirement: &70343609392020 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0.6'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70174880488500
101
+ version_requirements: *70343609392020
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: configliere
104
- requirement: &70174880487740 !ruby/object:Gem::Requirement
104
+ requirement: &70343609391160 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 0.4.8
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70174880487740
112
+ version_requirements: *70343609391160
113
113
  description: cluster_chef allows you to orchestrate not just systems but clusters
114
114
  of machines. It includes a powerful layer on top of knife and a collection of cloud
115
115
  cookbooks.
@@ -176,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  segments:
178
178
  - 0
179
- hash: -3376503058401634367
179
+ hash: -900538870253244074
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  none: false
182
182
  requirements: