heat templates : Cleanup README and template whitespace

Align README with latest templates and cleanup some whitespace issues
ref #147

Change-Id: Iad39c388806bba6497f8abf0de46c04ef7ac7e69
Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
Steven Hardy 2012-06-21 14:03:19 +01:00
parent c44746d8d5
commit 89dca2fd6a
5 changed files with 71 additions and 36 deletions

View File

@ -1,8 +1,8 @@
{ {
"AWSTemplateFormatVersion" : "2010-09-09", "AWSTemplateFormatVersion" : "2010-09-09",
"Description": "Sample template to bring up Puppet Master instance that can be used to bootstrap and manage Puppet Clients. The Puppet Master is populated from an embedded template that defines the set of applications to load. **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.", "Description": "Sample template to bring up Puppet Master instance that can be used to bootstrap and manage Puppet Clients. The Puppet Master is populated from an embedded template that defines the set of applications to load. **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : { "Parameters" : {
"InstanceType" : { "InstanceType" : {
"Description" : "WebServer EC2 instance type", "Description" : "WebServer EC2 instance type",
@ -14,7 +14,7 @@
"KeyName" : { "KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the PuppetMaster", "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the PuppetMaster",
"Type" : "String" "Type" : "String"
}, },
"ContentManifest" : { "ContentManifest" : {
"Default" : "/wordpress/: { include wordpress }", "Default" : "/wordpress/: { include wordpress }",
"Description" : "Manifest of roles to add to nodes.pp", "Description" : "Manifest of roles to add to nodes.pp",
@ -53,8 +53,8 @@
"RHEL-6.2" : { "32" : "rhel62-i386-cfntools", "64" : "rhel62-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" } "RHEL-6.3" : { "32" : "rhel63-i386-cfntools", "64" : "rhel63-x86_64-cfntools" }
} }
}, },
"Resources" : { "Resources" : {
"CFNInitUser" : { "CFNInitUser" : {
"Type" : "AWS::IAM::User", "Type" : "AWS::IAM::User",
"Properties" : { "Properties" : {
@ -117,7 +117,7 @@
"mode" : "100644", "mode" : "100644",
"owner" : "root", "owner" : "root",
"group" : "wheel" "group" : "wheel"
}, },
"/etc/puppet/puppet.conf" : { "/etc/puppet/puppet.conf" : {
"content" : { "Fn::Join" : ["", [ "content" : { "Fn::Join" : ["", [
"[main]\n", "[main]\n",
@ -148,28 +148,28 @@
"content" : {"Fn::Join" : ["", [ "content" : {"Fn::Join" : ["", [
"node basenode {\n", "node basenode {\n",
" include cfn\n", " include cfn\n",
"}\n", "}\n",
"node /^.*internal$/ inherits basenode {\n", "node /^.*internal$/ inherits basenode {\n",
" case $cfn_roles {\n", " case $cfn_roles {\n",
" ", { "Ref" : "ContentManifest" }, "\n", " ", { "Ref" : "ContentManifest" }, "\n",
" }\n", " }\n",
"}\n"]]}, "}\n"]]},
"mode" : "100644", "mode" : "100644",
"owner" : "root", "owner" : "root",
"group" : "wheel" "group" : "wheel"
}, },
"/etc/puppet/manifests/site.pp" : { "/etc/puppet/manifests/site.pp" : {
"content" : "import \"nodes\"\n", "content" : "import \"nodes\"\n",
"mode" : "100644", "mode" : "100644",
"owner" : "root", "owner" : "root",
"group" : "wheel" "group" : "wheel"
} }
}, },
"services" : { "services" : {
"sysvinit" : { "sysvinit" : {
"puppetmaster" : { "puppetmaster" : {
"enabled" : "true", "enabled" : "true",
"ensureRunning" : "true" "ensureRunning" : "true"
} }
} }
} }
@ -208,7 +208,7 @@
"SecurityGroupIngress" : [ "SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8140", "ToPort" : "8140", "CidrIp": "0.0.0.0/0"}, { "IpProtocol" : "tcp", "FromPort" : "8140", "ToPort" : "8140", "CidrIp": "0.0.0.0/0"},
{ "IpProtocol" : "tcp", "FromPort": "22", "ToPort": "22", "CidrIp": "0.0.0.0/0" } { "IpProtocol" : "tcp", "FromPort": "22", "ToPort": "22", "CidrIp": "0.0.0.0/0" }
] ]
} }
}, },
@ -225,7 +225,7 @@
} }
} }
}, },
"Outputs" : { "Outputs" : {
"PuppetMasterDNSName" : { "PuppetMasterDNSName" : {
"Value" : { "Fn::GetAtt" : [ "PuppetMasterInstance", "PrivateDnsName" ] }, "Value" : { "Fn::GetAtt" : [ "PuppetMasterInstance", "PrivateDnsName" ] },
@ -237,4 +237,3 @@
} }
} }
} }

