mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #7617 from pronix/add_libvirt_vagrant_provider
Add libvirt provider for vagrant
This commit is contained in:
		
							
								
								
									
										16
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -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:
 | 
					Calling 'vagrant up' directly is not supported.  Instead, please run the following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  export KUBERNETES_PROVIDER=vagrant
 | 
					  export KUBERNETES_PROVIDER=vagrant
 | 
				
			||||||
 | 
					  export VAGRANT_DEFAULT_PROVIDER=providername
 | 
				
			||||||
  ./cluster/kube-up.sh
 | 
					  ./cluster/kube-up.sh
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@@ -62,6 +63,12 @@ $kube_provider_boxes = {
 | 
				
			|||||||
      :box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box'
 | 
					      :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 => {
 | 
					  :vmware_desktop => {
 | 
				
			||||||
    'fedora' => {
 | 
					    'fedora' => {
 | 
				
			||||||
      :box_name => 'kube-fedora20',
 | 
					      :box_name => 'kube-fedora20',
 | 
				
			||||||
@@ -131,6 +138,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
 | 
				
			|||||||
      v.vmx['numvcpus'] = $vm_cpus
 | 
					      v.vmx['numvcpus'] = $vm_cpus
 | 
				
			||||||
    end
 | 
					    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
 | 
					    # Then try VMWare Workstation
 | 
				
			||||||
    config.vm.provider :vmware_workstation do |v, override|
 | 
					    config.vm.provider :vmware_workstation do |v, override|
 | 
				
			||||||
      setvmboxandurl(override, :vmware_desktop)
 | 
					      setvmboxandurl(override, :vmware_desktop)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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)
 | 
					   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)
 | 
					   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/)
 | 
					   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
 | 
					### Setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user