summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2013-05-08 16:13:07 -0700
committerClint Byrum <clint@fewbar.com>2013-05-08 16:13:07 -0700
commit2af825cf338595c4538543c572fbc2664c668a91 (patch)
tree7a565f8e93480946c6d474e1765784c70864754b
parentb4f7eae590bfea841db3099c4dba1160fb2f6d27 (diff)
Add glance to mysql and base.
-rw-r--r--base.yaml23
-rw-r--r--mysql.yaml18
2 files changed, 37 insertions, 4 deletions
diff --git a/base.yaml b/base.yaml
index f05664e6..4353c42f 100644
--- a/base.yaml
+++ b/base.yaml
@@ -40,10 +40,25 @@ Resources:
KeystoneDSN:
Fn::Join:
- 'mysql://keystone:'
- - {Fn::GetAtt: [ MySQL , KeystonePassword ]}
+ - {"Fn::GetAtt": [ MySQL , KeystonePassword ]}
- '@'
- - {Fn::GetAtt: [ MySQL , MySQLHost ]}
+ - {"Fn::GetAtt": [ MySQL , MySQLHost ]}
- '/keystone'
+ Glance:
+ Type: AWS::CloudFormation::Stack
+ TemplateURL:
+ Fn::Join:
+ - {Ref: TemplateRoot}
+ - glance.yaml
+ Parameters:
+ KeyName: default
+ HeatDSN:
+ Fn::Join:
+ - 'mysql://glance:'
+ - {"Fn::GetAtt": [ MySQL, GlancePassword ] }
+ - '@'
+ - {"Fn::GetAtt": [ MySQL, MySQLHost ]}
+ - '/glance'
Heat:
Type: AWS::CloudFormation::Stack
TemplateURL:
@@ -55,7 +70,7 @@ Resources:
HeatDSN:
Fn::Join:
- 'mysql://heat:'
- - {Fn::GetAtt: [ MySQL, HeatPassword ] }
+ - {"Fn::GetAtt": [ MySQL, HeatPassword ] }
- '@'
- - {Fn::GetAtt: [ MySQL, MySQLHost ]}
+ - {"Fn::GetAtt": [ MySQL, MySQLHost ]}
- '/heat'
diff --git a/mysql.yaml b/mysql.yaml
index cd472f10..3c1658c2 100644
--- a/mysql.yaml
+++ b/mysql.yaml
@@ -17,6 +17,10 @@ Parameters:
Description: Heat database username.
Type: String
Default: heat
+ GlanceUser:
+ Description: Glance database username.
+ Type: String
+ Default: heat
MySQLImage:
Type: String
BootstrapHost:
@@ -65,6 +69,9 @@ Resources:
- database: heat
username: {Ref: HeatUser}
userhandle: {Ref: HeatPasswordHandle}
+ - database: glance
+ username: {Ref: GlanceUser}
+ userhandle: {Ref: GlancePasswordHandle}
mysql-migration:
users:
root:
@@ -91,6 +98,14 @@ Resources:
{Ref: MySQLImage}
InstanceType: {Ref: InstanceType}
KeyName: {Ref: KeyName}
+ GlancePasswordHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ GlancePassword:
+ DependsOn: MySQL
+ Type: AWS::CloudFormation::WaitCondition
+ Properties:
+ Handle: {Ref: GlancePasswordHandle}
+ Timeout: 90
HeatPasswordHandle:
Type: AWS::CloudFormation::WaitConditionHandle
HeatPassword:
@@ -116,3 +131,6 @@ Outputs:
HeatPassword:
Fn::GetAtt: [ HeatPassword, Data ]
HeatUser: {Ref: HeatUser}
+ GlancePassword:
+ Fn::GetAtt: [ GlancePassword, Data ]
+ GlanceUser: {Ref: GlanceUser}