elevage 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/README.md +33 -11
- data/elevage.gemspec +15 -15
- data/features/archive +3 -22
- data/features/build.feature +2 -1
- data/features/generate.feature +3 -9
- data/features/health_env_failure.feature +2 -8
- data/features/health_failure.feature +1 -2
- data/features/health_success.feature +3 -9
- data/features/list.feature +3 -9
- data/features/step_definitions/elevage_steps.rb +2 -2
- data/lib/elevage/build.rb +4 -1
- data/lib/elevage/constants.rb +2 -2
- data/lib/elevage/environment.rb +66 -39
- data/lib/elevage/generate.rb +4 -3
- data/lib/elevage/health.rb +4 -0
- data/lib/elevage/new.rb +4 -2
- data/lib/elevage/platform.rb +11 -3
- data/lib/elevage/provisioner.rb +61 -21
- data/lib/elevage/provisionerrunqueue.rb +25 -10
- data/lib/elevage/templates/vcenter.yml.tt +7 -12
- data/lib/elevage/version.rb +1 -1
- data/lib/elevage.rb +5 -0
- metadata +58 -88
- data/.ruby-version +0 -1
- data/.yardoc/checksums +0 -12
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/doc/Elevage/Build.html +0 -435
- data/doc/Elevage/CLI.html +0 -282
- data/doc/Elevage/Environment.html +0 -950
- data/doc/Elevage/Generate.html +0 -346
- data/doc/Elevage/Health.html +0 -359
- data/doc/Elevage/New.html +0 -411
- data/doc/Elevage/Platform.html +0 -1119
- data/doc/Elevage/Provisioner.html +0 -804
- data/doc/Elevage/ProvisionerRunQueue.html +0 -765
- data/doc/Elevage/Runner.html +0 -319
- data/doc/Elevage.html +0 -501
- data/doc/_index.html +0 -239
- data/doc/class_list.html +0 -58
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -339
- data/doc/file.README.html +0 -187
- data/doc/file_list.html +0 -60
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -187
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -181
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -369
- data/doc/top-level-namespace.html +0 -112
data/doc/Elevage/Generate.html
DELETED
@@ -1,346 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Class: Elevage::Generate
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.7.6
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!Elevage/Generate.html";
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../_index.html">Index (G)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../Elevage.html" title="Elevage (module)">Elevage</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">Generate</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Class: Elevage::Generate
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
<dt class="r1">Inherits:</dt>
|
75
|
-
<dd class="r1">
|
76
|
-
<span class="inheritName">Thor::Group</span>
|
77
|
-
|
78
|
-
<ul class="fullTree">
|
79
|
-
<li>Object</li>
|
80
|
-
|
81
|
-
<li class="next">Thor::Group</li>
|
82
|
-
|
83
|
-
<li class="next">Elevage::Generate</li>
|
84
|
-
|
85
|
-
</ul>
|
86
|
-
<a href="#" class="inheritanceTree">show all</a>
|
87
|
-
|
88
|
-
</dd>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dt class="r2">Includes:</dt>
|
96
|
-
<dd class="r2">Thor::Actions</dd>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<dt class="r1 last">Defined in:</dt>
|
103
|
-
<dd class="r1 last">lib/elevage/generate.rb</dd>
|
104
|
-
|
105
|
-
</dl>
|
106
|
-
<div class="clear"></div>
|
107
|
-
|
108
|
-
<h2>Overview</h2><div class="docstring">
|
109
|
-
<div class="discussion">
|
110
|
-
|
111
|
-
<p>Create new environment desired state files from platform template</p>
|
112
|
-
|
113
|
-
|
114
|
-
</div>
|
115
|
-
</div>
|
116
|
-
<div class="tags">
|
117
|
-
|
118
|
-
|
119
|
-
</div>
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
<h2>
|
128
|
-
Class Method Summary
|
129
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
130
|
-
</h2>
|
131
|
-
|
132
|
-
<ul class="summary">
|
133
|
-
|
134
|
-
<li class="public ">
|
135
|
-
<span class="summary_signature">
|
136
|
-
|
137
|
-
<a href="#source_root-class_method" title="source_root (class method)">+ (Object) <strong>source_root</strong> </a>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
</span>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
152
|
-
|
153
|
-
</li>
|
154
|
-
|
155
|
-
|
156
|
-
</ul>
|
157
|
-
|
158
|
-
<h2>
|
159
|
-
Instance Method Summary
|
160
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
161
|
-
</h2>
|
162
|
-
|
163
|
-
<ul class="summary">
|
164
|
-
|
165
|
-
<li class="public ">
|
166
|
-
<span class="summary_signature">
|
167
|
-
|
168
|
-
<a href="#create_environment-instance_method" title="#create_environment (instance method)">- (Object) <strong>create_environment</strong> </a>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
</span>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<span class="summary_desc"><div class='inline'>
|
183
|
-
<p>rubocop:disable MethodLength, CyclomaticComplexity, PerceivedComplexity.</p>
|
184
|
-
</div></span>
|
185
|
-
|
186
|
-
</li>
|
187
|
-
|
188
|
-
|
189
|
-
</ul>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
<div id="class_method_details" class="method_details_list">
|
197
|
-
<h2>Class Method Details</h2>
|
198
|
-
|
199
|
-
|
200
|
-
<div class="method_details first">
|
201
|
-
<h3 class="signature first" id="source_root-class_method">
|
202
|
-
|
203
|
-
+ (<tt>Object</tt>) <strong>source_root</strong>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</h3><table class="source_code">
|
210
|
-
<tr>
|
211
|
-
<td>
|
212
|
-
<pre class="lines">
|
213
|
-
|
214
|
-
|
215
|
-
9
|
216
|
-
10
|
217
|
-
11</pre>
|
218
|
-
</td>
|
219
|
-
<td>
|
220
|
-
<pre class="code"><span class="info file"># File 'lib/elevage/generate.rb', line 9</span>
|
221
|
-
|
222
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_source_root'>source_root</span>
|
223
|
-
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span>
|
224
|
-
<span class='kw'>end</span></pre>
|
225
|
-
</td>
|
226
|
-
</tr>
|
227
|
-
</table>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
</div>
|
231
|
-
|
232
|
-
<div id="instance_method_details" class="method_details_list">
|
233
|
-
<h2>Instance Method Details</h2>
|
234
|
-
|
235
|
-
|
236
|
-
<div class="method_details first">
|
237
|
-
<h3 class="signature first" id="create_environment-instance_method">
|
238
|
-
|
239
|
-
- (<tt>Object</tt>) <strong>create_environment</strong>
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
</h3><div class="docstring">
|
246
|
-
<div class="discussion">
|
247
|
-
|
248
|
-
<p>rubocop:disable MethodLength, CyclomaticComplexity, PerceivedComplexity</p>
|
249
|
-
|
250
|
-
|
251
|
-
</div>
|
252
|
-
</div>
|
253
|
-
<div class="tags">
|
254
|
-
|
255
|
-
|
256
|
-
</div><table class="source_code">
|
257
|
-
<tr>
|
258
|
-
<td>
|
259
|
-
<pre class="lines">
|
260
|
-
|
261
|
-
|
262
|
-
14
|
263
|
-
15
|
264
|
-
16
|
265
|
-
17
|
266
|
-
18
|
267
|
-
19
|
268
|
-
20
|
269
|
-
21
|
270
|
-
22
|
271
|
-
23
|
272
|
-
24
|
273
|
-
25
|
274
|
-
26
|
275
|
-
27
|
276
|
-
28
|
277
|
-
29
|
278
|
-
30
|
279
|
-
31
|
280
|
-
32
|
281
|
-
33
|
282
|
-
34
|
283
|
-
35
|
284
|
-
36
|
285
|
-
37
|
286
|
-
38
|
287
|
-
39
|
288
|
-
40
|
289
|
-
41
|
290
|
-
42
|
291
|
-
43
|
292
|
-
44
|
293
|
-
45</pre>
|
294
|
-
</td>
|
295
|
-
<td>
|
296
|
-
<pre class="code"><span class="info file"># File 'lib/elevage/generate.rb', line 14</span>
|
297
|
-
|
298
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_create_environment'>create_environment</span>
|
299
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>IOError</span><span class='comma'>,</span> <span class='const'>ERR</span><span class='lbracket'>[</span><span class='symbol'>:env_exists</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_file?'>file?</span><span class='lparen'>(</span><span class='const'>ENV_FOLDER</span> <span class='op'>+</span> <span class='id identifier rubyid_env'>env</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.yml</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
300
|
-
<span class='id identifier rubyid_platform'>platform</span> <span class='op'>=</span> <span class='const'>Elevage</span><span class='op'>::</span><span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
301
|
-
<span class='id identifier rubyid_platformfile'>platformfile</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='const'>YML_PLATFORM</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
302
|
-
<span class='comment'>#
|
303
|
-
</span> <span class='comment'># The things from here forward I would rather have in the template file
|
304
|
-
</span> <span class='comment'># but that is even uglier, trying to get formatting correct
|
305
|
-
</span> <span class='comment'># will need to investigate some POWER erb skills to clean this up
|
306
|
-
</span> <span class='ivar'>@env_pools</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
307
|
-
<span class='ivar'>@env_components</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
308
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
309
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span> <span class='kw'>until</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>pools</span><span class='regexp_end'>/</span></span>
|
310
|
-
<span class='id identifier rubyid_platform'>platform</span><span class='period'>.</span><span class='id identifier rubyid_pools'>pools</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid__v'>_v</span><span class='op'>|</span>
|
311
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span> <span class='kw'>until</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
|
312
|
-
<span class='ivar'>@env_pools</span> <span class='op'>+=</span> <span class='id identifier rubyid_line'>line</span>
|
313
|
-
<span class='id identifier rubyid_next_line'>next_line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span>
|
314
|
-
<span class='ivar'>@env_pools</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_next_line'>next_line</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_next_line'>next_line</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><<</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
315
|
-
<span class='ivar'>@env_pools</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> network:\n\n</span><span class='tstring_end'>"</span></span>
|
316
|
-
<span class='kw'>end</span>
|
317
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span> <span class='kw'>until</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>components</span><span class='regexp_end'>/</span></span>
|
318
|
-
<span class='id identifier rubyid_platform'>platform</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
319
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span> <span class='kw'>until</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
|
320
|
-
<span class='ivar'>@env_components</span> <span class='op'>+=</span> <span class='id identifier rubyid_line'>line</span>
|
321
|
-
<span class='id identifier rubyid_next_line'>next_line</span> <span class='op'>=</span> <span class='id identifier rubyid_platformfile'>platformfile</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span>
|
322
|
-
<span class='ivar'>@env_components</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_next_line'>next_line</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_next_line'>next_line</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><<</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
323
|
-
<span class='ivar'>@env_components</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> addresses:\n</span><span class='tstring_end'>"</span></span>
|
324
|
-
<span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>count</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='ivar'>@env_components</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> -\n</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span>
|
325
|
-
<span class='ivar'>@env_components</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
326
|
-
<span class='kw'>end</span>
|
327
|
-
<span class='id identifier rubyid_template'>template</span><span class='lparen'>(</span><span class='const'>TEMPLATE_ENV</span><span class='comma'>,</span> <span class='const'>ENV_FOLDER</span> <span class='op'>+</span> <span class='id identifier rubyid_env'>env</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.yml</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
328
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_env'>env</span><span class='embexpr_end'>}</span><span class='tstring_content'>.yml added in environments folder</span><span class='tstring_end'>"</span></span>
|
329
|
-
<span class='kw'>end</span></pre>
|
330
|
-
</td>
|
331
|
-
</tr>
|
332
|
-
</table>
|
333
|
-
</div>
|
334
|
-
|
335
|
-
</div>
|
336
|
-
|
337
|
-
</div>
|
338
|
-
|
339
|
-
<div id="footer">
|
340
|
-
Generated on Tue Nov 11 17:39:23 2014 by
|
341
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
342
|
-
0.8.7.6 (ruby-2.1.2).
|
343
|
-
</div>
|
344
|
-
|
345
|
-
</body>
|
346
|
-
</html>
|