From 306841c7f2bce5ce8da4dcfa6f127abfa9a6283b Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Mon, 9 Jun 2014 03:36:24 -0400 Subject: Enable multi-node rabbitmq cluster This causes that: * rabbit.nodes is list of all control nodes * rabbit_hosts in OS config files points to all nodes in rabbitmq cluster * overcloud control nodes are joined into cluster This works both for single or multiple control nodes and it's needed for scaling out control nodes. rabbit.nodes property is very similar to generating list of all hosts, so it uses same StructuredConfig block. This block (and couple of references) is renamed to allNodesConfig to make it more general. Related to blueprint tripleo-icehouse-ha-production-configuration Change-Id: Ice1a34ba7a52c41c1bb0c63350438971c651e7b6 --- nova-compute-config.yaml | 1 - nova-compute-instance.yaml | 11 ++++------- overcloud-source.yaml | 22 +++++++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/nova-compute-config.yaml b/nova-compute-config.yaml index 2da60d1d..6c6f7dc8 100644 --- a/nova-compute-config.yaml +++ b/nova-compute-config.yaml @@ -38,7 +38,6 @@ Resources: service-password: {get_input: neutron_password} admin-password: {get_input: admin_password} rabbit: - host: {get_input: rabbit_host} username: {get_input: rabbit_user_name} password: {get_input: rabbit_password} live-update: diff --git a/nova-compute-instance.yaml b/nova-compute-instance.yaml index f0a64cbf..3ac423b3 100644 --- a/nova-compute-instance.yaml +++ b/nova-compute-instance.yaml @@ -77,8 +77,6 @@ Parameters: Default: '' Description: A port to add to the NeutronPhysicalBridge. Type: String - RabbitHost: - Type: String RabbitUserName: Type: String RabbitPassword: @@ -145,9 +143,9 @@ Parameters: Type: String NeutronEnableTunnelling: Type: String - HostsConfig: + AllNodesConfig: Type: String - Description: OS::Heat::Config to use for hosts file deployment + Description: OS::Heat::Config to use for all nodes deployment LiveUpdateUserName: Type: String Description: The live-update username for the undercloud Glance API. @@ -214,7 +212,6 @@ Resources: neutron_public_interface: {Ref: NeutronPublicInterface} neutron_password: {Ref: NeutronPassword} admin_password: {Ref: AdminPassword} - rabbit_host: {Ref: RabbitHost} rabbit_username: {Ref: RabbitUserName} rabbit_password: {Ref: RabbitPassword} live_update_host: {Ref: LiveUpdateHost} @@ -224,10 +221,10 @@ Resources: nova_image: {Ref: NovaImage} live_update_image_id: {Ref: LiveUpdateComputeImage} ntp_server: {Ref: NtpServer} - NovaCompute0HostsDeploy: + NovaCompute0AllNodesDeploy: Type: OS::Heat::StructuredDeployment Properties: - config: {Ref: HostsConfig} + config: {Ref: AllNodesConfig} server: {Ref: NovaCompute0} signal_transport: NO_SIGNAL NovaCompute0Passthrough: diff --git a/overcloud-source.yaml b/overcloud-source.yaml index 02ecdfa1..70c8f7d7 100644 --- a/overcloud-source.yaml +++ b/overcloud-source.yaml @@ -286,7 +286,6 @@ Resources: Parameters: NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} - RabbitHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]} @@ -303,12 +302,12 @@ Resources: Ref: HypervisorNeutronPublicInterface NeutronBridgeMappings: Ref: NeutronBridgeMappings - NovaCompute0Hosts: + NovaCompute0AllNodes: Type: FileInclude Path: nova-compute-instance.yaml - SubKey: Resources.NovaCompute0HostsDeploy + SubKey: Resources.NovaCompute0AllNodesDeploy Parameters: - HostsConfig: {Ref: allHostsConfig} + AllNodesConfig: {Ref: allNodesConfig} NovaCompute0Passthrough: Type: OS::Heat::StructuredDeployment Properties: @@ -442,8 +441,6 @@ Resources: service-password: Ref: NovaPassword rabbit: - host: - get_input: controller_host username: Ref: RabbitUserName password: @@ -481,10 +478,10 @@ Resources: key_name: Ref: KeyName user_data_format: SOFTWARE_CONFIG - controller0Hosts: + controller0AllNodesConfig: Type: OS::Heat::StructuredDeployment Properties: - config: {Ref: allHostsConfig} + config: {Ref: allNodesConfig} server: {Ref: controller0} signal_transport: NO_SIGNAL controller0Deployment: @@ -527,7 +524,7 @@ Resources: - - 'http://' - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} - ':8000/v1/waitcondition' - allHostsConfig: + allNodesConfig: Type: OS::Heat::StructuredConfig Properties: config: @@ -587,6 +584,13 @@ Resources: - show - 'novalocal' - {Ref: CloudName} + rabbit: + nodes: + Fn::Join: + - ',' + - Merge::Map: + controller0: + {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] } controller0SSLDeployment: Type: OS::Heat::StructuredDeployment Properties: -- cgit 1.2.3-korg