View File

@ -25,12 +25,14 @@ WordPress_2_Instances.template
- Creates a two instance wordpress/mysql server - Creates a two instance wordpress/mysql server
Note: There is an instance for mysql and instance for wordpress Note: There is an instance for mysql and instance for wordpress
WordPress_2_Instances_With_EBS_Volume.template WordPress_2_Instances_With_EBS.template
- Creates a two instance wordpress/mysql server with persistent volume - Creates a two instance wordpress/mysql server with persistent volume
Note: There is an instance for mysql and instance for wordpress Note: There is an instance for mysql and instance for wordpress
WordPress_Composed_Instances.template WordPress_Composed_Instances.template
- Creates a two instance wordpress/mysql server. The MySQL server is loaded as a nested template from the URL of the latest MySQL_Single_Instance template on GitHub. - Creates a two instance wordpress/mysql server.
- The MySQL server is loaded as a nested template from the URL of the latest
MySQL_Single_Instance template on GitHub.
Note: There is an instance for mysql and instance for wordpress Note: There is an instance for mysql and instance for wordpress
MySQL_Single_Instance.template MySQL_Single_Instance.template
@ -45,12 +47,47 @@ MySQL_Single_Instance.template
WordPress_Single_Instance.template WordPress_Single_Instance.template
- Creates a single instance wordpress/mysql server - Creates a single instance wordpress/mysql server
WordPress_Single_Instance_With_EBS_Volume.template WordPress_Single_Instance_With_EBS.template
- Creates a single instance wordpress/mysql server with EBS Volume - Creates a single instance wordpress/mysql server with EBS Volume
WordPress_Single_Instance_With_EIP.template WordPress_Single_Instance_With_EIP.template
- Creates a single instance wordpress/mysql server with EIP with full security - Creates a single instance wordpress/mysql server with EIP with full security
WordPress_Single_Instance_With_EBS_EIP.template
- Creates a single instance wordpress/mysql server with EIP with full security
and EBS Volume
WordPress_Single_Instance_deb.template
- Creates a single instance wordpress/mysql server, ubuntu based template
WordPress_Single_Instance_puppet.template
- Creates a single instance wordpress/mysql server
- Uses the Puppet client to install server roles
WordPress_Single_Instance_With_HA.template
- Creates a single instance wordpress/mysql server
- Includes configuration to use heat HA features
PuppetMaster_Single_Instance.template
- Sample template to bring up a Puppet Master instance
WordPress_2_Instances_With_EBS_EIP.template
- Creates a two instance wordpress/mysql server with persistent volume
- EIP with full security
Note: There is an instance for mysql and instance for wordpress
Rails_Single_Instance.template
- Create a Ruby on Rails stack
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
- Other templates: -
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
getting_started.template
- Skeleton example template
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
- END OF TEMPLATES - - END OF TEMPLATES -
------------------------------------------------------------------------------- -------------------------------------------------------------------------------

View File

