mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-21 22:49:31 +00:00
added vagrant vsphere support
updated vsphere-dummy box for the vagrant vsphere using vagrant vsphere plugin added solution for cases when the NETWORK_IF_NAME was left empty
This commit is contained in:
committed by
Roman Dembitsky
parent
2ac788b492
commit
2117c068bb
58
Vagrantfile
vendored
58
Vagrantfile
vendored
@@ -77,6 +77,12 @@ $kube_provider_boxes = {
|
||||
:box_name => 'kube-fedora23',
|
||||
:box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-23_chef-provisionerless.box'
|
||||
}
|
||||
},
|
||||
:vsphere => {
|
||||
'fedora' => {
|
||||
:box_name => 'vsphere-dummy',
|
||||
:box_url => 'https://github.com/deromka/vagrant-vsphere/blob/master/vsphere-dummy.box?raw=true'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,6 +212,58 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
}).strip
|
||||
end
|
||||
|
||||
# Then try vsphere
|
||||
config.vm.provider :vsphere do |vsphere, override|
|
||||
setvmboxandurl(override, :vsphere)
|
||||
|
||||
#config.vm.hostname = ENV['MASTER_NAME']
|
||||
|
||||
config.ssh.username = ENV['MASTER_USER']
|
||||
config.ssh.password = ENV['MASTER_PASSWD']
|
||||
|
||||
config.ssh.pty = true
|
||||
config.ssh.insert_key = true
|
||||
#config.ssh.private_key_path = '~/.ssh/id_rsa_vsphere'
|
||||
|
||||
# Don't attempt to update the tools on the image (this can
|
||||
# be done manually if necessary)
|
||||
# vsphere.update_guest_tools = false # v.customize ['set', :id, '--tools-autoupdate', 'off']
|
||||
|
||||
# The vSphere host we're going to connect to
|
||||
vsphere.host = ENV['VAGRANT_VSPHERE_URL']
|
||||
|
||||
# The ESX host for the new VM
|
||||
vsphere.compute_resource_name = ENV['VAGRANT_VSPHERE_RESOURCE_POOL']
|
||||
|
||||
# The resource pool for the new VM
|
||||
#vsphere.resource_pool_name = 'Comp'
|
||||
|
||||
# path to folder where new VM should be created, if not specified template's parent folder will be used
|
||||
vsphere.vm_base_path = ENV['VAGRANT_VSPHERE_BASE_PATH']
|
||||
|
||||
# The template we're going to clone
|
||||
vsphere.template_name = ENV['VAGRANT_VSPHERE_TEMPLATE_NAME']
|
||||
|
||||
# The name of the new machine
|
||||
#vsphere.name = ENV['MASTER_NAME']
|
||||
|
||||
# vSphere login
|
||||
vsphere.user = ENV['VAGRANT_VSPHERE_USERNAME']
|
||||
|
||||
# vSphere password
|
||||
vsphere.password = ENV['VAGRANT_VSPHERE_PASSWORD']
|
||||
|
||||
# cpu count
|
||||
vsphere.cpu_count = $vm_cpus
|
||||
|
||||
# memory in MB
|
||||
vsphere.memory_mb = vm_mem
|
||||
|
||||
# If you don't have SSL configured correctly, set this to 'true'
|
||||
vsphere.insecure = ENV['VAGRANT_VSPHERE_INSECURE']
|
||||
end
|
||||
|
||||
|
||||
# Don't attempt to update Virtualbox Guest Additions (requires gcc)
|
||||
if Vagrant.has_plugin?("vagrant-vbguest") then
|
||||
config.vbguest.auto_update = false
|
||||
|
Reference in New Issue
Block a user