Advertisement
Guest User

Untitled

a guest
Mar 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. chef_gem 'chef-provisioning-vsphere' do
  2. action :install
  3. compile_time true
  4. end
  5.  
  6. require 'chef/provisioning/vsphere_driver'
  7.  
  8. with_vsphere_driver host: 'ip/hostname',
  9. insecure: true,
  10. user: '',
  11. password: ''
  12.  
  13. variable1 = {hash values for VM first dissimiliar VM. storage settings/vm_folder/ipsettings/customspecs}
  14. variable2 = {hash values for VM first dissimiliar VM. storage settings/vm_folder/ipsettings/customspecs}
  15.  
  16. Machine_Batch do
  17. #duplicate settings for variable1
  18. sql_options = variable.dup
  19. #set specific settings for sql to not be shared with web
  20. sql_options[:bootstrap_options][:num_cpus]=4
  21. sql_options[:bootstrap_options][:memory_mb]=16384
  22. sql_options[:bootstrap_options][:additional_disk_size_gb]=[20,10,5,4]
  23. machine "SQLBox" do
  24. machine_options sql_options
  25. run_list [put sql role here]
  26. end
  27. #Start other server build
  28. iis_options = variable2.dup
  29. iis_options[:bootstrap_options][:num_cpus]=2
  30. iis_options[:bootstrap_options][:memory_mb]=8096
  31. 1.upto(5) do |i|
  32. machine "#{web}#{i}" do
  33. machine_options iis_options
  34. run_list ["iisrole"]
  35. end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement