Permalink
Browse files

added a new recipe for a wordpress cluster using RDS, bug fix in varn…

…ish_reload for ubuntu natty
  • Loading branch information...
1 parent c41ecd9 commit cb4b646ff7e79ba854d492e3fb52667a7d9a230c Ryan Mark committed May 16, 2011
@@ -1,6 +1,6 @@
#!/bin/bash
-HOSTPORT=":6082"
+HOST="localhost:6082"
NOW=`date +%s`
FILENAME=~/varnish/`hostname`.vcl
@@ -11,10 +11,10 @@ exit 1
}
if [ -f "$FILENAME" ]; then
- varnishadm -T $HOSTPORT vcl.load reload$NOW $FILENAME || error
- varnishadm -T $HOSTPORT vcl.use reload$NOW || error
+ varnishadm -T $HOST vcl.load reload$NOW $FILENAME || error
+ varnishadm -T $HOST vcl.use reload$NOW || error
echo "Current configs:"
- varnishadm -T $HOSTPORT vcl.list
+ varnishadm -T $HOST vcl.list
else
error
fi
@@ -0,0 +1,29 @@
+{%extends 'wordpress/base.sh' %}
+
+{% block install %}
+# install some basic stuff
+DEBIAN_FRONTEND='noninteractive' \
+apt-get -q -y -o Dpkg::Options::='--force-confnew' install \
+ zip git-core subversion unattended-upgrades \
+ build-essential \
+ apache2 \
+ php5 php5-mysql php5-gd php-pear libapache2-mod-php5 php-apc php5-curl \
+ mysql-client \
+ postfix
+
+# enable mod_rewrite
+a2enmod rewrite
+
+# Install apache config
+cp /home/$USERNAME/cloud-commander/wordpress/etc/apache2/apache2.conf /etc/apache2/apache2.conf
+chown root:root /etc/apache2/apache2.conf
+chmod 644 /etc/apache2/apache2.conf
+
+# Needs a reboot -
+{% include "_nfs-server.sh" %}
+
+{% endblock %}
+
+{% block finish %}
+reboot
+{% endblock %}
View
@@ -22,27 +22,19 @@
# Tree for picking images. Feel free to change, but be careful.
images:
- us-east-1:
- ubuntu:
- '10.10':
- 64bit: ami-548c783d
- 32bit: ami-508c7839
- '10.04':
- 64bit: ami-4a0df923
- 32bit: ami-480df921
- us-west-1:
- ubuntu:
- '10.10':
- 64bit: ami-ca1f4f8f
- 32bit: ami-c81f4f8d
- '10.04':
- 64bit: ami-880c5ccd
- 32bit: ami-8c0c5cc9
- eu-west-1:
- ubuntu:
- '10.10':
- 32bit: ami-465c6932
- 64bit: ami-405c6934
+ us-east-1:
+ ubuntu:
+ '10.04': {32bit: ami-480df921, 64bit: ami-4a0df923}
+ '10.10': {32bit: ami-ccf405a5, 64bit: ami-cef405a7}
+ '11.04': {32bit: ami-06ad526f, 64bit: ami-1aad5273}
+ us-west-1:
+ ubuntu:
+ '10.04': {32bit: ami-8c0c5cc9, 64bit: ami-880c5ccd}
+ '10.10': {32bit: ami-c81f4f8d, 64bit: ami-ca1f4f8f}
+ '11.04': {32bit: ami-116f3c54, 64bit: ami-136f3c56}
+ eu-west-1:
+ ubuntu:
+ '10.10': {32bit: ami-465c6932, 64bit: ami-405c6934}
# Shortcut names for instance sizes. Because I can never remember
@@ -0,0 +1,45 @@
+server:
+ - type: 'app'
+ name: 'app1.beta.wp'
+ hosts: 'cache, app1'
+ script: 'wordpress/app.sh'
+ size: 'small'
+ os: 'ubuntu'
+ version: '11.04'
+ arch: '32bit'
+ security_group: 'app-staging'
+ cluster: 'wordpress-staging'
+
+ - type: 'app'
+ name: 'app2.beta.wp'
+ hosts: 'app2'
+ script: 'wordpress/app.sh'
+ size: 'small'
+ os: 'ubuntu'
+ version: '11.04'
+ arch: '32bit'
+ security_group: 'app-staging'
+ cluster: 'wordpress-staging'
+
+ - type: 'admin'
+ name: 'admin.beta.wp'
+ hosts: 'admin, log, mail, cron, nfs'
+ script: 'wordpress/admin-nfs.sh'
+ size: 'small'
+ os: 'ubuntu'
+ version: '11.04'
+ arch: '32bit'
+ security_group: 'admin-staging'
+ cluster: 'wordpress-staging'
+
+ - type: 'lb'
+ name: 'lb.beta.wp'
+ hosts: 'lb'
+ script: 'wordpress/lb.sh'
+ size: 'small'
+ os: 'ubuntu'
+ version: '11.04'
+ arch: '32bit'
+ security_group: 'lb-staging'
+ cluster: 'wordpress-staging'
+
@@ -3,9 +3,9 @@ server:
name: 'app1.beta.wp'
hosts: 'cache, app1'
script: 'wordpress/app.sh'
- size: 'micro'
+ size: 'small'
os: 'ubuntu'
- version: '10.10'
+ version: '11.04'
arch: '64bit'
security_group: 'app-staging'
cluster: 'wordpress-staging'
@@ -14,9 +14,9 @@ server:
name: 'app2.beta.wp'
hosts: 'app2'
script: 'wordpress/app.sh'
- size: 'micro'
+ size: 'small'
os: 'ubuntu'
- version: '10.10'
+ version: '11.04'
arch: '64bit'
security_group: 'app-staging'
cluster: 'wordpress-staging'
@@ -25,9 +25,9 @@ server:
name: 'db.beta.wp'
hosts: 'db, nfs'
script: 'wordpress/db.sh'
- size: 'micro'
+ size: 'small'
os: 'ubuntu'
- version: '10.10'
+ version: '11.04'
arch: '64bit'
security_group: 'db-staging'
cluster: 'wordpress-staging'
@@ -36,9 +36,9 @@ server:
name: 'admin.beta.wp'
hosts: 'admin, log, mail, cron'
script: 'wordpress/admin.sh'
- size: 'micro'
+ size: 'small'
os: 'ubuntu'
- version: '10.10'
+ version: '11.04'
arch: '64bit'
security_group: 'admin-staging'
cluster: 'wordpress-staging'
@@ -47,9 +47,9 @@ server:
name: 'lb.beta.wp'
hosts: 'lb'
script: 'wordpress/lb.sh'
- size: 'micro'
+ size: 'small'
os: 'ubuntu'
- version: '10.10'
+ version: '11.04'
arch: '64bit'
security_group: 'lb-staging'
cluster: 'wordpress-staging'

0 comments on commit cb4b646

Please sign in to comment.