bosh-director 1.3163.0 → 1.3165.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bosh/director/deployment_plan/cloud_manifest_parser.rb +3 -3
- data/lib/bosh/director/deployment_plan/compilation_config.rb +21 -7
- data/lib/bosh/director/deployment_plan/compilation_instance_pool.rb +6 -1
- data/lib/bosh/director/deployment_plan/instance.rb +5 -2
- data/lib/bosh/director/deployment_plan/steps/package_compile_step.rb +0 -1
- data/lib/bosh/director/errors.rb +2 -0
- data/lib/bosh/director/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 437509ee29b6b2a295acd39582fbb8581ab89dbd
|
|
4
|
+
data.tar.gz: aa6897b42854ca6cb4eb6f549a24eecb44b2a605
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0e5cf4691d434e4090ba3317d04fb8047bb031bbb6d9a882ce0f2048b23fe0b64cb578e9154cecd7b967a9b1f74fc261de7eb83409eb35db7c4ee3e971af446
|
|
7
|
+
data.tar.gz: 9d76083b5ecdc2f7359f2a424a637cbc1e84a4c2c7ba8a420d1ca2f7fe6cf97991229cffdbd790072d9aeea5fbc28de5fba898f097d5355357e50c4c002eee86
|
|
@@ -11,10 +11,10 @@ module Bosh::Director
|
|
|
11
11
|
azs = parse_availability_zones(cloud_manifest)
|
|
12
12
|
az_list = CloudPlanner.index_by_name(azs)
|
|
13
13
|
networks = parse_networks(cloud_manifest, global_network_resolver, azs)
|
|
14
|
-
compilation_config = parse_compilation(cloud_manifest, networks, az_list)
|
|
15
14
|
resource_pools = parse_resource_pools(cloud_manifest)
|
|
16
15
|
vm_types = parse_vm_types(cloud_manifest)
|
|
17
16
|
disk_types = parse_disk_types(cloud_manifest)
|
|
17
|
+
compilation_config = parse_compilation(cloud_manifest, networks, az_list, vm_types)
|
|
18
18
|
|
|
19
19
|
CloudPlanner.new({
|
|
20
20
|
availability_zones_list: az_list,
|
|
@@ -75,9 +75,9 @@ module Bosh::Director
|
|
|
75
75
|
parsed_networks
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
def parse_compilation(cloud_manifest, networks, az_list)
|
|
78
|
+
def parse_compilation(cloud_manifest, networks, az_list, vm_types)
|
|
79
79
|
compilation_spec = safe_property(cloud_manifest, 'compilation', :class => Hash)
|
|
80
|
-
config = CompilationConfig.new(compilation_spec, az_list)
|
|
80
|
+
config = CompilationConfig.new(compilation_spec, az_list, vm_types)
|
|
81
81
|
|
|
82
82
|
compilation_network = networks.find { |network| network.name == config.network_name }
|
|
83
83
|
if compilation_network.nil?
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# Copyright (c) 2009-2012 VMware, Inc.
|
|
2
|
-
|
|
3
1
|
module Bosh::Director
|
|
4
2
|
module DeploymentPlan
|
|
5
3
|
##
|
|
@@ -11,7 +9,7 @@ module Bosh::Director
|
|
|
11
9
|
attr_accessor :workers
|
|
12
10
|
|
|
13
11
|
# @return [Hash] cloud properties to use when creating VMs. (optional)
|
|
14
|
-
|
|
12
|
+
attr_reader :cloud_properties
|
|
15
13
|
|
|
16
14
|
# @return [Hash] environment to use when creating VMs. (optional)
|
|
17
15
|
attr_accessor :env
|
|
@@ -23,10 +21,9 @@ module Bosh::Director
|
|
|
23
21
|
|
|
24
22
|
attr_reader :availability_zone
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def initialize(compilation_config, azs_list = {})
|
|
24
|
+
attr_reader :vm_type
|
|
25
|
+
|
|
26
|
+
def initialize(compilation_config, azs_list, vm_types = [])
|
|
30
27
|
@workers = safe_property(compilation_config, 'workers', class: Integer, min: 1)
|
|
31
28
|
|
|
32
29
|
@network_name = safe_property(compilation_config, 'network', class: String)
|
|
@@ -46,6 +43,23 @@ module Bosh::Director
|
|
|
46
43
|
raise Bosh::Director::CompilationConfigInvalidAvailabilityZone,
|
|
47
44
|
"Compilation config references unknown az '#{az_name}'. Known azs are: [#{azs_list.keys.join(', ')}]"
|
|
48
45
|
end
|
|
46
|
+
|
|
47
|
+
vm_type_name = safe_property(compilation_config, 'vm_type', class: String, optional: true)
|
|
48
|
+
|
|
49
|
+
if vm_type_name
|
|
50
|
+
@vm_type = vm_types.find { |vm_type| vm_type.name == vm_type_name }
|
|
51
|
+
|
|
52
|
+
if @vm_type.nil?
|
|
53
|
+
vm_types_names = vm_types.map { |vm_type| vm_type.name }
|
|
54
|
+
raise Bosh::Director::CompilationConfigInvalidVmType,
|
|
55
|
+
"Compilation config references unknown vm type '#{vm_type_name}'. Known vm types are: #{vm_types_names.join(', ')}"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
unless @cloud_properties.empty?
|
|
59
|
+
raise Bosh::Director::CompilationConfigCloudPropertiesNotAllowed,
|
|
60
|
+
"Compilation config is using vm type '#{@vm_type.name}' and should not be configuring cloud_properties."
|
|
61
|
+
end
|
|
62
|
+
end
|
|
49
63
|
end
|
|
50
64
|
|
|
51
65
|
def availability_zone_name
|
|
@@ -66,7 +66,12 @@ module Bosh::Director
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def create_instance_plan(stemcell)
|
|
69
|
-
|
|
69
|
+
if @deployment_plan.compilation.vm_type
|
|
70
|
+
vm_type = @deployment_plan.compilation.vm_type
|
|
71
|
+
else
|
|
72
|
+
vm_type = CompilationVmType.new(@deployment_plan.compilation.cloud_properties)
|
|
73
|
+
end
|
|
74
|
+
|
|
70
75
|
env = Env.new(@deployment_plan.compilation.env)
|
|
71
76
|
|
|
72
77
|
@compile_job = CompilationJob.new(vm_type, stemcell, env, @deployment_plan.compilation.network_name)
|
|
@@ -68,7 +68,6 @@ module Bosh::Director
|
|
|
68
68
|
@logger = logger
|
|
69
69
|
@deployment_model = deployment_model
|
|
70
70
|
@job_name = job_name
|
|
71
|
-
@name = "#{job_name}/#{@index}"
|
|
72
71
|
@vm_type = vm_type
|
|
73
72
|
@stemcell = stemcell
|
|
74
73
|
@env = env
|
|
@@ -99,7 +98,11 @@ module Bosh::Director
|
|
|
99
98
|
end
|
|
100
99
|
|
|
101
100
|
def to_s
|
|
102
|
-
@
|
|
101
|
+
if @uuid.nil?
|
|
102
|
+
"#{@job_name}/#{@index}"
|
|
103
|
+
else
|
|
104
|
+
"#{@job_name}/#{@index} (#{@uuid})"
|
|
105
|
+
end
|
|
103
106
|
end
|
|
104
107
|
|
|
105
108
|
# Looks up instance model in DB and binds it to this instance spec.
|
|
@@ -9,7 +9,6 @@ module Bosh::Director
|
|
|
9
9
|
|
|
10
10
|
attr_reader :compilations_performed
|
|
11
11
|
|
|
12
|
-
# @param [DeploymentPlan] deployment_plan Deployment plan
|
|
13
12
|
def initialize(jobs_to_compile, compilation_config, compilation_instance_pool, logger, event_log, director_job)
|
|
14
13
|
@event_log = event_log
|
|
15
14
|
@logger = logger
|
data/lib/bosh/director/errors.rb
CHANGED
|
@@ -137,6 +137,8 @@ module Bosh::Director
|
|
|
137
137
|
|
|
138
138
|
CompilationConfigUnknownNetwork = err(120001)
|
|
139
139
|
CompilationConfigInvalidAvailabilityZone = err(120002)
|
|
140
|
+
CompilationConfigInvalidVmType = err(120003)
|
|
141
|
+
CompilationConfigCloudPropertiesNotAllowed = err(120004)
|
|
140
142
|
|
|
141
143
|
# Manifest parsing: network section
|
|
142
144
|
NetworkReservationInvalidIp = err(130001)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bosh-director
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3165.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- VMware
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bosh_common
|
|
@@ -16,98 +16,98 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.
|
|
19
|
+
version: 1.3165.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.
|
|
26
|
+
version: 1.3165.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bosh_cpi
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
33
|
+
version: 1.3165.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
40
|
+
version: 1.3165.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: bosh-registry
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.
|
|
47
|
+
version: 1.3165.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 1.
|
|
54
|
+
version: 1.3165.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: blobstore_client
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 1.
|
|
61
|
+
version: 1.3165.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 1.
|
|
68
|
+
version: 1.3165.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: bosh-core
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 1.
|
|
75
|
+
version: 1.3165.0
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 1.
|
|
82
|
+
version: 1.3165.0
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: bosh-director-core
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 1.
|
|
89
|
+
version: 1.3165.0
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 1.
|
|
96
|
+
version: 1.3165.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: bosh-template
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 1.
|
|
103
|
+
version: 1.3165.0
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 1.
|
|
110
|
+
version: 1.3165.0
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: bosh_openstack_cpi
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|