Description: URL Base where all of our templates are available
Type: String
Resources:
+ RabbitMQ:
+ Type: AWS::CloudFormation::Stack
+ TemplateURL:
+ Fn::Join:
+ - {Ref: TemplateRoot}
+ - rabbitmq.yaml
+ Parameters:
+ InstanceType: m1.small
+ KeyName: default
+ RabbitMQImage: image-rabbitmq
MySQL:
Type: AWS::CloudFormation::Stack
TemplateURL:
- '@'
- {Fn::GetAtt: [ MySQL , MySQLHost ]}
- '/keystone'
+ Heat:
+ Type: AWS::CloudFormation::Stack
+ TemplateURL:
+ Fn::Join:
+ - {Ref: TemplateRoot}
+ - heat.yaml
+ Parameters:
+ KeyName: default
+ HeatDSN:
+ Fn::Join:
+ - 'mysql://heat:'
+ - {Fn::GetAtt: [ MySQL, HeatPassword ] }
+ - '@'
+ - {Fn::GetAtt: [ MySQL, MySQLHost ]}
+ - '/heat'
Description: Keystone database username.
Type: String
Default: keystone
+ HeatUser:
+ Description: Heat database username.
+ Type: String
+ Default: heat
MySQLImage:
Type: String
BootstrapHost:
- database: keystone
username: {Ref: KeystoneUser}
userhandle: {Ref: KeystonePasswordHandle}
+ - database: heat
+ username: {Ref: HeatUser}
+ userhandle: {Ref: HeatPasswordHandle}
mysql-migration:
users:
root:
{Ref: MySQLImage}
InstanceType: {Ref: InstanceType}
KeyName: {Ref: KeyName}
+ HeatPasswordHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ HeatPassword:
+ DependsOn: MySQL
+ Type: AWS::CloudFormation::WaitCondition
+ Properties:
+ Handle: {Ref: HeatPasswordHandle}
+ Timeout: 90
KeystonePasswordHandle:
Type: AWS::CloudFormation::WaitConditionHandle
KeystonePassword:
KeystonePassword:
Fn::GetAtt: [ KeystonePassword, Data ]
KeystoneUser: {Ref: KeystoneUser}
+ HeatPassword:
+ Fn::GetAtt: [ HeatPassword, Data ]
+ HeatUser: {Ref: HeatUser}