Skip to content

Commit

Permalink
Merge pull request kubernetes#7617 from pronix/add_libvirt_vagrant_pr…
Browse files Browse the repository at this point in the history
…ovider

Add libvirt provider for vagrant
  • Loading branch information
derekwaynecarr committed May 18, 2015
2 parents eb12565 + 3519e83 commit 4753021
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if ARGV.first == "up" && ENV['USING_KUBE_SCRIPTS'] != 'true'
Calling 'vagrant up' directly is not supported. Instead, please run the following:
export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=providername
./cluster/kube-up.sh
END
end
Expand Down Expand Up @@ -62,6 +63,12 @@ $kube_provider_boxes = {
:box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box'
}
},
:libvirt => {
'fedora' => {
:box_name => 'kube-fedora20',
:box_url => 'http://citozin.com/opscode_fedora-20_chef-provisionerless_libvirt.box'
}
},
:vmware_desktop => {
'fedora' => {
:box_name => 'kube-fedora20',
Expand Down Expand Up @@ -131,6 +138,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
v.vmx['numvcpus'] = $vm_cpus
end

# configure libvirt provider
config.vm.provider :libvirt do |v, override|
setvmboxandurl(override, :libvirt)
v.memory = vm_mem
v.cpus = $vm_cpus
v.nested = true
v.volume_cache = 'none'
end

# Then try VMWare Workstation
config.vm.provider :vmware_workstation do |v, override|
setvmboxandurl(override, :vmware_desktop)
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started-guides/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Running kubernetes with Vagrant (and VirtualBox) is an easy way to run/test/deve
2. [VMWare Fusion](https://www.vmware.com/products/fusion/) version 5 or greater as well as the appropriate [Vagrant VMWare Fusion provider](https://www.vagrantup.com/vmware)
3. [VMWare Workstation](https://www.vmware.com/products/workstation/) version 9 or greater as well as the [Vagrant VMWare Workstation provider](https://www.vagrantup.com/vmware)
4. [Parallels Desktop](https://www.parallels.com/products/desktop/) version 9 or greater as well as the [Vagrant Parallels provider](https://parallels.github.io/vagrant-parallels/)
5. libvirt with KVM and enable support of hardware virtualisation. [Vagrant-libvirt](https://github.com/pradels/vagrant-libvirt). For fedora provided official rpm, and possible to use ```yum install vagrant-libvirt```

### Setup

Expand Down

0 comments on commit 4753021

Please sign in to comment.