- # -*- 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"
- # Read VM config from JSON file.
- helix_config = (JSON.parse(File.read("helix_server.json")))
- class HSError < Vagrant::Errors::VagrantError
- error_key "Helix Server Configuration error"
- end
- if !helix_config.has_key?("oses")
- raise HSError.new("Please define boxes in helix_server.json file.")
- end
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- # All Vagrant configuration is done here. The most common configuration
- # options are documented and commented below. For a complete reference,
- # please see the online documentation at vagrantup.com.
- # If true, then any SSH connections made will enable agent forwarding.
- # Default value: false
- config.ssh.forward_agent = true
- 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_config['oses'].each do |os|
- osname = os['osname']
- os['nodes'].each do |node|
- #hostname = "#{osname}-#{node[':nodename']}"
- hostname = "#{node[':nodename']}"
- os_bootstrap = "bootstrap-#{osname}.sh"
- config.vm.define hostname.to_sym do |machine|
- if Vagrant.has_plugin?("vagrant-cachier")
- machine.cache.scope = :box
- end
- machine.vm.box = os['box']
- machine.vm.box_url = os['box_url']
- machine.vm.synced_folder "./shared", "/shared"
- # Set the root password to '4F@stSCM'
- machine.vm.provision "shell", inline: "echo 'root:4F@stSCM' | sudo chpasswd"
- # Updated the VM and install various packages.
- machine.vm.provision :shell, :path => os_bootstrap
- # Prepare for Perforce operation.
- machine.vm.provision :shell, :path => "bootstrap-sdp-setup.sh"
- # Run initial CBD Test Suite.
- machine.vm.provision :shell, :path => "auto_test_cbd_vagrant.sh"
- machine.vm.network :private_network, ip: node[':ip']
- machine.vm.hostname = hostname + "." + our_domain
- machine.hostmanager.aliases = ["#{hostname}.localdomain", "#{hostname}"]
- end
- end
- end
- end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 15010 | C. Thomas Tyler | Merged CBD updates to ntx64 branch from main. | 10 years ago | |
#1 | 13801 | C. Thomas Tyler | Populate -b perforce_software-cbd-ntx64. | 10 years ago | |
//guest/perforce_software/cbd/main/test/Vagrantfile | |||||
#1 | 11356 | C. Thomas Tyler | Promotion from Dev Branch. What's included: &n...bsp; * CBD scripts for Streams as demonstrated at Merge 2014. * Deletion of files from the original PoC that aren't needed. What's coming later, still work in progress on the dev branch: * Documentation. * Test Suite with complete Vagrant-based Test Environment. * CBD scripts for Classic. « |
10 years ago | |
//guest/perforce_software/cbd/dev/test/Vagrantfile | |||||
#1 | 11354 | C. Thomas Tyler | Started work on Vagrant test harness. | 10 years ago |