bosh-cloudfoundry 0.7.0.alpha.3 → 0.7.0.alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +1 -0
- data/bosh-cloudfoundry.gemspec +2 -1
- data/lib/bosh/cli/commands/cf.rb +35 -130
- data/lib/bosh/cloudfoundry.rb +5 -2
- data/lib/bosh/cloudfoundry/deployment_attributes.rb +35 -30
- data/lib/bosh/cloudfoundry/deployment_file.rb +192 -0
- data/lib/bosh/cloudfoundry/release_version.rb +67 -0
- data/lib/bosh/cloudfoundry/release_version_cpi.rb +55 -0
- data/lib/bosh/cloudfoundry/release_version_cpi_size.rb +49 -0
- data/spec/assets/v132/aws/large.yml +393 -0
- data/spec/assets/v132/aws/medium.yml +350 -0
- data/spec/deployment_file_spec.rb +92 -0
- data/spec/plugin_spec.rb +32 -47
- data/spec/release_version_cpi_size_spec.rb +13 -0
- data/spec/release_version_cpi_spec.rb +17 -0
- data/spec/release_version_spec.rb +38 -0
- data/spec/spec_helper.rb +2 -0
- data/templates/v132/aws/large/deployment_file.yml.erb +431 -0
- data/templates/v132/aws/{dev → large}/spec +0 -0
- data/templates/v132/{openstack/dev → aws/medium}/deployment_file.yml.erb +35 -23
- data/templates/v132/{openstack/dev → aws/medium}/spec +0 -0
- data/templates/v132/aws/small/README.md +5 -0
- data/templates/v132/aws/spec +6 -0
- data/templates/v132/openstack/large/deployment_file.yml.erb +431 -0
- data/templates/v132/openstack/large/spec +6 -0
- data/templates/v132/{aws/dev → openstack/medium}/deployment_file.yml.erb +35 -23
- data/templates/v132/openstack/medium/spec +6 -0
- data/templates/v132/openstack/spec +6 -0
- metadata +46 -10
- data/lib/bosh/cloudfoundry/release_versioned_template.rb +0 -48
- data/spec/release_versioned_template_spec.rb +0 -12
@@ -12,7 +12,7 @@
|
|
12
12
|
# cf:
|
13
13
|
# dns: mycloud.com
|
14
14
|
# ip_addresses: ['1.2.3.4']
|
15
|
-
#
|
15
|
+
# deployment_size: medium
|
16
16
|
# security_group: cf
|
17
17
|
# persistent_disk: 4096
|
18
18
|
#
|
@@ -24,11 +24,13 @@
|
|
24
24
|
#
|
25
25
|
# $ bosh diff deployment_file.yml.erb
|
26
26
|
#
|
27
|
+
no_ssl = true
|
28
|
+
protocol = no_ssl ? "http" : "https"
|
27
29
|
name = find("name")
|
28
30
|
dns = find("properties.cf.dns")
|
29
31
|
ip_addresses = find("properties.cf.ip_addresses")
|
30
32
|
security_group = find("properties.cf.security_group")
|
31
|
-
|
33
|
+
deployment_size = find("properties.cf.deployment_size")
|
32
34
|
persistent_disk = find("properties.cf.persistent_disk")
|
33
35
|
common_password = find("properties.cf.common_password")
|
34
36
|
-%>
|
@@ -84,6 +86,7 @@ resource_pools:
|
|
84
86
|
|
85
87
|
jobs:
|
86
88
|
- name: core
|
89
|
+
release: cf-release
|
87
90
|
template:
|
88
91
|
- syslog_aggregator
|
89
92
|
- nats
|
@@ -103,7 +106,9 @@ jobs:
|
|
103
106
|
properties:
|
104
107
|
db: databases
|
105
108
|
|
109
|
+
# need a separate job for uaa due to https://github.com/cloudfoundry/cf-release/issues/104
|
106
110
|
- name: uaa
|
111
|
+
release: cf-release
|
107
112
|
template:
|
108
113
|
- uaa
|
109
114
|
instances: 1
|
@@ -113,6 +118,7 @@ jobs:
|
|
113
118
|
default: [dns, gateway]
|
114
119
|
|
115
120
|
- name: api
|
121
|
+
release: cf-release
|
116
122
|
template:
|
117
123
|
- cloud_controller_ng
|
118
124
|
- gorouter
|
@@ -132,6 +138,7 @@ jobs:
|
|
132
138
|
db: databases
|
133
139
|
|
134
140
|
- name: dea
|
141
|
+
release: cf-release
|
135
142
|
template:
|
136
143
|
- dea_next
|
137
144
|
instances: 1
|
@@ -145,7 +152,7 @@ properties:
|
|
145
152
|
name: <%= name %>
|
146
153
|
dns: <%= dns %>
|
147
154
|
ip_addresses: <%= ip_addresses.inspect %>
|
148
|
-
|
155
|
+
deployment_size: <%= deployment_size %>
|
149
156
|
security_group: <%= security_group %>
|
150
157
|
persistent_disk: <%= persistent_disk %>
|
151
158
|
common_password: <%= common_password %>
|
@@ -194,7 +201,7 @@ properties:
|
|
194
201
|
serialization_data_server:
|
195
202
|
port: 8080
|
196
203
|
logging_level: debug
|
197
|
-
upload_token:
|
204
|
+
upload_token: <%= common_password %>
|
198
205
|
upload_timeout: 10
|
199
206
|
|
200
207
|
collector:
|
@@ -206,7 +213,7 @@ properties:
|
|
206
213
|
nfs_server:
|
207
214
|
address: 0.core.default.<%= name %>.microbosh
|
208
215
|
#network: "*.<%= name %>.microbosh"
|
209
|
-
#idmapd_domain:
|
216
|
+
#idmapd_domain: <%= dns %>
|
210
217
|
|
211
218
|
debian_nfs_server:
|
212
219
|
no_root_squash: true
|
@@ -263,9 +270,9 @@ properties:
|
|
263
270
|
cc: &cc
|
264
271
|
logging_level: debug
|
265
272
|
external_host: ccng
|
266
|
-
srv_api_uri:
|
273
|
+
srv_api_uri: <%= protocol %>://api.<%= dns %>
|
267
274
|
cc_partition: default
|
268
|
-
db_encryption_key:
|
275
|
+
db_encryption_key: <%= common_password %>
|
269
276
|
bootstrap_admin_email: admin@<%= dns %>
|
270
277
|
bulk_api_password: <%= common_password %>
|
271
278
|
uaa_resource_id: cloud_controller
|
@@ -273,6 +280,7 @@ properties:
|
|
273
280
|
staging_upload_password: <%= common_password %>
|
274
281
|
resource_pool:
|
275
282
|
resource_directory_key: cc-resources
|
283
|
+
# Local provider when using NFS
|
276
284
|
fog_connection:
|
277
285
|
provider: Local
|
278
286
|
local_root: /var/vcap/shared
|
@@ -284,16 +292,16 @@ properties:
|
|
284
292
|
ccng: *cc
|
285
293
|
|
286
294
|
login:
|
287
|
-
protocol:
|
295
|
+
protocol: <%= protocol %>
|
288
296
|
links:
|
289
|
-
home:
|
290
|
-
passwd:
|
291
|
-
signup:
|
297
|
+
home: <%= protocol %>://console.<%= dns %>
|
298
|
+
passwd: <%= protocol %>://console.<%= dns %>/password_resets/new
|
299
|
+
signup: <%= protocol %>://console.<%= dns %>/register
|
292
300
|
|
293
301
|
uaa:
|
294
|
-
url:
|
302
|
+
url: <%= protocol %>://uaa.<%= dns %>
|
295
303
|
spring_profiles: postgresql
|
296
|
-
no_ssl:
|
304
|
+
no_ssl: <%= no_ssl %>
|
297
305
|
catalina_opts: -Xmx768m -XX:MaxPermSize=256m
|
298
306
|
resource_id: account_manager
|
299
307
|
jwt:
|
@@ -330,7 +338,6 @@ properties:
|
|
330
338
|
client:
|
331
339
|
autoapprove:
|
332
340
|
- cf
|
333
|
-
- vmc
|
334
341
|
- my
|
335
342
|
- micro
|
336
343
|
- support-signon
|
@@ -342,32 +349,37 @@ properties:
|
|
342
349
|
authorities: oauth.login
|
343
350
|
secret: <%= common_password %>
|
344
351
|
authorized-grant-types: authorization_code,client_credentials,refresh_token
|
345
|
-
redirect-uri:
|
352
|
+
redirect-uri: <%= protocol %>://login.<%= dns %>
|
346
353
|
support-services:
|
347
354
|
scope: scim.write,scim.read,openid,cloud_controller.read,cloud_controller.write
|
348
|
-
secret:
|
355
|
+
secret: <%= common_password %>
|
349
356
|
authorized-grant-types: authorization_code,client_credentials
|
350
|
-
redirect-uri:
|
357
|
+
redirect-uri: <%= protocol %>://support-signon.<%= dns %>
|
351
358
|
authorities: portal.users.read
|
352
359
|
access-token-validity: 1209600
|
353
360
|
refresh-token-validity: 1209600
|
354
|
-
|
361
|
+
oauth2service:
|
362
|
+
secret: <%= common_password %>
|
363
|
+
scope: openid,cloud_controller.read,cloud_controller.write
|
364
|
+
authorities: uaa.resource,oauth.service,clients.read,clients.write,clients.secret
|
365
|
+
authorized-grant-types: client_credentials,implicit
|
366
|
+
redirect-uri: <%= protocol %>://rewritten-later.cloudfoundry.com/whatever
|
355
367
|
override: true
|
356
|
-
|
357
|
-
authorities: uaa.none
|
358
|
-
scope: cloud_controller.read,cloud_controller.write,openid,password.write,cloud_controller.admin,scim.read,scim.write
|
368
|
+
autoapprove: true
|
359
369
|
cf:
|
360
370
|
override: true
|
361
371
|
authorized-grant-types: password,implicit,refresh_token
|
362
372
|
authorities: uaa.none
|
363
373
|
scope: cloud_controller.read,cloud_controller.write,openid,password.write,cloud_controller.admin,scim.read,scim.write
|
374
|
+
access-token-validity: 7200
|
375
|
+
refresh-token-validity: 1209600
|
364
376
|
servicesmgmt:
|
365
377
|
override: true
|
366
|
-
secret:
|
378
|
+
secret: <%= common_password %>
|
367
379
|
scope: openid,cloud_controller.read,cloud_controller.write
|
368
380
|
authorities: uaa.resource,oauth.service,clients.read,clients.write,clients.secret
|
369
381
|
authorized-grant-types: authorization_code,client_credentials,password,implicit
|
370
|
-
redirect-uri:
|
382
|
+
redirect-uri: <%= protocol %>://servicesmgmt.mycloud.com/auth/cloudfoundry/callback
|
371
383
|
autoapprove: true
|
372
384
|
scim:
|
373
385
|
users:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-cloudfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0.alpha.
|
4
|
+
version: 0.7.0.alpha.4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_cli
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 2.13.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: fakeweb
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: Create & manage Cloud Foundry deployments
|
79
95
|
email:
|
80
96
|
- drnicwilliams@gmail.com
|
@@ -387,15 +403,30 @@ files:
|
|
387
403
|
- lib/bosh/cli/commands/cf.rb
|
388
404
|
- lib/bosh/cloudfoundry.rb
|
389
405
|
- lib/bosh/cloudfoundry/deployment_attributes.rb
|
390
|
-
- lib/bosh/cloudfoundry/
|
406
|
+
- lib/bosh/cloudfoundry/deployment_file.rb
|
407
|
+
- lib/bosh/cloudfoundry/release_version.rb
|
408
|
+
- lib/bosh/cloudfoundry/release_version_cpi.rb
|
409
|
+
- lib/bosh/cloudfoundry/release_version_cpi_size.rb
|
410
|
+
- spec/assets/v132/aws/large.yml
|
411
|
+
- spec/assets/v132/aws/medium.yml
|
412
|
+
- spec/deployment_file_spec.rb
|
391
413
|
- spec/plugin_spec.rb
|
392
|
-
- spec/
|
414
|
+
- spec/release_version_cpi_size_spec.rb
|
415
|
+
- spec/release_version_cpi_spec.rb
|
416
|
+
- spec/release_version_spec.rb
|
393
417
|
- spec/spec_helper.rb
|
394
418
|
- templates/README.md
|
395
|
-
- templates/v132/aws/
|
396
|
-
- templates/v132/aws/
|
397
|
-
- templates/v132/
|
398
|
-
- templates/v132/
|
419
|
+
- templates/v132/aws/large/deployment_file.yml.erb
|
420
|
+
- templates/v132/aws/large/spec
|
421
|
+
- templates/v132/aws/medium/deployment_file.yml.erb
|
422
|
+
- templates/v132/aws/medium/spec
|
423
|
+
- templates/v132/aws/small/README.md
|
424
|
+
- templates/v132/aws/spec
|
425
|
+
- templates/v132/openstack/large/deployment_file.yml.erb
|
426
|
+
- templates/v132/openstack/large/spec
|
427
|
+
- templates/v132/openstack/medium/deployment_file.yml.erb
|
428
|
+
- templates/v132/openstack/medium/spec
|
429
|
+
- templates/v132/openstack/spec
|
399
430
|
homepage: ''
|
400
431
|
licenses:
|
401
432
|
- MIT
|
@@ -411,7 +442,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
411
442
|
version: '0'
|
412
443
|
segments:
|
413
444
|
- 0
|
414
|
-
hash:
|
445
|
+
hash: 273282452716595843
|
415
446
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
416
447
|
none: false
|
417
448
|
requirements:
|
@@ -425,6 +456,11 @@ signing_key:
|
|
425
456
|
specification_version: 3
|
426
457
|
summary: Create & manage Cloud Foundry deployments using bosh in AWS & OpenStack
|
427
458
|
test_files:
|
459
|
+
- spec/assets/v132/aws/large.yml
|
460
|
+
- spec/assets/v132/aws/medium.yml
|
461
|
+
- spec/deployment_file_spec.rb
|
428
462
|
- spec/plugin_spec.rb
|
429
|
-
- spec/
|
463
|
+
- spec/release_version_cpi_size_spec.rb
|
464
|
+
- spec/release_version_cpi_spec.rb
|
465
|
+
- spec/release_version_spec.rb
|
430
466
|
- spec/spec_helper.rb
|
@@ -1,48 +0,0 @@
|
|
1
|
-
module Bosh::Cloudfoundry
|
2
|
-
# This project should support all known versions of Cloud Foundry back to v132.
|
3
|
-
# v132 was the first release of Cloud Foundry v2.
|
4
|
-
# The project also supports the different CPIs that are supported by bosh.
|
5
|
-
# The project also supports different basic sizings/compositions (small dev deployments
|
6
|
-
# or large, high-availability production deployments). Each sizing might scale out differently.
|
7
|
-
#
|
8
|
-
# To achieve these goals it includes templates for each combination of CPI & sizing & release version.
|
9
|
-
#
|
10
|
-
# This class calculates which deployment template to use for the current deployment.
|
11
|
-
class ReleaseVersionedTemplate
|
12
|
-
attr_reader :cpi_label
|
13
|
-
attr_reader :deployment_size_name
|
14
|
-
|
15
|
-
def initialize(release_version_number, cpi_label, deployment_size_name)
|
16
|
-
@release_version_number = release_version_number
|
17
|
-
@cpi_label = cpi_label
|
18
|
-
@deployment_size_name = deployment_size_name
|
19
|
-
raise "release_version_number must be an integer" unless release_version_number.is_a?(Fixnum)
|
20
|
-
end
|
21
|
-
|
22
|
-
def deployment_attributes_class
|
23
|
-
Bosh::Cloudfoundry::DeploymentAttributes
|
24
|
-
end
|
25
|
-
|
26
|
-
def template_file_path
|
27
|
-
File.join(template_base_path, minimum_release_version_number, cpi_label, deployment_size_name, "deployment_file.yml.erb")
|
28
|
-
end
|
29
|
-
|
30
|
-
def spec_file_path
|
31
|
-
File.join(template_base_path, minimum_release_version_number, cpi_label, deployment_size_name, "spec")
|
32
|
-
end
|
33
|
-
|
34
|
-
def spec
|
35
|
-
YAML.load_file(spec_file_path)
|
36
|
-
end
|
37
|
-
|
38
|
-
# TODO implement a real algorithm when there is a 2nd release & 2nd set of templates
|
39
|
-
def minimum_release_version_number
|
40
|
-
"v132"
|
41
|
-
end
|
42
|
-
|
43
|
-
private
|
44
|
-
def template_base_path
|
45
|
-
File.expand_path("../../../../templates", __FILE__)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "bosh/cloudfoundry/release_versioned_template"
|
2
|
-
|
3
|
-
describe Bosh::Cloudfoundry::ReleaseVersionedTemplate do
|
4
|
-
subject { Bosh::Cloudfoundry::ReleaseVersionedTemplate.new(132, "aws", "dev") }
|
5
|
-
it "path to template" do
|
6
|
-
subject.template_file_path.should =~ %r{v132/aws/dev/deployment_file.yml.erb$}
|
7
|
-
end
|
8
|
-
|
9
|
-
it "path to template spec" do
|
10
|
-
subject.spec_file_path.should =~ %r{v132/aws/dev/spec$}
|
11
|
-
end
|
12
|
-
end
|