add vagrantfile-esxi
parent
dab292832d
commit
c58717bcfc
|
@ -11,8 +11,7 @@ OGAGENTVERSION="1.1.2"
|
|||
LANGUAGE = "es_ES"
|
||||
ENV['LC_ALL'] = LANGUAGE + ".UTF-8"
|
||||
# Number of OpenGnsys clients (accepted values: from 2 to 9).
|
||||
NCLIENTS = ENV['NUMBER_OF_CLIENTS']|| 4
|
||||
NCLIENTS = NCLIENTS.to_i
|
||||
NCLIENTS = 4
|
||||
# Repository virtual disk: file and size (GB).
|
||||
REPODISK = "ogRepo.vdi"
|
||||
REPOSIZE = 50
|
||||
|
@ -40,7 +39,7 @@ OGSERVERSCRIPT = <<EOT
|
|||
|
||||
# Fix problem with gitea host
|
||||
|
||||
grep -q '^150\.214\.58\.246' /etc/hosts || echo "150.214.58.246 ognproject.evlt.uma.es" >> /etc/hosts
|
||||
echo "150.214.58.246 ognproject.evlt.uma.es" >> /etc/hosts
|
||||
|
||||
# Fix ssh
|
||||
mkdir -p /root/.ssh/
|
||||
|
@ -110,7 +109,7 @@ echo y | /opt/opengnsys/bin/setserveraddr $(ip -o link show | tail -1 | cut -d:
|
|||
for ((i=#{NCLIENTS+10}; i>10; i--)); do
|
||||
sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf
|
||||
done
|
||||
service isc-dhcp-server restart
|
||||
service isc-dhcp-server start
|
||||
|
||||
# Comment out next lines for automatic data insertion.
|
||||
SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES"
|
||||
|
@ -146,7 +145,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
esxi.guest_storage = [ 10 ]
|
||||
esxi.esxi_virtual_network = [ 'vLan_742', OGVERSION ]
|
||||
esxi.guest_mac_address = [ "#{MACPREFIX}:00", "#{MACPREFIX}:01" ]
|
||||
esxi.guest_nic_type = 'e1000'
|
||||
end
|
||||
# VM base and host name.
|
||||
og.vm.box = "esxi_clone/dummy"
|
||||
|
@ -156,6 +154,32 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
og.vm.provision "shell", inline: OGSERVERSCRIPT , env: {"NETPREFIX" => NETPREFIX , "OGVERSION" => OGVERSION , "GITEA_TOKEN" => GITEA_TOKEN , "GITEA_USER" => GITEA_USER , "DHCPNET" => DHCPNET , "SSH_GIT_KEY_PASS" => SSH_GIT_KEY_PASS }
|
||||
end
|
||||
|
||||
# config.vm.define "pc11" do |v1|
|
||||
# # Specific VirtualBox configuration.
|
||||
# v1.vm.provider :vmware_esxi do |esxi|
|
||||
# # VM name, memory and CPUs.
|
||||
# esxi.guest_name = "pc11-#{OGVERSION}"
|
||||
# esxi.guest_memsize = CLIENTMEM
|
||||
# esxi.esxi_username = 'root'
|
||||
# esxi.esxi_password = ESXIPASSWORD
|
||||
# esxi.esxi_hostname = 'esxi-jenkins.evlt.uma.es'
|
||||
# esxi.clone_from_vm = 'cli'
|
||||
# esxi.esxi_resource_pool = "/"
|
||||
# esxi.local_allow_overwrite = 'True'
|
||||
# esxi.guest_custom_vmx_settings = [['monitor.allowLegacyCPU', 'TRUE']]
|
||||
# esxi.guest_storage = [ 10 ]
|
||||
# esxi.esxi_virtual_network = [ OGVERSION ]
|
||||
# esxi.guest_mac_address = [ "#{MACPREFIX}:11"]
|
||||
# esxi.guest_autostart = 'false'
|
||||
# end
|
||||
# # VM base and host name.
|
||||
# v1.vm.box = "esxi_clone/dummy"
|
||||
# v1.vm.hostname = "pc11-#{OGVERSION}"
|
||||
# v1.vm.boot_timeout = 10
|
||||
# v1.ssh.timeout = 5
|
||||
# v1.ssh.max_tries = 1
|
||||
# # Launch provisioning script.
|
||||
# end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue