Git Product home page Git Product logo

trevor's Introduction

A Vagrant box for Drupal (and other LAMP projects).

This is a Vagrant box built on CentOS 6 and the Puppet provisioner.

Quick start

  • Install Vagrant and VirtualBox
  • run vagrant up
  • Place your PHP code in a new directory called webroot
  • run vagrant open to launch a web browser (currently, the open command only implemented on OS X)

By default, the virtual machine will use bridged networking, so your VM will need to be able to obtain an IP address via DHCP. Bridged networking has the advantage of being able to run multiple vagrant boxes simutaneousy, without TCP port conflicts. See Vagrantfile and puppet/manifests/default.pp for customization options.

Main Packages

  • LAMP
  • Choice of PHP version: 5.3, 5.4, 5.5, HHVM
  • popular PHP extensions: xml, mcrypt, mbstring, GD, php-imagemagick, etc
  • HTTPS support
  • postfix
  • TODO: Solr

Performance Ready

  • mod_fastcgi + php-fpm
  • Apache Worker MPM
  • Zend OPcache (5.5 only)
  • APC (<= 5.4 only)
  • memcached
  • TODO: Varnish

Debugging / developer tools

  • compass
  • drush
  • capistrano
  • git, svn, bzr, mercurial
  • XDebug
  • XHProf

Security features

  • yum-cron
  • iptables
  • TODO: fail2ban
  • TODO: iptables

Using the debug tools

XHProf is installed in /usr/share/pear. The web interface is available at http://example.com/xhprof.

XDebug has debug, profile, and trace triggers enabled. To use these triggers, add one of the following queries to your URL:

  • /?XDEBUG_SESSION_START=idekey (connects to your debugger on port 9000)
  • /?XDEBUG_PROFILE (stores a cachegrind file in /tmp)
  • /?XDEBUG_TRACE (stores a trace file in /tmp)

Future goals

  • A development / production switch. This will be important when e.g. XDebug is added in the future.
  • Optional support for Apache virtualhosts (the choice to omit this currently is intentional, since the intent is a dedicated vagrant box per project, but vhosts may be needed someday).
  • Automatic updates to host OS's /etc/hosts file, so that sites don't have to be accessed via IP.

Adding Trevor as a Git submodule

We have found Trevor works well as a Git submodule. To add the submodule and some symbolic links to the top of your repository, follow these steps:

git submodule add [email protected]:metaltoad/trevor.git
ln -s trevor/Vagrantfile .
ln -s trevor/puppet .
git add Vagrantfile puppet
git commit

Note that symlinks won't work if you have collaborators using Windows.

trevor's People

Contributors

dylantack avatar svaj avatar vosechu avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.