Skip to content

Latest commit

 

History

History
100 lines (78 loc) · 2.77 KB

set-up-vlead-dev-vagrant-box.org

File metadata and controls

100 lines (78 loc) · 2.77 KB

Steps to set up VLEAD development environment using an existing vagrant box

Introduction

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.

Assumptions

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.

Steps

  1. Download the vagrant box.
    wget http://files.vlabs.ac.in/downloads/vagrant-boxes/vlead-dev.box
        
  2. Add the downloaded box to the vagrant list of boxes.
    vagrant box add vlead-dev vlead-dev.box --provider=virtualbox
        
  3. Check if the box is added
    vagrant box list
        
  4. 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
        
  5. Initialize vagrant environment for this new box.
    vagrant init vlead-dev
        
  6. Edit the configuration file Vagrantfile to either use forwarding port, private network or public network.
  7. Boot up the machine
    vagrant up
        
  1. Login to the machine. The development environment is enabled for the root user.
    vagrant ssh
    sudo su -
        

Trouble Shooting

Vagrant ssh authentication failure

default: SSH username: vagrant
default: SSH auth method: private key
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...

The solution is:

  1. 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 with ssh-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