Skip to content

Commit 6bc6316

Browse files
committed
A general way to customize all servers #344
1 parent 4315856 commit 6bc6316

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed

bastion.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ parameters:
205205
type: string
206206
description: Certificate Authority Certificate to be added to trust chain
207207

208+
host_config:
209+
type: string
210+
description: >
211+
An OS::Heat::MultiPartMime containing CloudConfig objects.
212+
default: ''
213+
208214
resources:
209215

210216
# A VM to provide host based orchestration and other sub-services
@@ -237,6 +243,8 @@ resources:
237243
type: OS::Heat::MultipartMime
238244
properties:
239245
parts:
246+
- config: {get_param: host_config}
247+
type: multipart
240248
- config: {get_resource: set_hostname}
241249
- config: {get_resource: included_files}
242250
- config: {get_resource: update_ca_cert}

infra.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ parameters:
232232
type: string
233233
description: Certificate Authority Certificate to be added to trust chain
234234

235+
host_config:
236+
type: string
237+
description: >
238+
An OS::Heat::MultiPartMime containing CloudConfig objects.
239+
default: ''
240+
235241
resources:
236242

237243
# Create a network connection on the internal communications network
@@ -301,6 +307,8 @@ resources:
301307
type: OS::Heat::MultipartMime
302308
properties:
303309
parts:
310+
- config: {get_param: host_config}
311+
type: multipart
304312
- config: {get_resource: set_hostname}
305313
- config: {get_resource: included_files}
306314
- config: {get_resource: update_ca_cert}

master.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ parameters:
225225
type: string
226226
description: Certificate Authority Certificate to be added to trust chain
227227

228+
host_config:
229+
type: string
230+
description: >
231+
An OS::Heat::MultiPartMime containing CloudConfig objects.
232+
default: ''
233+
228234
resources:
229235

230236
# Create a network connection on the internal communications network
@@ -293,6 +299,8 @@ resources:
293299
type: OS::Heat::MultipartMime
294300
properties:
295301
parts:
302+
- config: {get_param: host_config}
303+
type: multipart
296304
- config: {get_resource: set_hostname}
297305
- config: {get_resource: included_files}
298306
- config: {get_resource: update_ca_cert}

node.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ parameters:
363363
type: string
364364
description: Certificate Authority Certificate to be added to trust chain
365365

366+
host_config:
367+
type: string
368+
description: >
369+
An OS::Heat::MultiPartMime containing CloudConfig objects.
370+
default: ''
371+
366372
resources:
367373

368374
# Generate a string to distinguish one node from the others
@@ -411,6 +417,8 @@ resources:
411417
type: OS::Heat::MultipartMime
412418
properties:
413419
parts:
420+
- config: {get_param: host_config}
421+
type: multipart
414422
- config: {get_resource: set_hostname}
415423
- config: {get_resource: included_files}
416424
- config: {get_resource: update_ca_cert}

openshift.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,21 @@ parameters:
507507

508508
resources:
509509

510+
# Common host configs
511+
common_cloud_config:
512+
type: OS::Heat::CloudConfig
513+
properties:
514+
cloud_config:
515+
timezone: Europe/Rome
516+
517+
# This multipart will be applied to
518+
# all the openshift hosts.
519+
common_config:
520+
type: OS::Heat::MultipartMime
521+
properties:
522+
parts:
523+
- config: {get_resource: common_cloud_config}
524+
510525
# Network Components
511526
fixed_network:
512527
type: OS::Neutron::Net
@@ -596,6 +611,7 @@ resources:
596611
extra_repository_urls: {get_param: extra_repository_urls}
597612
extra_docker_repository_urls: {get_param: extra_docker_repository_urls}
598613
ca_cert: {get_param: ca_cert}
614+
host_config: {get_resource: common_config}
599615

600616
openshift_masters:
601617
depends_on: [external_router_interface, fixed_network, fixed_subnet]
@@ -640,6 +656,7 @@ resources:
640656
dns_servers: {get_param: dns_nameserver}
641657
dns_update_key: {get_param: dns_update_key}
642658
ca_cert: {get_param: ca_cert}
659+
host_config: {get_resource: common_config}
643660

644661
openshift_infra_nodes:
645662
depends_on: [external_router_interface, fixed_network, fixed_subnet]
@@ -685,6 +702,7 @@ resources:
685702
dns_servers: {get_param: dns_nameserver}
686703
dns_update_key: {get_param: dns_update_key}
687704
ca_cert: {get_param: ca_cert}
705+
host_config: {get_resource: common_config}
688706

689707
openshift_nodes:
690708
depends_on: [external_router_interface, fixed_network, fixed_subnet]
@@ -764,6 +782,7 @@ resources:
764782
execute_ansible: {get_param: execute_ansible}
765783
extra_openshift_ansible_params: {get_param: extra_openshift_ansible_params}
766784
ca_cert: {get_param: ca_cert}
785+
host_config: {get_resource: common_config}
767786

768787
# Define the network access policy for openshift nodes
769788
node_security_group:

0 commit comments

Comments
 (0)