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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c2d9f567bd44e3a933c726450c349d5e2934f9d
4
- data.tar.gz: 15373183e1e134e0494073b28d9ee23ec2a7d443
3
+ metadata.gz: 514c5dc7d1fb4db21af17572c2c32e7539f4d1cb
4
+ data.tar.gz: 1eb5b0f8cbf909f9433c540ae346f3f5721d34e4
5
5
  SHA512:
6
- metadata.gz: 8a69e7cc605360c1012b64a909cb94695e71437809be67e8ddb4b60db2810588d13ea439bf79fc1110fd2f38c604c8bcc39956094745ffef82b162e6e749f448
7
- data.tar.gz: f31e5eb225111343c722b99ff0f79515c9c7b5ad2b29cc3a787530f4408508f325597666209bc9a6b76e64e1127160fafd138ae611e0ee829b72a47b1bc9fd13
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
@@ -29,6 +29,7 @@
29
29
  count: 2
30
30
  tier: Web
31
31
  image: 'aw-nonprod-oel6_20130815'
32
+ ostype: 'linux'
32
33
  compute: nonprodweb
33
34
 
34
35
  appvmdefaults: &appvmdefaults
@@ -34,6 +34,7 @@ Feature: Provisioning platform vm's
34
34
  count: 2
35
35
  tier: Web
36
36
  image: 'centos-6.5-x86_64-20140714'
37
+ ostype: 'linux'
37
38
  compute: nonprodweb
38
39
  port: 80
39
40
  runlist:
@@ -33,6 +33,7 @@ Feature: GENERATE new environment yml file
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:
@@ -34,6 +34,7 @@ Feature: HEALTH check of erroneous environment-only definition file items
34
34
  count: 2
35
35
  tier: Web
36
36
  image: 'centos-6.5-x86_64-20140714'
37
+ ostype: 'linux'
37
38
  compute: nonprodweb
38
39
  port: 80
39
40
  runlist:
@@ -33,6 +33,7 @@ Feature: HEALTH check of erroneous 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:
@@ -33,6 +33,7 @@ Feature: HEALTH check of correct 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:
@@ -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
@@ -65,4 +65,4 @@ Feature: creating NEW platform definition files
65
65
  # And the file "app_definition/infrastructure/compute.yml" should contain:
66
66
  # """
67
67
  # compute:
68
- # """
68
+ # """
@@ -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, CyclomaticComplexity
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, CyclomaticComplexity
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
@@ -80,6 +80,7 @@ platform:
80
80
  count:
81
81
  tier:
82
82
  image:
83
+ ostype:
83
84
  compute:
84
85
  port:
85
86
  runlist:
@@ -107,4 +108,4 @@ platform:
107
108
  components:
108
109
 
109
110
  component:
110
- <<: *vmdefaults
111
+ <<: *vmdefaults
@@ -1,4 +1,4 @@
1
1
  # simple gem version number tracking
2
2
  module Elevage
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
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.3
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-08-07 00:00:00.000000000 Z
12
+ date: 2015-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler