1 heat_template_version: 2013-05-23
4 A template implementation of a resource that provides a Wordpress blog server
9 description: Rackspace Cloud Server flavor
11 default: 1GB Standard Instance
14 - 512MB Standard Instance
15 - 1GB Standard Instance
16 - 2GB Standard Instance
17 - 4GB Standard Instance
18 - 8GB Standard Instance
19 - 15GB Standard Instance
20 - 30GB Standard Instance
21 description: must be a valid Rackspace Cloud Server flavor.
24 description: the instance name
26 default: Wordpress Webserver
29 description: Nova keypair name for ssh access to the server
33 description: The database hostname
39 description: The WordPress database name
45 description: must be from 1 to 64 characters
46 - allowed_pattern: "[a-zA-Z][a-zA-Z0-9]*"
47 description: must begin with a letter and contain only alphanumeric characters.
52 description: The WordPress database admin account username
58 description: must be from 1 to 16 characters
59 - allowed_pattern: "[a-zA-Z][a-zA-Z0-9]*"
60 description: must begin with a letter and contain only alphanumeric characters.
65 description: The WordPress database admin account password
71 description: must be between 1 and 41 characters
72 - allowed_pattern: "[a-zA-Z0-9]*"
73 description : must contain only alphanumeric characters.
78 type: "Rackspace::Cloud::Server"
80 flavor: { get_param: flavor }
81 # only tested on Fedora at the moment
82 image: fd8e4f18-9270-4f43-8932-c3719ae2f7fd # CentOS 6.5
83 name: { get_param: server_name }
84 key_name: { get_param: key_name }
89 yum -y install mysql-server httpd wordpress
90 sed -i "/Deny from All/d" /etc/httpd/conf.d/wordpress.conf
91 sed -i "s/Require local/Require all granted/" /etc/httpd/conf.d/wordpress.conf
92 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
93 /etc/init.d/httpd start
95 iptables -I INPUT -p tcp --dport 80 -j ACCEPT
96 iptables-save > /etc/sysconfig/iptables
98 "%dbhost%": { get_param: db_host }
99 "%dbname%": { get_param: db_name }
100 "%dbuser%": { get_param: db_username }
101 "%dbpass%": { get_param: db_password }
106 value: { get_attr: [ wordpress, accessIPv4 ] }
107 description: The public IP address of the server
110 value: { get_attr: [ wordpress, privateIPv4 ] }
111 description: The private IP address of the server
116 template: http://%ip%/wordpress
118 "%ip%": { get_attr: [ wordpress, accessIPv4 ] }
119 description: URL for Wordpress wiki