1 heat_template_version: 2013-05-23
4 HEAT template for deploying a single-node wordpress deployment on Rackspace Cloud
5 using Cloud Server, and Cloud Database.
10 description: flavor id for the web server instances
12 default: 1GB Standard Instance
15 - 512MB Standard Instance
16 - 1GB Standard Instance
17 - 2GB Standard Instance
18 - 4GB Standard Instance
19 - 8GB Standard Instance
20 - 15GB Standard Instance
21 - 30GB Standard Instance
22 description: must be a valid Rackspace Cloud Server flavor.
25 description: base name for the web server instances
27 default: Wordpress Webserver
30 description: nova keypair to use for ssh access to the web nodes
35 description: the name for the wordpress database
41 description: must be between 1 and 64 characters
42 - allowed_pattern: "[a-zA-Z][a-zA-Z0-9]*"
43 description: must begin with a letter and contain only alphanumeric characters.
48 description: wordpress database admin account username
54 description: must be between 1 and 16 characters
55 - allowed_pattern: "[a-zA-Z][a-zA-Z0-9]*"
56 description: must begin with a letter and contain only alphanumeric characters.
61 description: wordpress database admin account password
67 description: must be between 1 and 14 characters
68 - allowed_pattern: "[a-zA-Z0-9]*"
69 description : must contain only alphanumeric characters.
72 description: wordpress database instance size
82 description: must be a valid cloud database flavor
85 description : wordpress database volume size (in GB)
92 description: must be between 1 and 1024 GB
95 description: the database instance name
100 description: valid domain name
105 description: domain owner email addresses
107 default: admin@example.com
110 description: domain record type
126 type: Rackspace::Cloud::Server
128 flavor: { get_param: web_node_flavor }
129 image: fd8e4f18-9270-4f43-8932-c3719ae2f7fd # CentOS 6.5
130 name: { get_param: web_server_name }
131 key_name: { get_param: key_name }
136 yum -y install mysql httpd wordpress
137 sed -i "/Deny from All/d" /etc/httpd/conf.d/wordpress.conf
138 sed -i "s/Require local/Require all granted/" /etc/httpd/conf.d/wordpress.conf
139 sed --in-place --e "s/localhost/%dbhost%/" --e "s/database_name_here/%dbname%/" --e "s/username_here/%dbuser%/" --e "s/password_here/%dbpass%/" /usr/share/wordpress/wp-config.php
140 /etc/init.d/httpd start
142 iptables -I INPUT -p tcp --dport 80 -j ACCEPT
143 iptables-save > /etc/sysconfig/iptables
145 "%dbhost%": { get_attr: [ db, hostname ] }
146 "%dbname%": { get_param: db_name }
147 "%dbuser%": { get_param: db_username }
148 "%dbpass%": { get_param: db_password }
151 type: OS::Trove::Instance
153 name: { get_param: db_instance_name }
154 flavor: { get_param: db_flavor }
155 size: { get_param: db_volume_size }
157 - name: { get_param: db_username }
158 password: { get_param: db_password }
160 - { get_param: db_name }
162 - name: { get_param: db_name }
165 type: Rackspace::Cloud::DNS
167 name: { get_param: domain_name }
168 emailAddress: { get_param: email_address }
170 - name: { get_param: domain_name }
171 type: { get_param: domain_record_type }
172 data: { get_attr: [web_node, accessIPv4] }
173 - name: { get_param: domain_name }
175 data: dns1.stabletransit.com
176 - name: { get_param: domain_name }
178 data: dns2.stabletransit.com
185 template: "http://%ip%/wordpress"
187 "%ip%": { get_attr: [ web_node, accessIPv4 ] }
188 description: Public URL for the wordpress blog
190 wordpress_domain_url:
193 template: "http://%domain%/wordpress"
195 "%domain%": { get_param: domain_name }
196 description: Public URL for the wordpress blog with domain name