Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(QENG-1146) Add vagrant_fusion, vagrant_workstation and vagrant_virtualbox providers #271

Merged
merged 1 commit into from
Oct 1, 2014

Conversation

hunner
Copy link
Member

@hunner hunner commented May 21, 2014

Currently the vagrant hypervisor provider just does virtualbox. This allows the vagrant vmware_fusion plugin to be used instead.

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@@ -41,6 +41,9 @@ def make_vfile hosts, options = {}
v_file << " c.vm.provider :virtualbox do |vb|\n"
v_file << " vb.customize [\"modifyvm\", :id, \"--memory\", \"#{options['vagrant_memsize'] ||= '1024'}\"]\n"
v_file << " end\n"
v_file << " c.vm.provider :vmware_fusion do |v|\n"
v_file << " v.vmx[\"memsize\"] = \"#{options['vagrant_memsize'] ||= '1024'}\"\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you have split this into two different hypervisors we should handle the differences in vagrant file generation in the appropriate new files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vagrantfiles can be made provider agnostic, and the provider specific settings go inside of the config.vm.provider :whatever blocks as done here. That way the only difference between using different providers is the argument passed to vagrant up. But I can refactor it if you'd like.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should rephrase that. I think that it does not need to be split out because Vagrantfiles can handle multiple providers and I will leave it as-is unless you would really really like it split out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like vagrant.rb to be provider agnostic. You could have most of the vagrant file generation and then have a call to something like "provider_file_chunk" and get it added in - that should have proper separation while avoiding much code duplication.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, will do :).

# By default vmware_fusion creates a .vagrant directory relative to the
# Vagrantfile path. That means beaker tries to scp the VM to itself unless
# we move the VM files elsewhere.
ENV['VAGRANT_VMWARE_CLONE_DIRECTORY'] = '~/.vagrant/vmware_fusion'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that path in a variable anyway? Not a big fan of hard coding it here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. This is the published method of modifying the behavior of the vmware_fusion vagrant plugin as per http://docs.vagrantup.com/v2/vmware/configuration.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The virtualbox vagrant provider already puts its VMs in ~/.vagrant so I was making the fusion boxes go to the same place.

@anodelman
Copy link
Contributor

Waiting on response to review comments + needs a rebase.

@hunner
Copy link
Member Author

hunner commented Jun 10, 2014

Rebased

@anodelman
Copy link
Contributor

retest this please

@puppetlabs-jenkins
Copy link
Contributor

🔴 Test failed.
Refer to this link for build results: http://jenkins-beaker.delivery.puppetlabs.net/job/Beaker%20Combined%20Smoketest/99/

@anodelman
Copy link
Contributor

Failure unrelated to patch.

@anodelman
Copy link
Contributor

@hunner this will need an update to include the latest patch to vagrant that supports including additional disk to individual virtual box instances.

@hunner
Copy link
Member Author

hunner commented Jun 16, 2014

k

@anodelman
Copy link
Contributor

Needs to be updated to handle the new support for vagrant virtualbox additional disks. This occurs in the main host creation loop so it's different from the vm size settings.

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@justinstoller justinstoller mentioned this pull request Jul 30, 2014
@justinstoller
Copy link
Contributor

Superseded by #383

@Aethylred
Copy link

Does this also support the use of VMware Workstation?

...it should if the provider for vagrant can be set to vmware_workstation they have an identical parameters and settings.

(also, I realise that beaker is currently difficult to install in a Windows environment, but asking this helps sort that out)

@anodelman
Copy link
Contributor

We do not currently support the vmware_workstation provider - please file a github issue to request that feature.

@Aethylred
Copy link

I started with the bit that broke first #373

@hunner hunner reopened this Aug 28, 2014
@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

1 similar comment
@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@hunner hunner changed the title Add vagrant_fusion and vagrant_virtualbox providers (QENG-1146) Add vagrant_fusion, vagrant_workstation and vagrant_virtualbox providers Aug 28, 2014
@hunner
Copy link
Member Author

hunner commented Aug 28, 2014

Closes #383

@hunner
Copy link
Member Author

hunner commented Aug 29, 2014

Changes since last closed:

  • integrated Add fusion #383 work
  • added vmware_workstation provider
  • Squashed and added ticket to commit description

@colinPL
Copy link
Contributor

colinPL commented Sep 2, 2014

ok to test

@puppetlabs-jenkins
Copy link
Contributor

💚 Test passed.
Refer to this link for build results: http://jenkins-beaker.delivery.puppetlabs.net/job/Beaker%20Combined%20Smoketest%20(ec2)/61/

@hunner
Copy link
Member Author

hunner commented Sep 4, 2014

<3

@puppetlabs-jenkins
Copy link
Contributor

🔴 Test failed.
Refer to this link for build results: http://jenkins-beaker.delivery.puppetlabs.net/job/Beaker%20Combined%20Smoketest%20(ec2)/83/

…albox providers

Currently the vagrant hypervisor provider just does virtualbox. This
allows the vagrant vmware_fusion and vmware_workstation plugins to be
used instead.
anodelman pushed a commit that referenced this pull request Oct 1, 2014
(QENG-1146) Add vagrant_fusion, vagrant_workstation and vagrant_virtualbox providers
@anodelman anodelman merged commit 9a00806 into voxpupuli:master Oct 1, 2014
@puppetlabs-jenkins
Copy link
Contributor

🔴 Test failed.
Refer to this link for build results: http://jenkins-beaker.delivery.puppetlabs.net/job/Beaker%20Combined%20Smoketest%20(ec2)/158/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants