- chruby: 0.3.9
- imagemagick: latest from ubuntu repository
- nodejs version: latest from official nodejs repository
- phantomjs: 1.9.8
- postgresql : 9.4.x from official postgresql repository
- ruby: 2.2.1
- ruby-install: 0.5.0
- Install VirtualBox
- Install Ansible
- Clone this repository
- You must set your workspace directory in
Vagrantfile
. Change the"."
in the following line, to the directory where your source code is:
Change:
config.vm.synced_folder ".", "/vagrant", nfs: true
to something like:
config.vm.synced_folder "/home/my-user/workspace/my-project-src", "/Workspace", nfs: true
- This playbook already creates a database user for us, check the username and password here. Feel free to change if needed.
- Then run
vagrant up
-
Question: What if my machine does not have enough RAM (4GB or less)?
Answer: You can customize the amount of memory in the
Vagrant
file under thevm.provider
block:config.vm.provider "virtualbox" do |vb| vb.memory = 1024 # ... other configs end
-
Question: Vagrant is failing with the message "Failed to mount folders in Linux guest."?
Answer: Run
vagrant plugin install vagrant-vbguest
. Then runvagrant reload --provisioning
for resuming the provisioning process. -
Question: You are facing problems with permissions to mount your local filesystem on the VM environment, something like:
mount -o 'vers=3,udp' 10.0.0.1:'/home/myuser/mysrc' /Workspace ... Stderr from the command: stdin: is not a tty mount.nfs: access denied by server while mounting 10.0.0.1:'/home/myuser/mysrc'
or:
exportfs: {folder} does not support NFS export
Answer: Check if you are trying to mount a directory in an encrypted partition or folder. NFS can't mount this kind of directory. In this case, find a folder (maybe in another partition), give your user proper permissions and move your refer source code there.
Then you change your Vagrantfile line:
config.vm.synced_folder "/home/workspace/my-codes/my-project-src", "/Workspace", nfs: true
To:
config.vm.synced_folder "/home/another-dir-i-can-access/my-codes/my-project-src", "/Workspace", nfs: true