Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Server 2016 testing environment #23

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a0cb281
WIP chocolatey-test-environment/issues/19 Upgrade Bitvise SSH Server
basictheprogram Oct 31, 2017
8da4e45
Testing with Windows Server 2016 Standard Edition
basictheprogram Nov 2, 2017
e210db3
Closes https://github.com/chocolatey/chocolatey-test-environment/issu…
basictheprogram Nov 9, 2017
3f1957b
My windows_server-2016 branch
basictheprogram Dec 22, 2017
bf79b5a
My windows_2012_r2 fully patched chocolatey-test-environment
basictheprogram Dec 22, 2017
281121f
My win2012r2-x64-nocm chocolatey-test-environment
basictheprogram Dec 22, 2017
23a36bd
My win2012r2-x64-nocm chocolatey-test-environment
basictheprogram Dec 22, 2017
43f1d60
Merge branch 'win2012r2-x64-nocm' of github.com:basictheprogram/choco…
basictheprogram Dec 22, 2017
c58ea8e
My "ferventcoder/win2012r2-x64-nocm" branch
basictheprogram Dec 22, 2017
54853a0
Vagrant file for vagrant windows_10
basictheprogram Dec 28, 2017
096d6b2
Vagrantfile for Window Server 2016
basictheprogram Dec 28, 2017
bc94963
Added /project sync folder
basictheprogram Dec 28, 2017
0f9575b
Minor clean up
basictheprogram Jan 18, 2018
4dfb617
Latest version of bitvise-ssh-server is broken in chocolatey
basictheprogram Jan 18, 2018
e09c0e8
Update to Vagrant 2.1.x, use built-in vagrant snapshot command
StefanScherer Jul 22, 2018
f77c489
Fix vagrant snapshot save
StefanScherer Jul 27, 2018
5f155c6
Merge branch 'master' of https://github.com/chocolatey/chocolatey-tes…
basictheprogram Jul 30, 2018
bdc0f01
Fix deprecation warning
FranklinYu Nov 12, 2018
20267af
On errors continue and be silent
basictheprogram Nov 26, 2018
5e176a2
Attempt to upgrade the VirtualBox Additions automatically
basictheprogram Nov 26, 2018
43c0b71
Merge branch 'my_win2012r2-x64-nocm' into windows_2016
basictheprogram Nov 26, 2018
77829d5
Merge branch 'windows_2016' into windows_10
basictheprogram Nov 26, 2018
240b251
Merge branch 'update-vagrant-2.1.x' of https://github.com/StefanScher…
basictheprogram Nov 29, 2018
144e857
Merge branch 'fix/linked-clone' of https://github.com/FranklinYu/choc…
basictheprogram Nov 29, 2018
c52d79f
Name the virtualbox
basictheprogram Nov 29, 2018
cb40707
WIP https://github.com/chocolatey/chocolatey-test-environment/pull/30…
basictheprogram Nov 29, 2018
c9c4bf5
Name the virtual machine
basictheprogram Nov 30, 2018
ea71c9f
Merge branch 'master' of github.com:basictheprogram/chocolatey-test-e…
basictheprogram Nov 30, 2018
ccf6946
Merge branch 'master' of https://github.com/chocolatey/chocolatey-tes…
basictheprogram Feb 8, 2019
c59ea97
Merge branch 'master' of https://github.com/chocolatey/chocolatey-tes…
basictheprogram Oct 7, 2019
ab109c0
WIP https://gitlab.x.real-time.com/chocolatey/eDrawings-Viewer/issues/1
basictheprogram Nov 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ end
Vagrant.configure("2") do |config|
# This setting will download the atlas box at
# https://atlas.hashicorp.com/ferventcoder/boxes/win2012r2-x64-nocm
config.vm.box = "ferventcoder/win2012r2-x64-nocm"
config.vm.box = "BasicTheProgram/windows_2016"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure we'd convert to another box, apologies. We would need to really review it for safety and security, as this test environment is used in many environments.

And do you have vmware_fusion, hyper-v, and virtualbox versions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have fusion, or hyper-v versions, but packer has the ability to build all of the above with a pretty simple command line evocation.

