Skip to content

Commit

Permalink
A general way to customize all servers redhat-openstack#344
Browse files Browse the repository at this point in the history
  • Loading branch information
ioggstream committed May 22, 2017
1 parent 4315856 commit 2d0ceb2
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bastion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ parameters:
type: string
description: Certificate Authority Certificate to be added to trust chain

host_config:
type: string
description: >
An OS::Heat::MultiPartMime containing CloudConfig objects.
default: ''

resources:

# A VM to provide host based orchestration and other sub-services
Expand Down Expand Up @@ -237,6 +243,8 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_param: host_config}
type: multipart
- config: {get_resource: set_hostname}
- config: {get_resource: included_files}
- config: {get_resource: update_ca_cert}
Expand Down
8 changes: 8 additions & 0 deletions infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ parameters:
type: string
description: Certificate Authority Certificate to be added to trust chain

host_config:
type: string
description: >
An OS::Heat::MultiPartMime containing CloudConfig objects.
default: ''

resources:

# Create a network connection on the internal communications network
Expand Down Expand Up @@ -301,6 +307,8 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_param: host_config}
type: multipart
- config: {get_resource: set_hostname}
- config: {get_resource: included_files}
- config: {get_resource: update_ca_cert}
Expand Down
8 changes: 8 additions & 0 deletions master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ parameters:
type: string
description: Certificate Authority Certificate to be added to trust chain

host_config:
type: string
description: >
An OS::Heat::MultiPartMime containing CloudConfig objects.
default: ''

resources:

# Create a network connection on the internal communications network
Expand Down Expand Up @@ -293,6 +299,8 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_param: host_config}
type: multipart
- config: {get_resource: set_hostname}
- config: {get_resource: included_files}
- config: {get_resource: update_ca_cert}
Expand Down
8 changes: 8 additions & 0 deletions node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ parameters:
type: string
description: Certificate Authority Certificate to be added to trust chain

host_config:
type: string
description: >
An OS::Heat::MultiPartMime containing CloudConfig objects.
default: ''

resources:

# Generate a string to distinguish one node from the others
Expand Down Expand Up @@ -411,6 +417,8 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_param: host_config}
type: multipart
- config: {get_resource: set_hostname}
- config: {get_resource: included_files}
- config: {get_resource: update_ca_cert}
Expand Down
19 changes: 19 additions & 0 deletions openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,21 @@ parameters:

resources:

# Common host configs
common_cloud_config:
type: OS::Heat::CloudConfig
properties:
cloud_config:
timezone: Europe/Rome

# This multipart will be applied to
# all the openshift hosts.
common_config:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: common_cloud_config}

# Network Components
fixed_network:
type: OS::Neutron::Net
Expand Down Expand Up @@ -596,6 +611,7 @@ resources:
extra_repository_urls: {get_param: extra_repository_urls}
extra_docker_repository_urls: {get_param: extra_docker_repository_urls}
ca_cert: {get_param: ca_cert}
host_config: {get_param: common_config}

openshift_masters:
depends_on: [external_router_interface, fixed_network, fixed_subnet]
Expand Down Expand Up @@ -640,6 +656,7 @@ resources:
dns_servers: {get_param: dns_nameserver}
dns_update_key: {get_param: dns_update_key}
ca_cert: {get_param: ca_cert}
host_config: {get_param: common_config}

openshift_infra_nodes:
depends_on: [external_router_interface, fixed_network, fixed_subnet]
Expand Down Expand Up @@ -685,6 +702,7 @@ resources:
dns_servers: {get_param: dns_nameserver}
dns_update_key: {get_param: dns_update_key}
ca_cert: {get_param: ca_cert}
host_config: {get_param: common_config}

openshift_nodes:
depends_on: [external_router_interface, fixed_network, fixed_subnet]
Expand Down Expand Up @@ -764,6 +782,7 @@ resources:
execute_ansible: {get_param: execute_ansible}
extra_openshift_ansible_params: {get_param: extra_openshift_ansible_params}
ca_cert: {get_param: ca_cert}
host_config: {get_param: common_config}

# Define the network access policy for openshift nodes
node_security_group:
Expand Down

0 comments on commit 2d0ceb2

Please sign in to comment.