Wordpress & Email All-In-One
Published by Ryan Geyer on Aug 26, 2012Revision: 7 This component has been superseded. Get the current version here
Description
Description
This is an All-In-One (AIO) server for hosting PHP based web sites/applications, as well as email for one or many domain names (virtual hosting).
LNMP Virtual Hosting
The web hosting environment is a full LNMP stack consisting of;
- Linux - CentOS 5.8
- Nginx - 1.2.2
- MySQL - 5.1.55-community
- PHP - 5.3.6
Email Virtual Hosting
In addition to the LNMP stack, a Postfix server is installed and configured for virtual hosting of one or many email domains. Currently, the postfix server is configured to relay email for configured email addresses (more information on that below) to one or more other email addresses. I use this to accept email for a domain, and effectively "forward" it to my gmail account where I manage all of my email.
Usage
Prerequisites
Launching for the first time
If you've just imported this ServerTemplate from the library, here's what you need to know to get started.
Inputs
Database Admin Password
Pick a secure password for the database administrator. The default administrator username is "administrator". It's possible that you'll never need to use these credentials since the Chef recipes set everything up for you, but it's good to have in case of emergency or for administrative tasks not covered in an operational script etc.
Postfix MySQL Database Password
Pick a secure password for the user account that postfix will use to access the MySQL database. Did I mention that Postfix configuration information is stored in MySQL? I promise, I'll explain later.
Total Volume Size (1)
This server stores all of the data which needs to be persistent either on a separate attached storage volume, or on an LVM partition of your ephemeral storage to ease backups, disaster recovery, and vertical scaling. Specify a volume size here that makes sense for the data you're storing, including MySQL databases and your web site/application html and code files. NOTE: The default is 2GB
Backup Lineage (1)
For the attached volume, and for the continuous backups a lineage needs to be specified. This is effectively a name for the data backup, feel free to specify anything for this. For all of the volume management stuff I'm making heavy use of the RightScale "Storage Toolbox", and this input comes from those tools. Take a peek at the documentation and runbook for the "Storage Toolbox" here
- Web Server Hostname
Some basic tools will get installed and hosted for this server on a particular hostname. These are things like phpmyadmin, and (hopefully, eventually) some web UI tools for managing your server. You can specify the hostname you want this to appear on. I recommend that you use a hostname specific to the management of this server, like tools.domain.com etc.
If you're in a hurry, and just wanted to get this up and running quickly, that's all you'll need to know.
Contents
-
Cookbook Repo: git://github.com/rgeyer-rs-cookbooks/cookbooks_st.git of RightScale (v12.11.0-LTS) + LNMP
-
Cookbook Repo: git://github.com/rgeyer/cookbooks.git of RightScale (v12.11.0-LTS) + LNMP
-
Cookbook Repo: git://github.com/rgeyer/cookbooks_linux.git of RightScale (v12.11.0-LTS) + LNMP
-
Cookbook Repo: git://github.com/rgeyer/rightscale_cookbooks-1.git of RightScale (v12.11.0-LTS) + LNMP
-
Cookbook Repo: git://github.com/rightscale/cookbooks.git of RightScale (v12.11.0-LTS) + LNMP
-
Cookbook Repo: https://github.com/downloads/rgeyer-rs-cookbooks/cookbooks_all/release_20120709.tar.gz of RightScale (v12.11.0-LTS) + LNMP
-
MultiCloudImage: RightImage_RHEL_5.8_x64_v5.8 [rev 5]
-
MultiCloudImage: SoftLayerImage_Storage_CentOS_5.8_x64_v5.8 [rev 4]
-
MultiCloudImage: RightImage_CentOS_5.8_x64_v5.8_HVM_EBS [rev 2]
-
MultiCloudImage: RightImage_CentOS_5.8_x64_v5.8_EBS [rev 3]
-
MultiCloudImage: RightImage_CentOS_5.8_x64_v5.8 [rev 5]
-
MultiCloudImage: RightImage_CentOS_5.8_x64_v5.8 - XenServer [rev 5]
-
MultiCloudImage: RightImage_CentOS_5.8_x64_v5.8 - KVM [rev 8]
-
Recipe: block_device::do_secondary_restore
-
Recipe: block_device::default
-
Recipe: block_device::do_delete_volumes_and_terminate_server
-
Recipe: block_device::do_force_reset
-
Recipe: block_device::do_primary_backup
-
Recipe: block_device::do_primary_backup_schedule_disable
-
Recipe: block_device::do_primary_backup_schedule_enable
-
Recipe: block_device::do_primary_restore
-
Recipe: block_device::do_restore_or_setup_block_device_on_boot
-
Recipe: block_device::do_secondary_backup
-
Recipe: app_wordpress::update
-
Recipe: block_device::setup_ephemeral
-
Recipe: db::default
-
Recipe: db::install_client
-
Recipe: db::install_server
-
Recipe: db::setup_monitoring
-
Recipe: db::setup_privileges_admin
-
Recipe: rightscale::default
-
Recipe: db_mysql::default_5_1
-
Recipe: app_wordpress::deploy
-
Recipe: sys_ntp::default
-
Recipe: sys_firewall::default
-
Recipe: sys::setup_swap
-
Recipe: rightscale::install_tools
-
Recipe: rightscale::install_file_stats_collectd_plugin
-
Recipe: lnmp_aio::setup_lnmp_aio
-
Recipe: logging::default
-
Recipe: nginx::setup_vhost
-
Recipe: db::setup_privileges_application
-
RepoPath: RightScale (v12.11.0-LTS) + LNMP [rev 4]
-
RightScript: [OpsCode] Connect Node [rev 3]
-
RightScript: [OpsCode] Chef Run [rev 1]
-
RightScript: [OpsCode] Delete Node [rev 1]
-
RightScript: [OpsCode] Initial Chef Run [rev 1]
See More
Revisions
Revision 10 | Feb 05, 2013
Fixed php-fpm monitoring Fixes for app_wordpress nginx vhost creation
Revision 9 | Dec 21, 2012
Updated to RightScale v13.2 Chef code. Particularly useful for LVM fixes/enhancements in block_device
Revision 7 | Aug 26, 2012
* Install postfix mysql_pgsql from centosplus on CentOS * Update app_wordpress to require nginx, apache, and php5 so that recipes can be run as operational scripts * Set LVM vg data size to 50% to prevent possible data corruption * Remove scheduler cookbook/recipe, using block_device continuous backups instead * Set max snapshots to 10. 7 Daily + 1 Weekly + 1 Monthly + 1 Yearly = 10
Discussion
Info
1 Rating
Supported Clouds
Pricing
All Users
Sign-up for RightScale
Support Information
Have problems? Have suggestions for improvement? Just wanna chat with a really cool guy that likes to automate cloud stuff?
Drop me a line me@ryangeyer.com

A really well thought out template with detailed instructions. There are lots of options to play with but the instructions cover everything and the default options are ones that work well. Top marks!