- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
- VAGRANTFILE_API_VERSION = "2"
- our_domain = "p4demo.com"
- helix_installer_config = (JSON.parse(File.read("helix_installer_test.json")))
- class HelixInstallerError < Vagrant::Errors::VagrantError
- error_key "HelixInstaller Configuration error"
- end
- if !helix_installer_config.has_key?("oses")
- raise HelixInstallerError.new("Please define boxes in JSON file")
- end
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- if Vagrant.has_plugin?("vagrant-hostmanager")
- config.hostmanager.enabled = true
- config.hostmanager.manage_host = true
- config.hostmanager.ignore_private_ip = false
- config.hostmanager.include_offline = true
- end
- helix_installer_config['oses'].each do |os|
- osname = os['osname']
- os['nodes'].each do |node|
- hostname = "#{node[':nodename']}"
- os_bootstrap = "bootstrap-linux.sh"
- config.vm.define hostname.to_sym do |machine|
- if Vagrant.has_plugin?("vagrant-cachier")
- machine.cache.scope = :box
- end
- if Vagrant.has_plugin?("vagrant-vbguest")
- config.vbguest.auto_update = false
- end
- machine.vm.box = os['box']
- machine.vm.box_url = os['box_url']
- # Set the root password to 'vagrant'
- machine.vm.provision "shell", inline: "echo 'root:vagrant' | sudo chpasswd"
- # OS specific and common bootstrap/provisioning
- fqdn = hostname + "." + our_domain
- machine.vm.synced_folder ENV['HIT_RESET_DIR'], "/tmp/test-reset"
- machine.vm.synced_folder ENV['HIT_TEST_DIR'], "/tmp/test-files"
- machine.vm.provision :shell, :path => os_bootstrap, :args => fqdn
- machine.vm.network :private_network, ip: node[':ip']
- if node.has_key?(":forwarded_port")
- ports = node[':forwarded_port']
- machine.vm.network :forwarded_port, guest: ports['guest'], host: ports['host']
- end
- ### Dropped machine.vm.hostname setting, as it didn't work on all
- ### platforms; it failed on centos6. Meanwhile.
- ### machine.vm.hostname = hostname + "." + our_domain
- if Vagrant.has_plugin?("vagrant-hostmanager")
- machine.hostmanager.aliases = ["#{hostname}.localdomain", "#{hostname}"]
- end
- end
- end
- end
- end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 27421 | Robert Cowham | Branching //guest/perforce_software/helix-installer/main/... to //guest/perforce_softw...are/helix-installer/azure-quickstart/... « |
4 years ago | |
//guest/perforce_software/helix-installer/main/test/Vagrantfile | |||||
#7 | 26831 | C. Thomas Tyler | Released HelixInstaller/MultiArch/2020.1/26829 (2020/10/07). | 4 years ago | |
#6 | 26793 | C. Thomas Tyler | Released HelixInstaller/MultiArch/2020.1/26784 (2020/09/25). | 5 years ago | |
#5 | 26031 | C. Thomas Tyler | Released Helix Installer 2019.4.26026 (2019/08/22). | 6 years ago | |
#4 | 25999 | C. Thomas Tyler | Released HelixInstaller 2019.4.25995 (2019/08/20). | 6 years ago | |
#3 | 25166 | C. Thomas Tyler | Released Helix Installer 2019.1.25164 (2019/02/22). | 6 years ago | |
#2 | 24914 | C. Thomas Tyler | Released HelixInstaller 2018.2.24912. | 6 years ago | |
#1 | 24865 | C. Thomas Tyler | Released HelixInstaller v2018.2.24862. | 6 years ago | |
//guest/perforce_software/helix-installer/dev/test/Vagrantfile | |||||
#1 | 24860 | C. Thomas Tyler |
Added basic Vagrant test suite for Helix Installer for testing on CentOS 6.10. |
6 years ago |