@ -147,12 +147,12 @@
"files" : { "files" : {
"/tmp/setup.mysql" : { "/tmp/setup.mysql" : {
"content" : { "Fn::Join" : ["", [ "content" : { "Fn::Join" : ["", [
"CREATE DATABASE ", { "Ref" : "DBName" }, ";\n", "CREATE DATABASE ", { "Ref" : "DBName" }, ";\n",
"GRANT ALL PRIVILEGES ON ", { "Ref" : "DBName" }, ".* TO '", { "Ref" : "DBUsername" }, "'@'localhost'\n", "GRANT ALL PRIVILEGES ON ", { "Ref" : "DBName" }, ".* TO '", { "Ref" : "DBUsername" }, "'@'localhost'\n",
"IDENTIFIED BY '", { "Ref" : "DBPassword" }, "';\n", "IDENTIFIED BY '", { "Ref" : "DBPassword" }, "';\n",
"FLUSH PRIVILEGES;\n", "FLUSH PRIVILEGES;\n",
"EXIT\n" "EXIT\n"
]]}, ]]},
"mode" : "000644", "mode" : "000644",
"owner" : "root", "owner" : "root",
"group" : "root" "group" : "root"

View File

@ -1,7 +1,7 @@
TemplateFormatVersion" : "2010-09-09", TemplateFormatVersion" : "2010-09-09",
"Description": "Sample template to bring up WordPress using the Puppet client to install server roles. A WaitCondition is used to hold up the stack creation until the application is deployed. **WARNING** This template creates one or more Amazon EC2 instances and CloudWatch alarms. You will be billed for the AWS resources used if you create a stack from this template.", "Description": "Sample template to bring up WordPress using the Puppet client to install server roles. A WaitCondition is used to hold up the stack creation until the application is deployed. **WARNING** This template creates one or more Amazon EC2 instances and CloudWatch alarms. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : { "Parameters" : {
"KeyName": { "KeyName": {
"Type": "String", "Type": "String",
@ -50,7 +50,7 @@ TemplateFormatVersion" : "2010-09-09",
"ConstraintDescription" : "must contain only alphanumeric characters." "ConstraintDescription" : "must contain only alphanumeric characters."
} }
}, },
"Mappings" : { "Mappings" : {
"AWSInstanceType2Arch" : { "AWSInstanceType2Arch" : {
"t1.micro" : { "Arch" : "64" }, "t1.micro" : { "Arch" : "64" },
@ -78,8 +78,8 @@ TemplateFormatVersion" : "2010-09-09",
"sa-east-1" : { "32" : "ami-3e3be423", "64" : "ami-3c3be421", "64HVM" : "NOT_YET_SUPPORTED" } "sa-east-1" : { "32" : "ami-3e3be423", "64" : "ami-3c3be421", "64HVM" : "NOT_YET_SUPPORTED" }
} }
}, },
"Resources" : { "Resources" : {
"CFNInitUser" : { "CFNInitUser" : {
"Type" : "AWS::IAM::User", "Type" : "AWS::IAM::User",
@ -104,7 +104,7 @@ TemplateFormatVersion" : "2010-09-09",
} }
}, },
"WebServer": { "WebServer": {
"Type": "AWS::EC2::Instance", "Type": "AWS::EC2::Instance",
"Metadata" : { "Metadata" : {
"AWS::CloudFormation::Init" : { "AWS::CloudFormation::Init" : {
@ -146,10 +146,10 @@ TemplateFormatVersion" : "2010-09-09",
} }
}, },
"services" : { "services" : {
"sysvinit" : { "sysvinit" : {
"puppet" : { "puppet" : {
"enabled" : "true", "enabled" : "true",
"ensureRunning" : "true" "ensureRunning" : "true"
} }
} }
} }
@ -230,7 +230,7 @@ TemplateFormatVersion" : "2010-09-09",
} }
} }
}, },
"Outputs": { "Outputs": {
"WebsiteURL": { "WebsiteURL": {
"Value": { "Fn::Join": [ "", [ "http://", { "Fn::GetAtt": [ "WebServer", "PublicDnsName" ] }, "/wordpress" ] ] }, "Value": { "Fn::Join": [ "", [ "http://", { "Fn::GetAtt": [ "WebServer", "PublicDnsName" ] }, "/wordpress" ] ] },

View File

@ -13,7 +13,7 @@
"Properties" : { "Properties" : {
"KeyName" : { "Ref" : "KeyName" }, "KeyName" : { "Ref" : "KeyName" },
"ImageId" : "F16-x86_64-cfntools", "ImageId" : "F16-x86_64-cfntools",
"InstanceType": "m1.large", "InstanceType": "m1.large",
"UserData" : { "Fn::Base64" : "80" } "UserData" : { "Fn::Base64" : "80" }
} }
} }
@ -22,9 +22,8 @@
"InstanceIp" : { "InstanceIp" : {
"Value" : { "Fn::Join" : ["", ["ssh ec2-user@", "Value" : { "Fn::Join" : ["", ["ssh ec2-user@",
{"Fn::GetAtt": ["MyInstance", {"Fn::GetAtt": ["MyInstance",
"PublicIp"]}]]}, "PublicIp"]}]]},
"Description" : "My ssh command" "Description" : "My ssh command"
} }
} }
} }