MultiCloud Marketplace

Ryan Geyer

Wordpress & Email All-In-One

Open in Dashboard

Published by Ryan Geyer on Dec 21, 2012Revision: 9 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: znc v0.0.1.5

  • Cookbook: zendframework v0.0.1.5

  • Cookbook: yum v0.6.2.5

  • Cookbook: web_apache v13.2.0.5

  • Cookbook: vsftpd v0.0.1.5

  • Cookbook: utils v0.0.1.5

  • Cookbook: uox3 v0.0.1.5

  • Cookbook: unicorn v0.0.2.5

  • Cookbook: sys_ntp v13.2.0.5

  • Cookbook: sys_firewall v13.2.0.5

  • Cookbook: sys_dns v13.2.0.5

  • Cookbook: sys v13.2.0.5

  • Cookbook: svn v0.0.1.5

  • Cookbook: sudo v1.1.1.5

  • Cookbook: skeme v0.1.0.5

  • Cookbook: scheduler v0.0.2.5

  • Cookbook: rvm v0.0.1.5

  • Cookbook: runit v0.13.0.5

  • Cookbook: ruby v0.0.1.5

  • Cookbook: rs_sandbox v0.0.1.5

  • Cookbook: rjg_utils v0.0.1.5

  • Cookbook: rjg_aws v0.0.1.5

  • Cookbook: rightscale v13.2.0.5

  • Cookbook: rightgrid v0.0.1.5

  • Cookbook: repo_svn v13.2.0.5

  • Cookbook: repo_rsync v13.2.0.5

  • Cookbook: repo_ros v13.2.0.5

  • Cookbook: repo_git v13.2.0.5

  • Cookbook: repo_ftp v13.2.0.5

  • Cookbook: repo v13.2.0.5

  • Cookbook: rax_rebundler v0.0.1.5

  • Cookbook: mongod v0.0.1.5

  • Cookbook: rails v0.9.2.5

  • Cookbook: rabbitmq v1.4.0.5

  • Cookbook: python v1.0.6.5

  • Cookbook: phpmyadmin v0.0.1.5

  • Cookbook: php5 v0.0.2.5

  • Cookbook: perl v0.10.1.5

  • Cookbook: passenger_apache2 v0.16.3.5

  • Cookbook: openvpn v0.99.2.5

  • Cookbook: openssl v0.1.0.5

  • Cookbook: openldap v0.0.1.5

  • Cookbook: nginx v0.0.1.5

  • Cookbook: mysql v0.0.1.5

  • Cookbook: mrclean v0.0.1.5

  • Cookbook: apache2 v1.0.0.5

  • Cookbook: app v13.2.0.5

  • Cookbook: app_django v13.2.0.5

  • Cookbook: app_passenger v13.2.0.5

  • Cookbook: app_php v13.2.0.5

  • Cookbook: app_tomcat v13.2.0.5

  • Cookbook: app_wordpress v0.0.2.5

  • Cookbook: apt v1.4.2.5

  • Cookbook: block_device v13.2.0.5

  • Cookbook: build-essential v1.0.2.5

  • Cookbook: cloudstack v0.0.1.5

  • Cookbook: cron v0.0.1.5

  • Cookbook: databags v0.0.1.5

  • Cookbook: db v13.2.0.5

  • Cookbook: db_mysql v13.2.0.5

  • Cookbook: db_postgres v13.2.0.5

  • Cookbook: deb_package v0.0.1.5

  • Cookbook: ebs_conductor v0.0.3.5

  • Cookbook: erlang v1.0.0.5

  • Cookbook: git v0.8.0.5

  • Cookbook: gitosis v0.0.1.5

  • Cookbook: handbrake v0.0.1.5

  • Cookbook: iptables v0.9.3.5

  • Cookbook: lamp v13.2.0.5

  • Cookbook: lb v13.2.0.5

  • Cookbook: lb_clb v13.2.0.5

  • Cookbook: lb_elb v13.2.0.5

  • Cookbook: lb_haproxy v13.2.0.5

  • Cookbook: lnmp_aio v0.0.1.5

  • Cookbook: logging v13.2.0.5

  • Cookbook: logging_rsyslog v13.2.0.5

  • Cookbook: logging_syslog_ng v13.2.0.5

  • Cookbook: logrotate v0.8.1.5

  • Cookbook: mail_postfix v0.0.2.5

  • Cookbook: memcached v13.2.0.5

  • Cookbook: rails_enterprise v0.1.1.5

  • Cookbook Repo: git://github.com/rgeyer/cookbooks_linux.git of RightScale (v13.2) + LNMP

  • Cookbook Repo: git://github.com/rgeyer/rightscale_cookbooks-1.git of RightScale (v13.2) + LNMP

  • Cookbook Repo: git://github.com/rightscale/cookbooks.git of RightScale (v13.2) + LNMP

  • Cookbook Repo: https://github.com/downloads/rgeyer-rs-cookbooks/cookbooks_all/release_20120709.tar.gz of RightScale (v13.2) + LNMP

  • Cookbook Repo: git://github.com/rgeyer/cookbooks.git of RightScale (v13.2) + LNMP

  • Cookbook Repo: git://github.com/rgeyer-rs-cookbooks/cookbooks_st.git of RightScale (v13.2) + LNMP

  • MultiCloudImage: SoftLayerImage_Storage_CentOS_6.3_x64_v5.8 [rev 2]

  • MultiCloudImage: RightImage_RHEL_6.3_x64_v5.8 [rev 3]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_XenServer [rev 8]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_KVM [rev 11]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_HVM_EBS [rev 4]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_EBS [rev 5]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8 [rev 22]

  • Recipe: block_device::do_secondary_backup

  • Recipe: logging::default

  • Recipe: db_mysql::setup_server_5_1

  • Recipe: db::setup_privileges_application

  • Recipe: db::setup_privileges_admin

  • Recipe: db::setup_monitoring

  • Recipe: db::install_server

  • Recipe: block_device::setup_ephemeral

  • Recipe: block_device::do_secondary_restore

  • Recipe: lnmp_aio::setup_lnmp_aio

  • Recipe: block_device::do_restore_or_setup_block_device_on_boot

  • Recipe: block_device::do_primary_restore

  • Recipe: block_device::do_primary_backup_schedule_enable

  • Recipe: block_device::do_primary_backup_schedule_disable

  • Recipe: block_device::do_primary_backup

  • Recipe: block_device::do_force_reset

  • Recipe: rightscale::default

  • Recipe: block_device::default

  • Recipe: app_wordpress::update

  • Recipe: app_wordpress::deploy

  • Recipe: sys_ntp::default

  • Recipe: sys_firewall::default

  • Recipe: sys::setup_swap

  • Recipe: rightscale::install_tools

  • Recipe: nginx::setup_vhost

  • Recipe: rightscale::install_file_stats_collectd_plugin

  • Recipe: block_device::do_delete_volumes_and_terminate_server

  • RepoPath: RightScale (v13.2) + LNMP [rev 5]

  • 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

674bf88eceff2db33ab8780edd4b87f2Owen Hopkins on Sep 10, 2012 | Re: v7

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!

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