elevage 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/features/archive +1 -0
- data/features/build.feature +1 -0
- data/features/generate.feature +1 -0
- data/features/health_env_failure.feature +1 -0
- data/features/health_failure.feature +1 -0
- data/features/health_success.feature +1 -0
- data/features/list.feature +3 -2
- data/features/new.feature +1 -1
- data/lib/elevage/provisioner.rb +7 -7
- data/lib/elevage/templates/platform.yml.tt +2 -1
- data/lib/elevage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 514c5dc7d1fb4db21af17572c2c32e7539f4d1cb
|
4
|
+
data.tar.gz: 1eb5b0f8cbf909f9433c540ae346f3f5721d34e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 918a6904ec87bd8bc15220803f10a578dd887fa7ef082664d22fee58bf360d1d12dc8d765a68d01619feb875ddb6967ad13ef49ed718c11dfe893ed862339909
|
7
|
+
data.tar.gz: b52f136162f81e76e00bb617206c1e6a3e84151c273aa304f37f1d005adb43ef3465281e4f8df1fcbdab5885a5ccd2b92093cf2c4faea87b2d63b32688f0750c
|
data/README.md
CHANGED
@@ -73,6 +73,17 @@ Generate a new environment file. Comments within the template files describe ne
|
|
73
73
|
$ elevage generate <environment name>
|
74
74
|
```
|
75
75
|
|
76
|
+
Windows nodes require the `ostype` parameter under `pools` to equal `'windows'`. This was required so that only the vm name is paseed in instead of the FQDN.
|
77
|
+
|
78
|
+
```YAML
|
79
|
+
pools:
|
80
|
+
vmdefaults: &vmdefaults
|
81
|
+
count:
|
82
|
+
tier:
|
83
|
+
image:
|
84
|
+
ostype: 'windows'
|
85
|
+
```
|
86
|
+
|
76
87
|
Provision nodes from platform and environment definition
|
77
88
|
|
78
89
|
```bash
|
data/features/archive
CHANGED
data/features/build.feature
CHANGED
data/features/generate.feature
CHANGED
data/features/list.feature
CHANGED
@@ -33,6 +33,7 @@ Feature: LIST platform definition file items
|
|
33
33
|
count: 2
|
34
34
|
tier: Web
|
35
35
|
image: 'centos-6.5-x86_64-20140714'
|
36
|
+
ostype: 'linux'
|
36
37
|
compute: nonprodweb
|
37
38
|
port: 80
|
38
39
|
runlist:
|
@@ -269,11 +270,11 @@ Feature: LIST platform definition file items
|
|
269
270
|
|
270
271
|
When I run `elevage list pools`
|
271
272
|
Then the exit status should be 0
|
272
|
-
And the output should contain "appvmdefaults:\n count: 2\n tier: App\n image: centos-6.5-x86_64-20140714\n compute: nonprodapp\n port: 80"
|
273
|
+
And the output should contain "appvmdefaults:\n count: 2\n tier: App\n image: centos-6.5-x86_64-20140714\n ostype: linux\n compute: nonprodapp\n port: 80"
|
273
274
|
|
274
275
|
When I run `elevage list components`
|
275
276
|
Then the exit status should be 0
|
276
|
-
And the output should contain "terracotta:\n count: 2\n tier: Web\n image: centos32g-6.5-x86_64-20140714\n compute: nonprodtc\n port: 80"
|
277
|
+
And the output should contain "terracotta:\n count: 2\n tier: Web\n image: centos32g-6.5-x86_64-20140714\n ostype: linux\n compute: nonprodtc\n port: 80"
|
277
278
|
|
278
279
|
When I run `elevage list vcenter`
|
279
280
|
Then the exit status should be 0
|
data/features/new.feature
CHANGED
data/lib/elevage/provisioner.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative 'platform'
|
|
5
5
|
require_relative 'provisionerrunqueue'
|
6
6
|
|
7
7
|
module Elevage
|
8
|
-
# rubocop:disable ClassLength
|
8
|
+
# rubocop:disable ClassLength, CyclomaticComplexity
|
9
9
|
|
10
10
|
# Provisioner is responsible for the actual execution of the commands to
|
11
11
|
# create the requested virtual machine.
|
@@ -44,7 +44,7 @@ module Elevage
|
|
44
44
|
puts @environment.to_yaml
|
45
45
|
end
|
46
46
|
|
47
|
-
# rubocop:disable MethodLength
|
47
|
+
# rubocop:disable MethodLength
|
48
48
|
|
49
49
|
# Build the the virtual machine
|
50
50
|
def build
|
@@ -99,7 +99,7 @@ module Elevage
|
|
99
99
|
# exit status is a failure, and the details will be in the logfile
|
100
100
|
status.exitstatus == 0 ? true : false
|
101
101
|
end
|
102
|
-
# rubocop:enable MethodLength
|
102
|
+
# rubocop:enable MethodLength
|
103
103
|
|
104
104
|
private
|
105
105
|
|
@@ -151,7 +151,7 @@ module Elevage
|
|
151
151
|
knife_cmd << " --dest-folder '#{@vcenter['destfolder']}"
|
152
152
|
knife_cmd << "/#{@component['tier']}" if @vcenter['appendtier']
|
153
153
|
knife_cmd << '\''
|
154
|
-
knife_cmd << " --resource-pool '#{@vcenter['resourcepool']}'"
|
154
|
+
knife_cmd << " --resource-pool '#{@vcenter['resourcepool']}'" if vcenter['resourcepool']
|
155
155
|
knife_cmd << " --datastore '#{select_datastore}'"
|
156
156
|
|
157
157
|
# VM Hardware
|
@@ -201,12 +201,12 @@ module Elevage
|
|
201
201
|
|
202
202
|
# Finally, the name of the VM as seen by vSphere.
|
203
203
|
# Whereas nodename will optionally append the domain name, VM names
|
204
|
-
# should *always* have the domain name appended
|
204
|
+
# should *always* have the domain name appended - UNLESS it's windows
|
205
205
|
vmname = String.new(@name)
|
206
|
-
vmname << @vcenter['domain']
|
206
|
+
vmname << @vcenter['domain'] if @component['ostype'] != 'windows'
|
207
207
|
knife_cmd << " #{vmname}"
|
208
208
|
end
|
209
209
|
# rubocop:enable MethodLength, LineLength
|
210
210
|
end
|
211
|
-
# rubocop:enable ClassLength
|
211
|
+
# rubocop:enable ClassLength, CyclomaticComplexity
|
212
212
|
end
|
data/lib/elevage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elevage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nic Cheneweth
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|