Skip to content

benclark/vagrant-jrdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jrdev Vagrant

This is a template for a Vagrant setup that can be used in two different modes, either within a single project, or a standalone configuration that supports multiple projects.

Requirements

The following Vagrant plugins are expected:

Usage

Single project

Add the following files from this repo to your Drupal project's root directory:

  • Vagrantfile
  • Berksfile

At a minimum, make the following edits to your Vagrantfile to customize it to your project:

# Replace "jrdev" with a hostname-safe name for your project.
config.vm.hostname = "YOURPROJECT"

chef.json["jrdevsetup"] = {
  # Set "domain_name" to a hostname-safe name (will be used by Avahi)
  "domain_name" => "YOURPROJECT.local",
  "docroot" => "/var/www/vhosts/default"
}

Run the following:

$ vagrant up --provision

Multi-project

Clone this repo:

$ git clone https://github.com/JacksonRiver/vagrant-jrdev.git

Create a data_bags directory, and populate it with JSON data:

$ mkdir data_bags
$ cat - > example.json
{
  "id": "example",
  "domain_name": "example.local",
  "domain_aliases": [ "example1.local", "example2.local" ],
  "docroot": "/mnt/sites/example/repo",
  "db_name": "example"
}
^D

You can create any number of JSON files.

Make sure that the sites_dir in the Vagrantfile points to a directory where all your Drupal sites reside. Using the example.json project defined above, if your directory structure looks like this:

/Users
  /exampleuser
    /Sites
      /example
        /repo
          # Drupal root

Then you would modify the Vagrantfile accordingly:

sites_dir = "/Users/exampleuser/Sites"

Run the following:

$ vagrant up --provision

Author

Author:: Ben Clark (benjamin.clark@jacksonriver.com)

About

Jackson River local dev Vagrant/Chef environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages