open-nomad/e2e/terraform/packer/windows-2016-amd64
Tim Gross 57f694ff2e
E2E: AMI software version bumps and cleanup (#9213)
* remove unused vault installation from Windows AMI
* match Windows and Linux Consul versions
* bump AMI base Nomad to current stable
2020-10-29 08:27:50 -04:00
..
README.md e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
disable-windows-updates.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
fix-tls.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
install-consul.ps1 E2E: AMI software version bumps and cleanup (#9213) 2020-10-29 08:27:50 -04:00
install-docker.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
install-nuget.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
install-openssh.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
install-tools.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
provision.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
setup-directories.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00
setupwinrm.ps1 e2e: use more specific names for OS/distros (#9204) 2020-10-28 12:58:00 -04:00

README.md

Windows Packer Build

There are a few boilerplate items in the Powershell scripts, explained below.

The default TLS protocol in the version of .NET that our Powershell cmdlets are built in it 1.0, which means plenty of properly configured HTTP servers will reject requests. The boilerplate snippet below sets this for the current script:

# Force TLS1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

We need to run some of the scripts as an administrator role. The following is a safety check that we're doing so:

$RunningAsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (!$RunningAsAdmin) {
  Write-Error "Must be executed in Administrator level shell."
  exit 1
}