heat templates : Align AutoScaling template with cfntools
Updated cfntools require authentication for cfn-push-stats, so the AutoScaling template needs the user/key and boto.cfg additions, same as in the HA templates, otherwise cfn-push-stats, and hence autoscaling doesn't work Change-Id: Ib3ef4a932bb656f29e25ef745409f5fe3e82c356 Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
parent
f4c34c5628
commit
77069eefd5
@ -93,6 +93,15 @@
|
||||
},
|
||||
|
||||
"Resources" : {
|
||||
"CfnUser" : {
|
||||
"Type" : "AWS::IAM::User"
|
||||
},
|
||||
"WebServerKeys" : {
|
||||
"Type" : "AWS::IAM::AccessKey",
|
||||
"Properties" : {
|
||||
"UserName" : {"Ref": "CfnUser"}
|
||||
}
|
||||
},
|
||||
"WebServerGroup" : {
|
||||
"Type" : "AWS::AutoScaling::AutoScalingGroup",
|
||||
"Properties" : {
|
||||
@ -190,6 +199,16 @@
|
||||
"AWS::CloudFormation::Init" : {
|
||||
"config" : {
|
||||
"files" : {
|
||||
"/etc/cfn/cfn-credentials" : {
|
||||
"content" : { "Fn::Join" : ["", [
|
||||
"AWSAccessKeyId=", { "Ref" : "WebServerKeys" }, "\n",
|
||||
"AWSSecretKey=", {"Fn::GetAtt": ["WebServerKeys",
|
||||
"SecretAccessKey"]}, "\n"
|
||||
]]},
|
||||
"mode" : "000400",
|
||||
"owner" : "root",
|
||||
"group" : "root"
|
||||
},
|
||||
"/tmp/setup.mysql" : {
|
||||
"content" : { "Fn::Join" : ["", [
|
||||
"CREATE DATABASE ", { "Ref" : "DBName" }, ";\n",
|
||||
@ -248,6 +267,11 @@
|
||||
" -r LaunchConfig ",
|
||||
" --region ", { "Ref" : "AWS::Region" }, "\n",
|
||||
|
||||
"# Update boto config (template created by heat-jeos tdl)\n",
|
||||
"sed -i \"s/__GATEWAY_IP__/",
|
||||
"$(/sbin/ip route | grep \"^default\" | awk '{print $3}')/\"",
|
||||
" /etc/boto.cfg \n",
|
||||
|
||||
"# Setup MySQL root password and create a user\n",
|
||||
"mysqladmin -u root password '", { "Ref" : "DBRootPassword" }, "'\n",
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user