myplanetdigital/vagrant-ariadne

Name: vagrant-ariadne

Owner: Myplanet

Description: A standardized virtual machine (VM) development environment for easily developing Drupal sites in a local sandbox that is essentially identical to a fully-configured hosted solution.

Created: 2012-01-25 16:47:12.0

Updated: 2017-10-16 21:36:48.0

Pushed: 2013-04-12 18:56:36.0

Homepage:

Size: 1381

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ariadne Pronunciation

Build Status Dependency Status Code Climate

Ariadne is in active development at Myplanet Digital, and should be considered beta code. Although we dogfood the project, stability and full documentation not yet guaranteed.

Remember, Ariadne, you are the dreamer, you build this world. I am the subject, my mind populates it.

– Cobb, Inception

Ariadne is a standardized virtual machine (VM) development environment for easily developing Drupal sites in a local sandbox that is essentially identical to a fully-configured hosted solution. Once several simple system requirements have been met, it can be set up using only a few commands from your computer's terminal.

It attempts to emulate Acquia's infrastructure as closely as possible (with added development tools), using Chef cookbooks and roles that can easily be used to deploy an actual cluster.

Ariadne has been tested on Mac OS/X Snow Leopard & Lion and Ubuntu 12.04 (and it should work on other flavours of Linux). Theoretically, it should support Windows as well, although Ariadne has not been tested on it.

How It Works

Ariadne is a customized implementation of Vagrant. Vagrant uses Virtualbox to boot a stripped-down virtual machine image, and then uses the Chef configuration management tool (one of the few components installed on the VM initially) to bring that blank slate into a fully configured state.

The guest virtual machine is configured identically, regardless of the host computer's operating system and configuration.

Requirements

Recommended versions in parentheses.

Quick and Dirty Start

First install Vagrant v1.0.6 DMG from the project homepage:

http://downloads.vagrantup.com/tags/v1.0.6

Then run these commands:

$ vagrant gem install vagrant-vbguest vagrant-hostmaster vagrant-librarian
$ [sudo] gem install librarian rake knife-solo

Run these commands to set up Ariadne:

$ git clone https://github.com/myplanetdigital/vagrant-ariadne.git
$ cd vagrant-ariadne

If you have RVM installed, the .rvmrc script will now run and ensure you have the right version of ruby. Otherwise, you can simply use the system ruby.

Next, run the setup command with:

$ rake setup

This is a non-destructive command that will download the correctly versioned rubygem packages and Chef cookbooks, among other things. You should run this command any time you upgrade or downgrade Ariadne.

You're now set up and ready to boot a machine. This can be either the simple example site (included with Ariadne), or a full-fledged Ariadne project.

Booting the example

If you'd like to spin up the demo site (currently a simple Drupal install on a basic virtual machine), just run this command:

$ vagrant up

This command will take a while to finish the first time you run it, because Vagrant must download the disk image for the guest operating system (which can be several hundred megabytes in size), and set up the virtual machine's hard-drive for the first time (which involves downloading and installing any required software to the guest machine).

When it's done, you can visit http://example.dev/ to view the example website!

Booting an Ariadne project

If you already have an Ariadne project (basically a Chef cookbook), you can boot that instead of the demo.

Either place the Ariadne project in the cookbooks-projects folder, or run

$ rake "init_project[GITURL]" # don't forget the quotes!

to clone the project at the specified Git URL into the correct directory for you. Note that for your typing convenience, it will remove the prefix ariadne- from the directory name if it exists.

Once the project is in place, run

$ project=PROJECTNAME vagrant up

to spin up the project. The project=PROJECTNAME tells Chef which directory in cookbooks-projects to use for the final provisioning step.

Your site will be available at http://PROJECTNAME.dev/ when it is done.

After booting

After the demo or project-specific VM has spun up, here are several commands that might be useful:

$ rake send_gitconfig                  # Send your personal gitconfig to the virtual machine.
$ vagrant ssh-config >> ~/.ssh/config  # Adds an entry to your ssh config.
At the end of the day

To shut down the virtual machine, run:

$ vagrant halt

Later, you can run vagrant up to start the virtual machine again. This time, setup will be quite fast because the virtual machine has already been set up.

If you want to rebuild the virtual machine from scratch (which you'll want to do from time to time, to ensure you haven't introduced any invisible dependencies), you can run:

$ vagrant destroy

to delete the virtual hard disk (it won't delete the folder shared between your computer and the virtual one). Next time you run vagrant up, Vagrant will set up the virtual machine from scratch.

Ariadne projects

As mentioned, an Ariadne project is just a Chef cookbook to take the VM through the last mile of project-specific configuration. An example of an Ariadne project cookbook is available in the cookbooks-projects/example folder of this project. It's the project used to set up the demo site. For simple Drupal projects, you could copy the example folder and use it as a basis for your own Ariadne project.

Deploying (WIP)

Ariadne can theoretically be used to provision a remote dedicated server using the knife-solo tool. This does not yet work.

(Feel free to use these instructions to deploy a fresh Rackspace cloud server.)

Pending deploy instructions:

rt ARIADNE_PROJECT=myproject
rt REMOTE_IP=123.45.67.89
 -e "\nHost $ARIADNE_PROJECT\n  User root\n  HostName $REMOTE_IP" >> ~/.ssh/config
forever $ARIADNE_PROJECT -i path/to/ssh_key.pub # Enter root password when prompted.
stall Chef on the server
e prepare $ARIADNE_PROJECT --omnibus-version 10.16.6-1
n chef-solo on remote server
e cook $ARIADNE_PROJECT nodes/dna.json --skip-syntax-check --skip-chef-check
Goals and Features
Differences from vanilla Vagrant
Upgrading or debugging Ariadne itself

If you pull changes or switch branches in the Ariadne repository, you'll very likely need to rerun the setup. At the very least, you should exit and re-enter the vagrant-ariadne directory so that RVM will rerun the .rvmrc script (where some setup happens). You should then run rake setup again.

Troubleshooting
Notes
Tips and tricks
Known Issues

Please refer to https://github.com/myplanetdigital/vagrant-ariadne/issues?labels=bug&state=open for a full list of bugs.

To Do
License and Author

Author:: Patrick Connolly (patrick@myplanetdigital.com) endorse

Contributors: https://github.com/myplanetdigital/vagrant-ariadne/graphs/contributors

Copyright: 2012, Myplanet Digital, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.