Attention! This virtual machine has been deprecated in favor of our brand new, more stable virtual machine, Graft. It uses Chef as a provisioner, and allows for much, much more customization and stablility than this flimsy Bash-provisioned virtual machine. Please upgrade your tj
installation and take advantage of the newest features! See tj
's changelog for additional information.
- Theme Juice Team
Graft is the official virtual machine for Theme Juice,
a powerful way to develop WordPress sites locally on your machine. Theme Juice is
a cross-platform desktop application built on top of our open source command line
utility, tj
, that enables you to
create, manage and deploy local WordPress development projects at the
click of a button.
Vagrant is a "tool for building and distributing development environments". It works with virtualization software such as VirtualBox to provide a virtual machine that is sandboxed away from your local environment. It can be shutdown, destroyed and recreated at anytime, so feel free to break things!
You can either use tj
to set up your
development environment, or run the commands below from whatever directory you
want the VM installed:
# First, cd to where you want to install the VM, then run...
git clone https://github.com/themejuice/graft .
vagrant up
Name | Version | Description | |
---|---|---|---|
Ubuntu | 14.04.3 |
Ubuntu is a Debian-based Linux operating system and distribution for personal computers, smartphones and network servers. | |
Apache | 2.4.x |
The Apache HTTP Server, colloquially called Apache, is the world's most used web server software. | |
PHP | 5.5.x |
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. | |
PHPBrew | stable |
PHPBrew allows you to easily switch PHP versions. | |
MySQL | 5.5.x |
MySQL is an open-source relational database management system. | |
WP-CLI | stable |
WP-CLI is a set of command-line tools for managing WordPress installations. | |
Composer | stable |
Composer is a dependency manager for PHP. | |
NVM | stable |
NVM allows you to easily switch Node.js versions. | |
Node.js | stable |
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. | |
npm | stable |
npm is a dependency manager for Node.js. | |
sympm | stable |
sympm allows you to run npm install from inside of a Vagrant virtual machine without hitting symlink issues. |
|
Grunt | stable |
Grunt is a task runner for JavaScript. | |
RVM | stable |
RVM allows you to easily switch Ruby versions. | |
Ruby | stable |
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. | |
Ruby Gems | stable |
RubyGems.org is the Ruby community’s gem hosting service. | |
Bundler | stable |
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. | |
Xdebug | 2.2.x |
Xdebug is a PHP extension which provides debugging and profiling capabilities. | |
Webgrind | stable |
Webgrind is an Xdebug profiling web frontend in PHP. | |
Memcached | 1.4.x |
Memcached (pronunciation: mem-cash-dee) is a general-purpose distributed memory caching system. | |
phpMemcachedAdmin | 1.2.x |
phpMemcachedAdmin is an administration panel for Memcached for monitoring and debugging purposes. | |
phpMyAdmin | 4.0.x |
phpMyAdmin is a tool written in PHP, intended to handle the administration of MySQL over the Web. | |
ack | 2.14.x |
ack is a tool like grep, optimized for programmers. | |
xo | stable |
xo is a command line utility that composes regex match groups. | |
git | 1.8.x |
Git is a widely used source code management system for software development. It is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. | |
ngrep | 1.45.x |
ngrep (network grep) is a network packet analyzer. | |
dos2unix | 6.0.x |
dos2unix converts text files with DOS or Mac line endings to Unix line endings and vice versa. |
You can view things such as a PHP phpinfo()
dump, phpMemcachedAdmin, phpMyAdmin,
Webgrind and more through the main dashboard.
Create a new file called scripts/custom/php.sh
and add the PHP version you
would like to use, making sure it contains all 3 parts (i.e. x.x.x
). See
the following example:
#!/bin/bash
php-switch 5.6.18 -y # -y skips all prompts
After that, provision the VM with vagrant provision
. Bam! That easy!
Alternatively, you can vagrant ssh
into the VM and run, for example,
php-switch 5.6.18
Using php-switch
over SSH doesn't require you to provision the VM, so in the
end it is a lot faster. If you'd like to permanently use a specific PHP version,
you should use the provision-post.sh
method, as that will persist even if
the VM is destroyed and re-created.
Currently, this feature is limited to only PHP 5.x
. I haven't been able
to find a way to consistently configure other versions with Apache/MySQL. If
you have the chops, I'd love the help.
When a conf
file within config/apache-config/sites/
contains a virtual host with
a *:443
port number, a self-signed SSL certificate will automatically be generated
on the next provision. For example, a virtual host that looks like this,
<VirtualHost *:80>
DocumentRoot /srv/www/tj-example
ServerName example.dev
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /srv/www/tj-example
ServerName example.dev
SSLEngine on
SSLCertificateFile "/etc/ssl/certs/example.dev.pem"
SSLCertificateKeyFile "/etc/ssl/private/example.dev.key"
</VirtualHost>
will automatically get a generated certificate when provisioned. Once a site has a certificate, another one will not be generated until the old one is removed.
Since it's a little unintuitive, I'll link you off to this great tutorial on accepting a self-signed cert.
You may need to restart your browser to see this change take effect.
Know how? Create a pull request!
Know how? Create a pull request!
Program | User | Pass | Dashboard |
---|---|---|---|
MySQL | root |
root |
http://graft.dev/database-admin/ |