Chassis is a virtual server for your WordPress site, built using Vagrant.
Chassis is basically a way to run WordPress (and related parts, such as PHP and nginx) without needing to worry about setting up anything. You can imagine it as MAMP/WAMP on steroids.
Before using Chassis, this is how your system should be set up:
-
Install VirtualBox 4.3.10
-
Install Vagrant
-
Zeroconf networking (Bonjour) should be set up:
-
OS X: You already have Bonjour available.
-
Windows: If you have iTunes, Safari, Bonjour Print Services, or Creative Suite 3 installed, you already have Bonjour.
Otherwise, you need to install Bonjour on your system. The easiest way to do this is to install iTunes. If you'd prefer not to do this, you can follow these instructions to install just Bonjour.
-
Linux: You need to have Avahi installed on your system.
For Ubuntu:
sudo apt-get install avahi-dnsconfd
-
-
Clone the Chassis repo:
git clone --recursive git@github.com:Chassis/Chassis.git myproject
If you forget
--recursive
then run:git submodule update --init
-
Install your WordPress project:
-
If you have an existing project:
Clone the content/ directory!
cd myproject git clone git@github.com:yourcompany/yourproject.git content
-
If you are starting a new project:
You will need to create a content folder
cd myproject mkdir content
Alternatively you can use our Chassis Supercharger as a base:
git clone --recursive git@github.com:Chassis/Supercharger.git content
-
-
Boot up a Virtual Machine
vagrant up
-
Make a copy of
local-config-sample.php
and rename tolocal-config.php
-
Browse to http://vagrant.local and you should see your site!
# Start the VM
vagrant up
# SSH in to the VM
vagrant ssh
# Reprovisioning (e.g. after updating this repository)
vagrant provision
# Reprovisioning without a full apt-get update
vagrant provision --provision-with puppet
# Updating your hosts file (If there is no IP for vagrant.local)
vagrant up
# Suspending (sleeping) the VM
# Note that this doesn't remove the hosts entry
vagrant suspend
# Halting (shutting down) the VM
vagrant halt
# Destroying the VM (if your VM is completely broken)
vagrant destroy
Chassis contains a flexible configuration setup, allowing you flexibility in overriding the defaults. Chassis follows the following loading procedure:
content/config.local.yaml
(project-specific overrides)content/config.yaml
(project-specific defaults)config.local.yaml
(global overrides)config.yaml
(global defaults)
Chassis has full support for running WordPress in multisite mode. Here's what you need to do to enable it:
-
Add
multisite: Yes
to yourconfig.local.yaml
or project configuration. -
Provision your VM!
(Note: due to a bug, you need to destroy and recreate an already-provisioned VM. We're working on fixing this.)
That's it!
We've realized internally that using vagrant.local doesn't always cut it for development, as you may need to use a different domain for testing. Thankfully we can fake it 'til we make it by overriding the default configuration.
-
Add your hosts to your YAML configuration. We recommend using your project-specific configuration (
content/config.yaml
), since it's part of the site's configuration.hosts: - vagrant.local - example.chassis.com.au
(The first host in the list will be used as the machine's name. We recommend leaving this as
vagrant.local
for the most part.) -
Reboot your VM (
vagrant reload
)
Your database can be configured completely via the YAML configuration. This is where the YAML hierarchy is most useful:
config.yaml
contains the default (Userwordpress
, passwordvagrantpassword
)config.local.yaml
can contain your "real" database details. These can be generated by a deployment script, such as Capistrano.
# Pull and rebase (in case you have project-specific commits)
git pull --rebase
## Update submodules (Puppet modules and WP)
git submodule update --init
- URL: http://vagrant.local/wp/wp-admin/
- user: admin
- pass: password
- name: wordpress
- user: wordpress
- pass: vagrantpassword
By default we want to keep Chassis lean, below is a list of what we include:
(Some tools including Git and cURL are installed during setup. Many more are available as default Ubuntu utilities.)
- phpMyAdmin - Available as an extension
- memcache - Available as an extension
- XDebug - Extension coming soon
How is Chassis different from VVV?
Each Chassis install is self-contained. We do this to try and mirror the server that you will be deploying to.
Note that while you can't have multiple independent installs on the same Chassis box, we support both subdomain and subdirectory multisite out of the box.
While we certainly can add any feature, consider first if it's better off as a Chassis extension. We try and keep Chassis as lightweight as possible, and extensions are a good way of adding features without weighing down Chassis itself.