Skip to content
Erika Heidi edited this page Aug 2, 2013 · 2 revisions

In this section you can find some useful and more detailed information about using Vagrant for contributing to Cobase. This Vagrant box uses Puppet for provisioning, and was tested in both MacOSX (10.8.4) and Ubuntu 12.04 . For performance reasons, it uses NFS shared folders, which makes it incompatible with Windows Hosts - if you use Windows, you have to disable the NFS by editing the Vagrantfile (see "Note about NFS shared folders" for instructions). For more information about NFS on Vagrant, check the official docs.

Requirements

You need to have both Vagrant and Virtualbox installed in your machine. They must be installed from their official websites, so you get the newest version (avoid package managers).

Note about NFS shared folders

NFS needs administrator privileges to properly work. You will be asked to provide your (sudo) password when you run vagrant up.

Ubuntu users: you need to install 2 extra packages in order to use NFS shared folders: nfs-common and nfs-kernel-server, both via apt-get .

If you're having problems to use NFS (windows users specially), you can disable it by editing the Vagrantfile and removing the ":nfs => true" portion on line 21 . Performance will not be guaranteed, since VirtualBox has known issues with big amount of files (the vendor folder, in our case).

Installation

This puppet setup uses git submodules for managing the puppet modules. This way, they can be kept up to date more easily, and the contents will only be downloaded from their repositories when needed - since the box is intended only for development purposes, it makes more sense. To initialize the modules, run:

$ git submodule init

$ git submodule update

Now that you have all the setup, run

$ vagrant up

The machine provisioning may take some time specially in the first run, when performing "composer install". Wait until it finishes to check for errors on the provisioning process.

Composer Issues

As Symfony is quite big, composer may run into a timeout when trying to install all the packages. If you get an error like this:

err: /Stage[main]//Composer::Install[cobase]/Exec[composer install]/returns: change from notrun to 0 failed: composer install returned 1 instead of one of [0] at /tmp/vagrant-puppet/modules-0/composer/manifests/install.pp:9

you will need to wait for the machine to finish provisioning, then ssh to run composer manually inside the VM.

$ vagrant ssh

$ cd /vagrant

$ composer update

After this, you shall exit the Guest machine and run vagrant provision to finish the other installation dependencies (or you can run the commands inside the VM, see the Cobase installation guide for more info).

Accessing your installation

When the machine is successfully provisioned, you will be able to access Cobase through the address http://192.168.33.101 in your browser.

PhpMyAdmin will be available at http://192.168.33.101:8000. Login: root / Password: root .

To access the VM (you will need it sometimes to update composer, run console commands etc. after the machine is up and running) you just need to run vagrant ssh (no password required). The document root is /vagrant .

Clone this wiki locally