vagrant/test/vagrant-spec
Chris Roberts 63ae9556c6 Fix typo in spec runner script 2018-09-11 15:07:21 -07:00
..
boxes Add entry point for running vagrant-spec 2017-03-09 16:05:34 -08:00
configs Add entry point for running vagrant-spec 2017-03-09 16:05:34 -08:00
scripts Include current kernel version when install devel package 2018-01-16 16:42:49 -08:00
.runner-vmware.sh Fix typo in spec runner script 2018-09-11 15:07:21 -07:00
Vagrantfile.spec Update box versions 2018-06-19 09:57:03 -07:00
readme.md Update vagrant-spec to include Windows platforms 2017-12-08 11:31:59 -08:00

readme.md

Running vagrant-spec

Requirements

  • vagrant installed (from source, or from packages)
  • vagrant vmware plugin
  • vagrant repo
  • vagrant-spec repo

How to run

First, we need to build vagrant-spec:

cd vagrant-spec
gem build *.gemspec
cp vagrant-spec-0.0.1.gem /path/to/vagrant/vagrant-spec.gem

Next, make a decision as to which host and guest boxes will be used to run the tests.

From the root dir of the vagrant project, run the following command:

VAGRANT_CLOUD_TOKEN=REAL_TOKEN_HERE VAGRANT_HOST_BOXES=hashicorp-vagrant/centos-7.4 VAGRANT_GUEST_BOXES=hashicorp-vagrant/windows-10 VAGRANT_CWD=test/vagrant-spec/ VAGRANT_VAGRANTFILE=Vagrantfile.spec vagrant up

If you are running windows, you must give your host box more memory than the default. That can be done through the environment variable VAGRANT_HOST_MEMORY

VAGRANT_HOST_MEMORY=10000 VAGRANT_CLOUD_TOKEN=REAL_TOKEN_HERE VAGRANT_HOST_BOXES=hashicorp-vagrant/centos-7.4 VAGRANT_GUEST_BOXES=hashicorp-vagrant/windows-10 VAGRANT_CWD=test/vagrant-spec/ VAGRANT_VAGRANTFILE=Vagrantfile.spec vagrant up

Relevant environment variables:

  • VAGRANT_CLOUD_TOKEN
    • Token to use if fetching a private box (like windows)
  • VAGRANT_HOST_BOXES
    • Vagrant box to use to host and run tests
  • VAGRANT_GUEST_BOXES
    • Vagrant box to use to run tests on
  • VAGRANT_CWD
    • Directory location of vagrant-spec Vagrantfile
  • VAGRANT_VAGRANTFILE
    • Vagrantfile to use for running vagrant-spec
  • VAGRANT_HOST_MEMORY
    • Set how much memory your host will use (defaults to 2048)