Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
191 lines (142 sloc) 6.32 KB
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 2.2.3"
box_name = ENV['UPLF_VAGRANT_BOX_NAME'] || "SubPointSolutions/win-2016-datacenter-sp2016latest-sql16-vs17"
linked_clone = ENV['UPLF_VAGRANT_LINKED_CLONE'].to_s.empty? == false
machine_folder = ENV['UPLF_VBMANAGE_MACHINEFOLDER'] || nil
# two vm topology: dc and client
# - dc box gets promoted to minimal domain controller
# - client box gets SQL server completion and then setups minimal SharePoint farm
vm_dc = "dc"
vm_client = "sp16lts"
# this configuration is driven by the ENV variables
# use the following variables to change default RAM/CPU allocation
#
# UPLF_DC_MEMORY / UPLF_DC_CPUS
# UPLF_SP16LTS_MEMORY / UPLF_SP16LTS_CPUS
# uplift helper for vagrant configurations
uplift = VagrantPlugins::Uplift::Config()
# network range where dc and other vms will be created
# by default 192.168.4.*, use as following or skip it
# be aware that two dc won't get along within the same network
# use different networks for different stacks or one stack at a time
uplift.set_network_range("192.168.16")
Vagrant.configure("2") do |config|
# additional plugins to be used with this vagrant config
config.vagrant.plugins = [
"vagrant-reload",
"vagrant-uplift"
]
# domain controller box
config.vm.define(vm_dc) do | vm_config |
# -- UPLIFT CONFIG START --
# there should not be a need to modify core uplift configration
# avoid making changes to it, add your own provision at the end
vm_config.vm.box = box_name
# standard config
uplift.set_default_synced_folder(vm_dc, vm_config)
uplift.set_2Gb(vm_dc, vm_config)
uplift.set_hostname(vm_dc, vm_config, vm_dc)
# always setup correct networking
uplift.set_private_dc_network(vm_dc, vm_config)
# uplift baseline
if !uplift.has_checkpoint?(vm_dc, 'dsc-soe')
uplift.provision_win16_dsc_soe(vm_dc, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'dsc-soe'
end
# uplift dc creation
if !uplift.has_checkpoint?(vm_dc, 'dc-creation')
uplift.provision_dc16(vm_dc, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'dc-creation'
end
# additional virtualbox tweaks
vm_config.vm.provider "virtualbox" do |v|
v.gui = false
v.cpus = uplift.get_vm_cpus(vm_dc, 4)
v.memory = uplift.get_vm_memory(vm_dc, 2 * 1024)
v.customize ['modifyvm', :id, '--cpuexecutioncap', '100']
v.customize ["modifyvm", :id, "--ioapic", "on"]
v.linked_clone = linked_clone
end
# -- UPLIFT CONFIG END --
# add your custom vagrant configuration here
end
# dev box - sql/sp/vs
config.vm.define "#{vm_client}" do | vm_config |
# -- UPLIFT CONFIG START --
# there should not be a need to modify core uplift configration
# avoid making changes to it, add your own provision at the end
# box config
vm_config.vm.box = box_name
vm_config.vm.box_check_update = false
# uplift - base config
uplift.set_default_synced_folder(vm_client, vm_config)
uplift.set_6Gb(vm_client, vm_config)
uplift.set_hostname(vm_client, vm_config, vm_client)
# uplift - network, base provision + dc join
uplift.set_client_network(vm_client, vm_config, vm_client)
if !uplift.has_checkpoint?(vm_client, 'dsc-soe')
uplift.provision_win16_dsc_soe(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'dsc-soe'
end
if !uplift.has_checkpoint?(vm_client, 'dc-join')
uplift.provision_dc_join(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'dc-join'
end
# we use sql onthe same box
# uplift.provision_sp16_single_server_farm() points to SQL server name, last param - vm_client
# complete sql image
if !uplift.has_checkpoint?(vm_client, 'sql-complete-image')
uplift.provision_sql16_complete_image(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sql-complete-image'
end
if !uplift.has_checkpoint?(vm_client, 'sql16-optimize')
uplift.provision_sql16_optimize(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sql16-optimize'
end
# complete sharepoint install
if !uplift.has_checkpoint?(vm_client, 'sp-farm-presetup')
uplift.provision_sp16_pre_setup(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-farm-presetup'
end
if !uplift.has_checkpoint?(vm_client, 'sp-farm-presetup')
uplift.provision_sp16_pre_setup(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-farm-presetup'
end
if !uplift.has_checkpoint?(vm_client, 'sp-accounts')
uplift.provision_sp16_sp_accounts(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-accounts'
end
if !uplift.has_checkpoint?(vm_client, 'sp-sql-accounts')
uplift.provision_sp16_sql_accounts(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-sql-accounts'
end
if !uplift.has_checkpoint?(vm_client, 'sp-single-farm')
uplift.provision_sp16_single_server_farm(vm_client, vm_config, vm_client)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-single-farm'
end
if !uplift.has_checkpoint?(vm_client, 'sp-farm-services')
uplift.provision_sp16_minimal_services(vm_client, vm_config, vm_client)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-farm-services'
end
if !uplift.has_checkpoint?(vm_client, 'sp-farm-post-setup')
uplift.provision_sp16_farm_post_setup(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-farm-post-setup'
end
if !uplift.has_checkpoint?(vm_client, 'sp-web-app')
uplift.provision_sp16_web_application(vm_client, vm_config)
vm_config.vm.provision :uplift_checkpoint, name: 'sp-web-app'
end
# virtualbox tuning
vm_config.vm.provider "virtualbox" do |v|
v.gui = false
v.cpus = uplift.get_vm_cpus(vm_client, 4)
v.memory = uplift.get_vm_memory(vm_client, 6 * 1024)
v.customize ['modifyvm', :id, '--cpuexecutioncap', '100']
v.customize ["modifyvm", :id, "--ioapic", "on"]
v.linked_clone = linked_clone
end
# -- UPLIFT CONFIG END --
# add your custom vagrant configuration here
end
end
You can’t perform that action at this time.