From 6f768598874a04b746c3c7b1600cf250cefa32b6 Mon Sep 17 00:00:00 2001 From: Steve Mulholland Date: Thu, 21 Sep 2017 15:36:25 +0100 Subject: [PATCH] adding servergroups and anti-affinity settings --- openshift-template.yaml | 21 +++++++++++++++++++++ server_atomic.yaml | 5 +++++ server_with_port.yaml | 5 +++++ 3 files changed, 31 insertions(+) diff --git a/openshift-template.yaml b/openshift-template.yaml index 13f686b..17295cc 100644 --- a/openshift-template.yaml +++ b/openshift-template.yaml @@ -279,6 +279,12 @@ resources: user_data_format: SOFTWARE_CONFIG user_data: { get_resource: install_config_agent } + haproxy-servergroup: + type: OS::Nova::ServerGroup + properties: + name: haproxy-servergroup + policies: [ 'anti-affinity' ] + haproxy_group: type: OS::Heat::ResourceGroup depends_on: [ internal_net, bastion_host, haproxy_port ] @@ -305,6 +311,13 @@ resources: - { get_resource: openshift_secgroup } mgmt_sec_groups: - { get_resource: openshift_mgmt_secgroup } + server_group: { get_resource: haproxy-servergroup } + + master-servergroup: + type: OS::Nova::ServerGroup + properties: + name: master-servergroup + policies: [ 'anti-affinity' ] master_group: type: OS::Heat::ResourceGroup @@ -332,6 +345,13 @@ resources: DATA_SIZE=15G mgmt_sec_groups: - { get_resource: openshift_mgmt_secgroup } + server_group: { get_resource: master-servergroup } + + worker-servergroup: + type: OS::Nova::ServerGroup + properties: + name: worker-servergroup + policies: [ 'anti-affinity' ] worker_group: type: OS::Heat::ResourceGroup @@ -359,6 +379,7 @@ resources: DATA_SIZE=40G mgmt_sec_groups: - { get_resource: openshift_mgmt_secgroup } + server_group: { get_resource: worker-servergroup } setup_host_file: type: OS::Heat::SoftwareConfig diff --git a/server_atomic.yaml b/server_atomic.yaml index 7b30bee..d998770 100644 --- a/server_atomic.yaml +++ b/server_atomic.yaml @@ -37,6 +37,9 @@ parameters: description: The contents for /etc/sysconfig/docker-storage-setup mgmt_sec_groups: type: json + server_group: + type: string + label: group server belongs to resources: resize_lv: @@ -81,6 +84,8 @@ resources: networks: - network: { get_param: port_network } - port: { get_resource: mgmt_port } + scheduler_hints: + group: { get_param: server_group } user_data_format: SOFTWARE_CONFIG user_data: { get_resource: server_init } diff --git a/server_with_port.yaml b/server_with_port.yaml index 9bb1a9d..6041739 100644 --- a/server_with_port.yaml +++ b/server_with_port.yaml @@ -39,6 +39,9 @@ parameters: label: RHN user password description: rhn activation key hidden: true + server_group: + type: string + label: group server belongs to resources: server: @@ -51,6 +54,8 @@ resources: networks: - port: { get_resource: port } - port: { get_resource: mgmt_port } + scheduler_hints: + group: { get_param: server_group } user_data_format: RAW user_data: str_replace: