Skip to content

Commit 36d8d23

Browse files
committed
dak4
1 parent 60f1874 commit 36d8d23

2 files changed

Lines changed: 35 additions & 13 deletions

File tree

prepare-vms/azure/packer/provision.ps1

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ErrorActionPreference = 'Stop'
22

33
$docker_provider = "DockerMsftProvider"
4-
$docker_version = "18.09.3"
4+
$docker_version = "19.03.5"
55

66
Write-Output 'Set Windows Updates to manual'
77
Cscript $env:WinDir\System32\SCregEdit.wsf /AU 1
@@ -55,6 +55,9 @@ choco install -y firefox
5555
Write-Output 'Install Docker Compose'
5656
choco install -y docker-compose
5757

58+
choco install -y poshgit
59+
choco install -y visualstudiocode
60+
5861
if (Test-Path $env:ProgramFiles\docker) {
5962
Write-Output Update Docker
6063
Install-Package -Name docker -ProviderName $docker_provider -Verbose -Update -RequiredVersion $docker_version -Force
@@ -81,14 +84,43 @@ $images =
8184
'mcr.microsoft.com/windows/servercore:ltsc2019',
8285
'mcr.microsoft.com/windows/nanoserver:1809',
8386
'mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019',
84-
'golang',
85-
'golang:nanoserver'
87+
'mcr.microsoft.com/dotnet/framework/sdk:4.7.2-20190312-windowsservercore-ltsc2019',
88+
'mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019',
89+
'mcr.microsoft.com/dotnet/framework/aspnet',
90+
'mcr.microsoft.com/dotnet/core/runtime:3.0',
91+
'mcr.microsoft.com/dotnet/core/sdk:3.0.100',
92+
'mcr.microsoft.com/dotnet/core/aspnet:3.0',
93+
'dak4dotnet/sql-server:2017',
94+
'nats:2.1.0',
95+
'dockersamples/aspnet-monitoring-exporter:4.7.2-windowsservercore-ltsc2019',
96+
'dockersamples/aspnet-monitoring-grafana:5.2.1-windowsservercore-ltsc2019',
97+
'dockersamples/aspnet-monitoring-prometheus:2.3.1-windowsservercore-ltsc2019',
98+
'sixeyed/elasticsearch:5.6.11-windowsservercore-ltsc2019',
99+
'sixeyed/kibana:5.6.11-windowsservercore-ltsc2019',
100+
'traefik:1.7.18-windowsservercore-1809'
86101

87102
Write-Output 'Pulling images'
88103
foreach ($tag in $images) {
89104
Write-Output " Pulling image $tag"
90105
& docker image pull $tag
91106
}
92107

108+
Write-Output '* Configuring environment'
109+
refreshenv
110+
$env:PATH=$env:PATH + ';C:\Program Files\Mozilla Firefox;C:\Program Files\Git\bin'
111+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
112+
$env:workshop='C:\scm\dak4.net'
113+
[Environment]::SetEnvironmentVariable('workshop', $env:workshop, [EnvironmentVariableTarget]::Machine)
114+
115+
New-ItemProperty -Path HKLM:\Software\Microsoft\ServerManager -Name DoNotOpenServerManagerAtLogon -PropertyType DWORD -Value "1" -Force
116+
New-ItemProperty -Path HKLM:\Software\Microsoft\ServerManager\Oobe -Name DoNotOpenInitialConfigurationTasksAtLogon -PropertyType DWORD -Value "1" -Force
117+
118+
Write-Output '* Cloning the workshop repo'
119+
mkdir C:\scm -ErrorAction Ignore
120+
cd C:\scm
121+
git clone https://github.com/sixeyed/dak4.net.git
122+
git checkout $branch
123+
$branch | Out-File C:\branch.txt
124+
93125
Write-Output 'Disable autologon'
94126
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name AutoAdminLogon -PropertyType DWORD -Value "0" -Force

prepare-vms/azure/packer/windows_2019.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@
4848
"restart_timeout": "{{user `restart_timeout`}}",
4949
"type": "windows-restart"
5050
},
51-
{
52-
"scripts": [
53-
"./kb4482887.ps1"
54-
],
55-
"type": "powershell"
56-
},
57-
{
58-
"restart_timeout": "{{user `restart_timeout`}}",
59-
"type": "windows-restart"
60-
},
6151
{
6252
"scripts": [
6353
"./provision.ps1"

0 commit comments

Comments
 (0)