Skip to content
forked from Chassis/Chassis

Chassis is a virtual server for your WordPress site, built using Vagrant.

Notifications You must be signed in to change notification settings

ahmadawais/Chassis

 
 

Repository files navigation

Chassis

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.

Prerequisites

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
      

Installing Chassis

  1. Clone the Chassis repo:

    git clone --recursive https://github.com/Chassis/Chassis myproject

    If you forget --recursive then run:

    git submodule update --init
  2. 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
  3. Boot up a Virtual Machine

    vagrant up
  4. Make a copy of local-config-sample.php and rename to local-config.php

  5. Browse to http://vagrant.local and you should see your site!

Working with the Virtual Machine

# 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

Configuration

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)

Multisite

Chassis has full support for running WordPress in multisite mode. Here's what you need to do to enable it:

  1. Add multisite: Yes to your config.local.yaml or project configuration.

  2. 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!

Adding "Real" Domains

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.

  1. 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.)

  2. Reboot your VM (vagrant reload)

MySQL Database

Your database can be configured completely via the YAML configuration. This is where the YAML hierarchy is most useful:

  • config.yaml contains the default (User wordpress, password vagrantpassword)
  • config.local.yaml can contain your "real" database details. These can be generated by a deployment script, such as Capistrano.

Updating

# Pull and rebase (in case you have project-specific commits)
git pull --rebase

## Update submodules (Puppet modules and WP)
git submodule update --init

Login Credentials

WordPress Admin

MySQL Database

  • name: wordpress
  • user: wordpress
  • pass: vagrantpassword

What do you get in Chassis?

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.)

What don't you get in Chassis?

FAQ

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.

Can you add X?

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.

About

Chassis is a virtual server for your WordPress site, built using Vagrant.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 73.0%
  • CSS 13.9%
  • JavaScript 13.0%
  • Other 0.1%