See my comments in the google group about having git branches for each version of windows or having multiple versions of Windows supported in the VagrantFile.

I have the need for a Windows 2016 testing environment, thus these changes. I don't want to deprecated or diminish the Server 2012 R2 stuff, ideally supporting multiple test environments is the goal. Just need guidance from you on how to do that.

And, ideally, you'd take over the official config.vm.box stuff. Probably build via packer to make it easier for people to contribute to the test environment?


# http://docs.vagrantup.com/v2/providers/configuration.html
# http://docs.vagrantup.com/v2/virtualbox/configuration.html
Expand All @@ -29,7 +29,7 @@ Vagrant.configure("2") do |config|
v.customize ["modifyvm", :id, "--vram", 32]
# For better DNS resolution
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# No audo
# No audio
basictheprogram marked this conversation as resolved.
Show resolved Hide resolved
v.customize ["modifyvm", :id, "--audio", "none"]
# Clipboard enabled
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
Expand Down Expand Up @@ -84,6 +84,7 @@ Vagrant.configure("2") do |config|
# naming of this directory being `vagrant` is just a coincedence).
# Share `packages` directory as `C:\packages`
config.vm.synced_folder "packages", "/packages"

#config.vm.synced_folder "temp", "/Users/vagrant/AppData/Local/Temp/chocolatey"
# not recommended for sharing, it may have issues with `vagrant sandbox rollback`
#config.vm.synced_folder "chocolatey", "/ProgramData/chocolatey"
Expand All @@ -107,10 +108,11 @@ Vagrant.configure("2") do |config|
config.vm.provision :shell, :path => "shell/InstallChocolatey.ps1"
config.vm.provision :shell, :path => "shell/NotifyGuiAppsOfEnvironmentChanges.ps1"
else
config.vm.provision :shell, :path => "shell/PrepareWindows.ps1", :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/InstallNet4.ps1", :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/InstallChocolatey.ps1", :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/NotifyGuiAppsOfEnvironmentChanges.ps1", :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/PrepareWindows.ps1", privileged: false
config.vm.provision :shell, :path => "shell/InstallNet4.ps1", privileged: false
config.vm.provision :shell, :path => "shell/InstallChocolatey.ps1", privileged: false
config.vm.provision :shell, :path => "shell/NotifyGuiAppsOfEnvironmentChanges.ps1",privileged: false
config.vm.provision :shell, :path => "shell/InstallToolchain.ps1", privileged: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-privileged? It needs to succeed, which is highly likely to need to run with admin on the VM. Not sure I understand this change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See hashicorp/vagrant#9138 for the ugly details. Looks like a change in Windows Server 2016 Build 14393.rs1_release.170917-1700.

Happy to change it if you know another work-around for Windows Server 2016. If you read the ticket the upstream maintainer of the packer scripts reports that this specific build of Windows Server 2016 has the problem.

So can work around it or wait(?) for Microsoft to change thing back?

end

$packageTestScript = <<SCRIPT
Expand Down Expand Up @@ -140,6 +142,6 @@ SCRIPT
if Vagrant::VERSION < '1.8.0'
config.vm.provision :shell, :inline => $packageTestScript
else
config.vm.provision :shell, :inline => $packageTestScript, :powershell_elevated_interactive => true
config.vm.provision :shell, :inline => $packageTestScript, privileged: false
end
end
4 changes: 4 additions & 0 deletions shell/InstallToolchain.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if (Get-Command "choco.exe" -ErrorAction SilentlyContinue)
{
"7zip", "bitvise-ssh-server", "git", "notepadplusplus" | ForEach-Object -Process {choco install $_}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for these to be here. They were pre-installed on the older system

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/chocolatey/chocolatey-test-environment/issues the tool chain is very old and I'd like to have the tools upgraded.

We can fork the packer project and add the tools in packer but this keeps the design clean and installs current tools in this project.

See my comments about using chocolatey to install the tools because I view the test environment as testing chocolatey packages and not chocolatey itself it's ok(?) to use chocolate to install the latest version of tools?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments about using chocolatey to install the tools because I view the test environment as testing chocolatey packages and not chocolatey itself it's ok(?) to use chocolate to install the latest version of tools?

That's likely fine.