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
This commit is contained in:
Jan Provaznik 2014-06-09 03:36:24 -04:00
parent 19271ebcd2
commit 306841c7f2
3 changed files with 17 additions and 17 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: