Vagrant installation

 Vagrant Installation

Warning!

The new versions of Vagrant delete the contents of the /opt/vagrant directory. If you want to keep old versions of Vagrant, first move them out of the /opt directory.

  • Download Vagrant from https://www.vagrantup.com/ and follow the instructions to install it.
  • Select DOWNLOAD…
  • Select the operating system of your workstation. For
    • Ubuntu: Debian
    • RedHat: Centos

 

Keep multiple versions on your workstation

Vagrant has an installer, that places the bin and embedded folders to “/opt/vagrant”. To be able to keep multiple versions of Vagrant execute the following:

cd /opt/vagrant
sudo chown -R MY_USER_NAME:wheel /opt/vagrant # Change the owner of the 'vagrant' directory structure from root to you so you can move the folders mkdir vagrant_MY_VERSION # Create a subfolder for the new version mv bin vagrant_MY_VERSION # Move the folder to the version specific location mv embedded vagrant_MY_VERSION # Move the folder to the version specific location rm vagrant # Delete the old version of the symbolic link ln -s /opt/vagrant/vagrant_MY_VERSION/bin/vagrant vagrant # Create the symbolic link for the new version

Important

The default credentials of a Vagrant machine are:

  • UserName: vagrant
  • Password: vagrant

Windows in Vagrant

To test your cookbook on a Windows virtual machine locally, create one for Vagrant. See Launch Windows instances locally with Chef Test Kitchen for the details.

Leave a comment

Your email address will not be published. Required fields are marked *