This document lists steps to set up VLEAD development environment using an existing vagrant box. This existing vagrant box is created by VLEAD and contains all the software required for VLEAD’s development environment.
This set up assumes that vagrant is already set up on top of virtualbox. If the vagrant is set up on some other virtualization, use vagrant-mutate to change the vagrant box to work with that virtualization.
- Download the vagrant box.
wget http://files.vlabs.ac.in/downloads/vagrant-boxes/vlead-dev.box
- Add the downloaded box to the vagrant list of boxes.
vagrant box add vlead-dev vlead-dev.box --provider=virtualbox
- Check if the box is added
vagrant box list
- Create a directory
vlead-dev
to hold all the initialization files for this environment and change to that directory.mkdir vlead-dev cd vlead-dev
- Initialize vagrant environment for this new box.
vagrant init vlead-dev
- Edit the configuration file
Vagrantfile
to either use forwarding port, private network or public network. - Boot up the machine
vagrant up
- Login to the machine. The development environment is
enabled for the root user.
vagrant ssh sudo su -
default: SSH username: vagrant default: SSH auth method: private key default: Error: Connection timeout. Retrying... default: Error: Connection timeout. Retrying...
The solution is:
- Add the following lines to the Vagrantfile:
Vagrant.configure("2") do |config| config.ssh.private_key_path = "~/.ssh/id_rsa" config.ssh.forward_agent = true end
where config.ssh.private_key_path is your(host) local private key. Your private key must be available to the local ssh-agent. You can check with
ssh-add -L
. If it’s not listed, add it withssh-add ~/.ssh/id_rsa
.Don’t forget to add your public key to
~/.ssh/authorized_keys
on the Vagrant VM. You can do it by copy-and-pasting or using a tool like ssh-copy-id