From ede22be715255eb2f15e2808c94bbec8367e0dbd Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sun, 15 Apr 2012 10:28:52 -0700 Subject: [PATCH] Update WordPress_2_Instances.template to use cfntools and cfn-init Signed-off-by: Steven Dake --- templates/WordPress_2_Instances.template | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/WordPress_2_Instances.template b/templates/WordPress_2_Instances.template index 1f5fe372..4add0393 100644 --- a/templates/WordPress_2_Instances.template +++ b/templates/WordPress_2_Instances.template @@ -82,12 +82,12 @@ "cc1.4xlarge" : { "Arch" : "64" } }, "DistroArch2AMI": { - "F16" : { "32" : "F16-i386-gold", "64" : "F16-x86_64-gold" }, - "F17" : { "32" : "F17-i386-gold", "64" : "F17-x86_64-gold" }, - "U10" : { "32" : "U10-i386-gold", "64" : "U10-x86_64-gold" }, - "RHEL-6.1" : { "32" : "rhel61-i386-gold", "64" : "rhel61-x86_64-gold" }, - "RHEL-6.2" : { "32" : "rhel62-i386-gold", "64" : "rhel62-x86_64-gold" }, - "RHEL-6.3" : { "32" : "rhel63-i386-gold", "64" : "rhel63-x86_64-gold" } + "F16" : { "32" : "F16-i386-cfntools", "64" : "F16-x86_64-cfntools" }, + "F17" : { "32" : "F17-i386-cfntools", "64" : "F17-x86_64-cfntools" }, + "U10" : { "32" : "U10-i386-cfntools", "64" : "U10-x86_64-cfntools" }, + "RHEL-6.1" : { "32" : "rhel61-i386-cfntools", "64" : "rhel61-x86_64-cfntools" }, + "RHEL-6.2" : { "32" : "rhel62-i386-cfntools", "64" : "rhel62-x86_64-cfntools" }, + "RHEL-6.3" : { "32" : "rhel63-i386-cfntools", "64" : "rhel63-x86_64-cfntools" } } }, @@ -120,6 +120,7 @@ "KeyName" : { "Ref" : "KeyName" }, "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ "#!/bin/bash -v\n", + "/opt/aws/bin/cfn-init -f /var/lib/cloud/data/cfn-init-data\n", "sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/DB_HOST/", "/ /usr/share/wordpress/wp-config.php\n", "set --in-place --e \"s/DB_HOST\\s*',\\s*'localhost/DB_HOST', '", { "Fn::GetAtt": ["DatabaseServer", "PrivateIp"] }, "/\" /usr/share/wordpress/wp-config.php\n", "cp /usr/share/wordpress/wp-config.php /usr/share/wordpress/wp-config.orig\n" @@ -153,6 +154,7 @@ "KeyName" : { "Ref" : "KeyName" }, "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ "#!/bin/bash -v\n", + "/opt/aws/bin/cfn-init -f /var/lib/cloud/data/cfn-init-data\n", "# Setup MySQL root password and create a user\n", "mysqladmin -u root password '", { "Ref" : "DBRootPassword" }, "'\n", "cat >> /tmp/mysql-wordpress-config << EOF\n", -- 2.45.2