elevage 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +21 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/.simplecov +8 -0
- data/.travis.yml +3 -0
- data/.yardoc/checksums +12 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +4 -0
- data/Guardfile +10 -0
- data/LICENSE.txt +203 -0
- data/README.md +112 -0
- data/Rakefile +20 -0
- data/bin/elevage +4 -0
- data/coverage/.resultset.json.lock +0 -0
- data/doc/Elevage/Build.html +435 -0
- data/doc/Elevage/CLI.html +282 -0
- data/doc/Elevage/Environment.html +950 -0
- data/doc/Elevage/Generate.html +346 -0
- data/doc/Elevage/Health.html +359 -0
- data/doc/Elevage/New.html +411 -0
- data/doc/Elevage/Platform.html +1119 -0
- data/doc/Elevage/Provisioner.html +804 -0
- data/doc/Elevage/ProvisionerRunQueue.html +765 -0
- data/doc/Elevage/Runner.html +319 -0
- data/doc/Elevage.html +501 -0
- data/doc/_index.html +239 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +187 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +187 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +369 -0
- data/doc/top-level-namespace.html +112 -0
- data/elevage.gemspec +39 -0
- data/features/archive +314 -0
- data/features/build.feature +237 -0
- data/features/elevage.feature +24 -0
- data/features/generate.feature +235 -0
- data/features/health_env_failure.feature +292 -0
- data/features/health_failure.feature +291 -0
- data/features/health_success.feature +279 -0
- data/features/list.feature +315 -0
- data/features/new.feature +68 -0
- data/features/step_definitions/elevage_steps.rb +27 -0
- data/features/support/env.rb +9 -0
- data/lib/elevage/build.rb +109 -0
- data/lib/elevage/constants.rb +113 -0
- data/lib/elevage/environment.rb +223 -0
- data/lib/elevage/generate.rb +48 -0
- data/lib/elevage/health.rb +27 -0
- data/lib/elevage/new.rb +30 -0
- data/lib/elevage/platform.rb +105 -0
- data/lib/elevage/provisioner.rb +169 -0
- data/lib/elevage/provisionerrunqueue.rb +114 -0
- data/lib/elevage/runner.rb +39 -0
- data/lib/elevage/templates/compute.yml.tt +18 -0
- data/lib/elevage/templates/environment.yml.tt +20 -0
- data/lib/elevage/templates/network.yml.tt +16 -0
- data/lib/elevage/templates/platform.yml.tt +110 -0
- data/lib/elevage/templates/vcenter.yml.tt +77 -0
- data/lib/elevage/version.rb +4 -0
- data/lib/elevage.rb +45 -0
- data/spec/spec_helper.rb +4 -0
- metadata +357 -0
@@ -0,0 +1,112 @@
|
|
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
|
+
Top Level Namespace
|
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#!top-level-namespace.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</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Top Level Namespace</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>Top Level Namespace
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
</dl>
|
82
|
+
<div class="clear"></div>
|
83
|
+
|
84
|
+
<h2>Defined Under Namespace</h2>
|
85
|
+
<p class="children">
|
86
|
+
|
87
|
+
|
88
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Elevage.html" title="Elevage (module)">Elevage</a></span>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
</p>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="footer">
|
106
|
+
Generated on Tue Nov 11 17:39:22 2014 by
|
107
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
|
+
0.8.7.6 (ruby-2.1.2).
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
data/elevage.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# rubocop:disable all
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'elevage/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'elevage'
|
9
|
+
spec.version = Elevage::VERSION
|
10
|
+
spec.authors = ['Nic Cheneweth','Gregory Ruiz-ade']
|
11
|
+
spec.email = ['Nic.Cheneweth@activenetwork.com','gregory.ruiz-ade@activenetwork.com']
|
12
|
+
spec.summary = 'vSphere provisioning'
|
13
|
+
spec.description = 'Command line tool to automate the provision and bootstrap of chef managed nodes, tiers, pools, and whole environments in vSphere'
|
14
|
+
spec.homepage = ''
|
15
|
+
spec.license = 'Apache 2.0'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency('rake')
|
24
|
+
spec.add_development_dependency('yard')
|
25
|
+
spec.add_development_dependency('aruba')
|
26
|
+
spec.add_development_dependency('cucumber')
|
27
|
+
spec.add_development_dependency('psych')
|
28
|
+
spec.add_development_dependency('rspec')
|
29
|
+
spec.add_development_dependency('guard')
|
30
|
+
spec.add_development_dependency('guard-rubocop')
|
31
|
+
spec.add_development_dependency('growl')
|
32
|
+
spec.add_development_dependency('coveralls')
|
33
|
+
spec.add_development_dependency('chef')
|
34
|
+
spec.add_development_dependency('knife-vsphere')
|
35
|
+
spec.add_dependency('thor')
|
36
|
+
spec.add_dependency('open4')
|
37
|
+
spec.add_dependency('english')
|
38
|
+
end
|
39
|
+
# rubocop:enable all
|
data/features/archive
ADDED
@@ -0,0 +1,314 @@
|
|
1
|
+
Scenario: Guard full called will configured files in healthy state
|
2
|
+
|
3
|
+
Given a file named "platform.yml" with:
|
4
|
+
"""
|
5
|
+
? "%YAML 1.2"
|
6
|
+
platform:
|
7
|
+
name: AW
|
8
|
+
description: 'ActiveWorks platform - includes markets'
|
9
|
+
|
10
|
+
environments:
|
11
|
+
- int
|
12
|
+
- prod
|
13
|
+
|
14
|
+
tiers:
|
15
|
+
- Web
|
16
|
+
- App
|
17
|
+
|
18
|
+
nodenameconvention:
|
19
|
+
- environment
|
20
|
+
- '-'
|
21
|
+
- component
|
22
|
+
- '-'
|
23
|
+
- instance
|
24
|
+
- geo1
|
25
|
+
|
26
|
+
pool:
|
27
|
+
|
28
|
+
webvmdefaults: &webvmdefaults
|
29
|
+
count: 2
|
30
|
+
tier: Web
|
31
|
+
image: 'aw-nonprod-oel6_20130815'
|
32
|
+
compute: nonprodweb
|
33
|
+
|
34
|
+
appvmdefaults: &appvmdefaults
|
35
|
+
<<: *webvmdefaults
|
36
|
+
tier: App
|
37
|
+
compute: nonprodapp
|
38
|
+
|
39
|
+
|
40
|
+
components:
|
41
|
+
|
42
|
+
#---------------------------------------------- Web tier
|
43
|
+
|
44
|
+
api:
|
45
|
+
<<: *webvmdefaults
|
46
|
+
port: 8080
|
47
|
+
|
48
|
+
cui:
|
49
|
+
<<: *webvmdefaults
|
50
|
+
port: 8082
|
51
|
+
|
52
|
+
terracotta:
|
53
|
+
<<: *webvmdefaults
|
54
|
+
port: 0000
|
55
|
+
compute: nonprodtc
|
56
|
+
image: 'aw-nonprod-oel6-32g_20130815'
|
57
|
+
|
58
|
+
#---------------------------------------------- App tier
|
59
|
+
|
60
|
+
email:
|
61
|
+
<<: *appvmdefaults
|
62
|
+
port: 8130
|
63
|
+
|
64
|
+
mq:
|
65
|
+
<<: *appvmdefaults
|
66
|
+
port: 1234
|
67
|
+
compute: nonprodmq
|
68
|
+
image: 'aw-nonprod-oel6-32g_20130815'
|
69
|
+
"""
|
70
|
+
Given a file named "infrastructure/vcenter.yml" with:
|
71
|
+
"""
|
72
|
+
? "%YAML 1.2"
|
73
|
+
vcenter:
|
74
|
+
name: AW
|
75
|
+
|
76
|
+
nonprod: &vcenter
|
77
|
+
geo: west
|
78
|
+
timezone: 085
|
79
|
+
|
80
|
+
host: 'vcwest.active.tan'
|
81
|
+
datacenter: 'WCDC NonProd'
|
82
|
+
imagefolder: 'Corporate - o4/Platform Services - o4.m7/Templates'
|
83
|
+
destfolder: 'Corporate - o4/Platform Services - o4.m7/AW Platform - o4.m7.p159'
|
84
|
+
resourcepool: 'App-Web Linux/Corporate - o4'
|
85
|
+
appendenv: true
|
86
|
+
appenddomain: true
|
87
|
+
datastores:
|
88
|
+
- NonProd_Cor_PlaSer_25_111
|
89
|
+
- NonProd_Cor_PlaSer_26_111
|
90
|
+
- NonProd_Cor_PlaSer_38_111
|
91
|
+
- NonProd_Cor_PlaSer_39_111
|
92
|
+
- NonProd_Cor_PlaSer_40_111
|
93
|
+
- NonProd_Cor_PlaSer_41_111
|
94
|
+
|
95
|
+
domain: dev.activenetwork.com
|
96
|
+
dnsips:
|
97
|
+
- 10.119.32.5
|
98
|
+
- 10.119.32.6
|
99
|
+
|
100
|
+
prod:
|
101
|
+
<<: *vcenter
|
102
|
+
|
103
|
+
datacenter: 'WCDC Prod'
|
104
|
+
datastores:
|
105
|
+
- Prod_Cor_PlaSer_03_237
|
106
|
+
- Prod_Cor_PlaSer_04_237
|
107
|
+
- Prod_Cor_PlaSer_06F9_473
|
108
|
+
- Prod_Cor_PlaSer_06F9_473
|
109
|
+
- Prod_Cor_PlaSer_080D_473
|
110
|
+
- Prod_Cor_PlaSer_0812_473
|
111
|
+
- Prod_Cor_PlaSer_08E0_473
|
112
|
+
- Prod_Cor_PlaSer_08EA_473
|
113
|
+
- Prod_Cor_PlaSer_08F4_473
|
114
|
+
- Prod_Cor_PlaSer_0B89_473
|
115
|
+
- Prod_Cor_PlaSer_0B93_473
|
116
|
+
- Prod_Cor_PlaSer_847_473
|
117
|
+
- Prod_Cor_PlaSer_851_473
|
118
|
+
|
119
|
+
domain: active.tan
|
120
|
+
dnsips:
|
121
|
+
- 10.119.10.201
|
122
|
+
- 10.73.100.21
|
123
|
+
"""
|
124
|
+
Given a file named "infrastructure/network.yml" with:
|
125
|
+
"""
|
126
|
+
? "%YAML 1.2"
|
127
|
+
network:
|
128
|
+
name: AW
|
129
|
+
|
130
|
+
devweb:
|
131
|
+
vlanid: DEV_WEB_NET
|
132
|
+
gateway: '10.219.128.1'
|
133
|
+
netmask: 19
|
134
|
+
|
135
|
+
devapp:
|
136
|
+
vlanid: DEV_APP_NET
|
137
|
+
gateway: '10.219.160.1'
|
138
|
+
netmask: 20
|
139
|
+
|
140
|
+
prodweb:
|
141
|
+
vlanid: prd-web-10.119.128.0%2f20(2010)
|
142
|
+
gateway: '10.119.128.1'
|
143
|
+
netmask: 19
|
144
|
+
|
145
|
+
prodapp:
|
146
|
+
vlanid: prd-app-10.119.160.0%2f20(2020)
|
147
|
+
gateway: '10.119.160.1'
|
148
|
+
netmask: 20
|
149
|
+
"""
|
150
|
+
Given a file named "infrastructure/compute.yml" with:
|
151
|
+
"""
|
152
|
+
? "%YAML 1.2"
|
153
|
+
compute:
|
154
|
+
name: AW
|
155
|
+
|
156
|
+
default: &default
|
157
|
+
cpu: 2
|
158
|
+
ram: 2
|
159
|
+
|
160
|
+
nonprodweb:
|
161
|
+
<<: *default
|
162
|
+
|
163
|
+
nonprodapp:
|
164
|
+
<<: *default
|
165
|
+
ram: 6
|
166
|
+
|
167
|
+
nonprodtc:
|
168
|
+
<<: *default
|
169
|
+
ram: 8
|
170
|
+
|
171
|
+
nonprodmq:
|
172
|
+
<<: *default
|
173
|
+
ram: 12
|
174
|
+
|
175
|
+
nonprodpassporttc:
|
176
|
+
<<: *default
|
177
|
+
ram: 4
|
178
|
+
|
179
|
+
prodweb:
|
180
|
+
<<: *default
|
181
|
+
ram: 6
|
182
|
+
|
183
|
+
prodapp:
|
184
|
+
<<: *default
|
185
|
+
ram: 6
|
186
|
+
|
187
|
+
prodtc:
|
188
|
+
<<: *default
|
189
|
+
ram: 32
|
190
|
+
|
191
|
+
prodmq:
|
192
|
+
<<: *default
|
193
|
+
cpu: 8
|
194
|
+
ram: 32
|
195
|
+
|
196
|
+
prodpassporttc:
|
197
|
+
<<: *default
|
198
|
+
ram: 32
|
199
|
+
|
200
|
+
prodsports:
|
201
|
+
<<: *default
|
202
|
+
ram: 3
|
203
|
+
"""
|
204
|
+
Given a file named "environments/prod.yml" with:
|
205
|
+
"""
|
206
|
+
? "%YAML 1.2"
|
207
|
+
environment:
|
208
|
+
vcenter: prod
|
209
|
+
|
210
|
+
tier: &tier
|
211
|
+
Web:
|
212
|
+
network: prodweb
|
213
|
+
|
214
|
+
App:
|
215
|
+
network: prodapp
|
216
|
+
|
217
|
+
webvmdefaults: &webvmdefaults
|
218
|
+
count: 4
|
219
|
+
compute: prodweb
|
220
|
+
|
221
|
+
appvmdefaults: &appvmdefaults
|
222
|
+
<<: *webvmdefaults
|
223
|
+
compute: prodapp
|
224
|
+
|
225
|
+
|
226
|
+
components:
|
227
|
+
|
228
|
+
#---------------------------------------------- Web tier
|
229
|
+
|
230
|
+
api:
|
231
|
+
addresses:
|
232
|
+
- 10.119.137.72
|
233
|
+
- 10.119.137.73
|
234
|
+
- 10.119.137.74
|
235
|
+
- 10.119.137.75
|
236
|
+
|
237
|
+
cui:
|
238
|
+
addresses:
|
239
|
+
- 10.119.137.133
|
240
|
+
- 10.119.137.134
|
241
|
+
- 10.119.137.135
|
242
|
+
- 10.119.137.136
|
243
|
+
|
244
|
+
terracotta:
|
245
|
+
count: 2
|
246
|
+
compute: prodtc
|
247
|
+
addresses:
|
248
|
+
- 10.119.137.218
|
249
|
+
- 10.119.137.219
|
250
|
+
port: 0000
|
251
|
+
|
252
|
+
#----------------------------------------------
|
253
|
+
|
254
|
+
email:
|
255
|
+
addresses:
|
256
|
+
- 10.119.161.137
|
257
|
+
- 10.119.161.138
|
258
|
+
- 10.119.161.139
|
259
|
+
- 10.119.161.140
|
260
|
+
|
261
|
+
mq:
|
262
|
+
count: 2
|
263
|
+
compute: prodmq
|
264
|
+
addresses:
|
265
|
+
- 10.119.161.206
|
266
|
+
- 10.119.161.207
|
267
|
+
"""
|
268
|
+
Given a file named "environments/int.yml" with:
|
269
|
+
"""
|
270
|
+
? "%YAML 1.2"
|
271
|
+
environment:
|
272
|
+
vcenter: nonprod
|
273
|
+
|
274
|
+
tier: &tier
|
275
|
+
Web:
|
276
|
+
network: devweb
|
277
|
+
|
278
|
+
App:
|
279
|
+
network: devapp
|
280
|
+
|
281
|
+
|
282
|
+
components:
|
283
|
+
|
284
|
+
#---------------------------------------------- Web tier
|
285
|
+
|
286
|
+
api:
|
287
|
+
addresses:
|
288
|
+
- 10.219.137.42
|
289
|
+
- 10.219.137.43
|
290
|
+
|
291
|
+
cui:
|
292
|
+
addresses:
|
293
|
+
- 10.219.137.64
|
294
|
+
- 10.219.137.65
|
295
|
+
|
296
|
+
terracotta:
|
297
|
+
addresses:
|
298
|
+
- 10.219.137.95
|
299
|
+
- 10.219.137.96
|
300
|
+
|
301
|
+
#---------------------------------------------- App tier
|
302
|
+
|
303
|
+
email:
|
304
|
+
addresses:
|
305
|
+
- 10.219.161.53
|
306
|
+
- 10.219.161.54
|
307
|
+
|
308
|
+
mq:
|
309
|
+
addresses:
|
310
|
+
- 10.219.161.77
|
311
|
+
- 10.219.161.78
|
312
|
+
"""
|
313
|
+
When I run `elevage guard full`
|
314
|
+
Then the exit status should be 0
|
@@ -0,0 +1,237 @@
|
|
1
|
+
Feature: Provisioning platform vm's
|
2
|
+
|
3
|
+
As an Infracoder developing a command line tool
|
4
|
+
I want to test the accuracy of the vm provisioning ability of the Build command
|
5
|
+
In order to maintain the health of the elevage tool
|
6
|
+
|
7
|
+
Scenario: build new environment
|
8
|
+
|
9
|
+
Given a file named "platform.yml" with:
|
10
|
+
"""
|
11
|
+
platform:
|
12
|
+
name: app
|
13
|
+
description: 'description of the app'
|
14
|
+
|
15
|
+
environments:
|
16
|
+
- int
|
17
|
+
- qa
|
18
|
+
- prod
|
19
|
+
|
20
|
+
tiers:
|
21
|
+
- Web
|
22
|
+
- App
|
23
|
+
|
24
|
+
nodenameconvention:
|
25
|
+
- environment
|
26
|
+
- '-'
|
27
|
+
- component
|
28
|
+
- '-'
|
29
|
+
- instance
|
30
|
+
- geo
|
31
|
+
|
32
|
+
pools:
|
33
|
+
webvmdefaults: &webvmdefaults
|
34
|
+
count: 2
|
35
|
+
tier: Web
|
36
|
+
image: 'centos-6.5-x86_64-20140714'
|
37
|
+
compute: nonprodweb
|
38
|
+
port: 80
|
39
|
+
runlist:
|
40
|
+
- 'role[loc_uswest]'
|
41
|
+
- 'role[base]'
|
42
|
+
componentrole: 'role[#]'
|
43
|
+
|
44
|
+
appvmdefaults: &appvmdefaults
|
45
|
+
<<: *webvmdefaults
|
46
|
+
tier: App
|
47
|
+
compute: nonprodapp
|
48
|
+
|
49
|
+
components:
|
50
|
+
api:
|
51
|
+
<<: *webvmdefaults
|
52
|
+
port: 8080
|
53
|
+
|
54
|
+
cui:
|
55
|
+
<<: *webvmdefaults
|
56
|
+
port: 8082
|
57
|
+
|
58
|
+
terracotta:
|
59
|
+
<<: *webvmdefaults
|
60
|
+
compute: nonprodtc
|
61
|
+
image: 'centos32g-6.5-x86_64-20140714'
|
62
|
+
|
63
|
+
email:
|
64
|
+
<<: *appvmdefaults
|
65
|
+
port: 8130
|
66
|
+
|
67
|
+
mq:
|
68
|
+
<<: *appvmdefaults
|
69
|
+
port: 1234
|
70
|
+
compute: nonprodmq
|
71
|
+
image: 'centos32g-6.5-x86_64-20140714'
|
72
|
+
"""
|
73
|
+
Given a file named "infrastructure/vcenter.yml" with:
|
74
|
+
"""
|
75
|
+
vcenter:
|
76
|
+
nonprod: &vcenter
|
77
|
+
geo: west
|
78
|
+
timezone: 085
|
79
|
+
|
80
|
+
host: 'www.google.com'
|
81
|
+
datacenter: 'WCDC NonProd'
|
82
|
+
imagefolder: 'Corporate/Platform Services/Templates'
|
83
|
+
destfolder: 'Corporate/Platform Services/app'
|
84
|
+
resourcepool: 'App-Web Linux/Corporate'
|
85
|
+
appendenv: true
|
86
|
+
appenddomain: true
|
87
|
+
datastores:
|
88
|
+
- NonProd_Cor_25
|
89
|
+
- NonProd_Cor_26
|
90
|
+
- NonProd_Cor_38
|
91
|
+
- NonProd_Cor_39
|
92
|
+
|
93
|
+
domain: dev.corp.local
|
94
|
+
dnsips:
|
95
|
+
- 10.10.10.5
|
96
|
+
- 10.10.10.6
|
97
|
+
|
98
|
+
prod:
|
99
|
+
<<: *vcenter
|
100
|
+
|
101
|
+
datacenter: 'WCDC Prod'
|
102
|
+
datastores:
|
103
|
+
- Prod_Cor_03
|
104
|
+
- Prod_Cor_04
|
105
|
+
|
106
|
+
domain: corp.local
|
107
|
+
dnsips:
|
108
|
+
- 10.20.100.5
|
109
|
+
- 10.20.100.6
|
110
|
+
"""
|
111
|
+
Given a file named "infrastructure/network.yml" with:
|
112
|
+
"""
|
113
|
+
network:
|
114
|
+
devweb:
|
115
|
+
vlanid: DEV_WEB_NET
|
116
|
+
gateway: 10.10.128.1
|
117
|
+
netmask: 19
|
118
|
+
|
119
|
+
devapp:
|
120
|
+
vlanid: DEV_APP_NET
|
121
|
+
gateway: 10.10.160.1
|
122
|
+
netmask: 20
|
123
|
+
|
124
|
+
prodweb:
|
125
|
+
vlanid: PRD_WEB_NET
|
126
|
+
gateway: 10.119.128.1
|
127
|
+
netmask: 19
|
128
|
+
|
129
|
+
prodapp:
|
130
|
+
vlanid: PRD_APP_NET
|
131
|
+
gateway: 10.119.160.1
|
132
|
+
netmask: 20
|
133
|
+
"""
|
134
|
+
Given a file named "infrastructure/compute.yml" with:
|
135
|
+
"""
|
136
|
+
compute:
|
137
|
+
default: &default
|
138
|
+
cpu: 2
|
139
|
+
ram: 2
|
140
|
+
|
141
|
+
nonprodweb:
|
142
|
+
<<: *default
|
143
|
+
|
144
|
+
nonprodapp:
|
145
|
+
<<: *default
|
146
|
+
ram: 6
|
147
|
+
|
148
|
+
nonprodtc:
|
149
|
+
<<: *default
|
150
|
+
ram: 8
|
151
|
+
|
152
|
+
nonprodmq:
|
153
|
+
<<: *default
|
154
|
+
ram: 12
|
155
|
+
|
156
|
+
prodweb:
|
157
|
+
<<: *default
|
158
|
+
ram: 6
|
159
|
+
|
160
|
+
prodapp:
|
161
|
+
<<: *default
|
162
|
+
ram: 6
|
163
|
+
|
164
|
+
prodtc:
|
165
|
+
<<: *default
|
166
|
+
ram: 32
|
167
|
+
|
168
|
+
prodmq:
|
169
|
+
<<: *default
|
170
|
+
cpu: 8
|
171
|
+
ram: 32
|
172
|
+
"""
|
173
|
+
|
174
|
+
Given a file named "environments/qa.yml" with:
|
175
|
+
"""
|
176
|
+
environment:
|
177
|
+
vcenter: nonprod
|
178
|
+
|
179
|
+
pools:
|
180
|
+
webvmdefaults: &webvmdefaults
|
181
|
+
network: devweb
|
182
|
+
|
183
|
+
appvmdefaults: &appvmdefaults
|
184
|
+
<<: *webvmdefaults
|
185
|
+
network: devapp
|
186
|
+
|
187
|
+
components:
|
188
|
+
api:
|
189
|
+
<<: *webvmdefaults
|
190
|
+
addresses:
|
191
|
+
- 10.10.137.151
|
192
|
+
- 10.10.137.152
|
193
|
+
|
194
|
+
cui:
|
195
|
+
<<: *webvmdefaults
|
196
|
+
addresses:
|
197
|
+
- 10.10.137.161
|
198
|
+
- 10.10.137.162
|
199
|
+
|
200
|
+
terracotta:
|
201
|
+
<<: *webvmdefaults
|
202
|
+
addresses:
|
203
|
+
- 10.10.137.171
|
204
|
+
- 10.10.137.172
|
205
|
+
|
206
|
+
email:
|
207
|
+
<<: *appvmdefaults
|
208
|
+
addresses:
|
209
|
+
- 10.10.161.111
|
210
|
+
- 10.10.161.112
|
211
|
+
|
212
|
+
mq:
|
213
|
+
<<: *appvmdefaults
|
214
|
+
addresses:
|
215
|
+
- 10.10.161.121
|
216
|
+
- 10.10.161.122
|
217
|
+
|
218
|
+
"""
|
219
|
+
|
220
|
+
When I run `elevage build qa --component=mq --node=1 --dry-run`
|
221
|
+
Then the exit status should be 0
|
222
|
+
And the output should contain:
|
223
|
+
"""
|
224
|
+
Dry run requested, forcing concurrency to '1'.
|
225
|
+
Running Tasks: 0
|
226
|
+
Max Concurrency: 1
|
227
|
+
Wait status interval: 60
|
228
|
+
Current Child processes:
|
229
|
+
Queued Provisioners:
|
230
|
+
- qa-mq-01w
|
231
|
+
"""
|
232
|
+
And the file "logs/qa-mq-01w.log" should contain:
|
233
|
+
"""
|
234
|
+
qa-mq-01w: Provisioning.
|
235
|
+
knife vsphere vm clone --vsinsecure --start --vsuser svc_provisioner --vspass changeme --vshost www.google.com --folder Corporate/Platform Services/Templates --template centos32g-6.5-x86_64-20140714 --vsdc WCDC NonProd --dest-folder Corporate/Platform Services/app/qa --resource-pool App-Web Linux/Corporate --datastore NonProd_Cor_25 --ccpu 2 --cram 12 --cvlan DEV_APP_NET --cips 10.10.161.121/20 --cdnsips 10.10.10.5,10.10.10.6 --cgw 10.10.160.1 --chostname qa-mq-01w --ctz 085 --cdomain app.dev.corp.local --cdnssuffix app.dev.corp.local --bootstrap --template-file chef-full.erb --fqdn 10.10.161.121 --ssh-user knife --identity-file knife_rsa --node-name qa-mq-01w.qa.app.dev.corp.local --run-list role[loc_uswest],role[base],role[mq] --environment qa --bootstrap-version 11.4.0 qa-mq-01w.qa.app.dev.corp.local
|
236
|
+
qa-mq-01w: exit status: 0
|
237
|
+
"""
|