windows_server_1709_docker.json 6.07 KB
Newer Older
Stefan Scherer's avatar
Stefan Scherer committed
1
2
3
4
{
  "builders": [
    {
      "boot_wait": "60s",
5
6
7
8
9
      "communicator": "winrm",
      "cpu": 2,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
Stefan Scherer's avatar
Stefan Scherer committed
10
11
12
13
14
15
16
17
18
19
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
        "./scripts/docker/2016/install-containers-feature.ps1",
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
20
21
22
23
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
Stefan Scherer's avatar
Stefan Scherer committed
24
      "ram_size": 2048,
25
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
Stefan Scherer's avatar
Stefan Scherer committed
26
      "switch_name": "{{user `hyperv_switchname`}}",
27
      "type": "hyperv-iso",
Stefan Scherer's avatar
Stefan Scherer committed
28
29
30
      "vm_name": "WindowsServer1709Docker",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
31
32
33
34
35
      "winrm_username": "vagrant"
    },
    {
      "boot_wait": "60s",
      "communicator": "winrm",
Stefan Scherer's avatar
Stefan Scherer committed
36
      "disk_size": "{{user `disk_size`}}",
Stefan Scherer's avatar
Stefan Scherer committed
37
      "disk_type_id": "{{user `disk_type_id`}}",
Stefan Scherer's avatar
Stefan Scherer committed
38
39
40
41
42
43
44
45
46
47
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
        "./scripts/docker/2016/install-containers-feature.ps1",
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
48
49
50
51
52
53
54
      "guest_os_type": "windows9srv-64",
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "vmware-iso",
55
      "version": 12,
56
      "vm_name": "WindowsServer1709Docker",
Stefan Scherer's avatar
Stefan Scherer committed
57
58
59
60
61
62
63
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068",
        "vhv.enable": "{{user `vhv_enable`}}"
64
65
66
67
68
69
70
      },
      "vmx_remove_ethernet_interfaces": true,
      "vnc_port_max": 5980,
      "vnc_port_min": 5900,
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
Stefan Scherer's avatar
Stefan Scherer committed
71
72
73
    },
    {
      "boot_wait": "60s",
74
      "communicator": "winrm",
Stefan Scherer's avatar
Stefan Scherer committed
75
76
77
78
79
80
81
82
83
84
85
      "disk_size": "{{user `disk_size`}}",
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
        "./scripts/docker/2016/install-containers-feature.ps1",
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
86
87
88
89
90
91
92
93
      "guest_additions_mode": "disable",
      "guest_os_type": "Windows2012_64",
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "virtualbox-iso",
Stefan Scherer's avatar
Stefan Scherer committed
94
      "vboxmanage": [
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "2"
        ]
      ],
      "vm_name": "WindowsServer1709Docker",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
    }
  ],
  "post-processors": [
    {
      "keep_input_artifact": false,
      "output": "windows_server_1709_docker_{{.Provider}}.box",
      "type": "vagrant",
      "vagrantfile_template": "vagrantfile-windows_2016_core.template"
Stefan Scherer's avatar
Stefan Scherer committed
120
121
122
123
    }
  ],
  "provisioners": [
    {
Stefan Scherer's avatar
Stefan Scherer committed
124
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
125
126
127
128
129
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat"
      ],
      "type": "windows-shell"
Stefan Scherer's avatar
Stefan Scherer committed
130
131
    },
    {
132
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
133
134
        "./scripts/docker/2016/install-containers-feature.ps1",
        "./scripts/docker/set-winrm-automatic.ps1"
135
136
      ],
      "type": "powershell"
Stefan Scherer's avatar
Stefan Scherer committed
137
138
    },
    {
139
140
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
Stefan Scherer's avatar
Stefan Scherer committed
141
142
    },
    {
143
144
145
146
147
      "environment_vars": [
        "docker_images={{user `docker_images`}}",
        "docker_provider={{user `docker_provider`}}",
        "docker_version={{user `docker_version`}}"
      ],
Stefan Scherer's avatar
Stefan Scherer committed
148
149
      "scripts": [
        "./scripts/docker/add-docker-group.ps1",
150
151
        "./scripts/docker/install-docker.ps1",
        "./scripts/docker/docker-pull.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
152
153
154
155
        "./scripts/docker/open-docker-insecure-port.ps1",
        "./scripts/docker/open-docker-swarm-ports.ps1",
        "./scripts/docker/remove-docker-key-json.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
156
157
      ],
      "type": "powershell"
Stefan Scherer's avatar
Stefan Scherer committed
158
159
    },
    {
160
161
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
Stefan Scherer's avatar
Stefan Scherer committed
162
163
164
165
166
    },
    {
      "scripts": [
        "./scripts/compile-dotnet-assemblies.bat",
        "./scripts/compact.bat"
167
168
      ],
      "type": "windows-shell"
Stefan Scherer's avatar
Stefan Scherer committed
169
170
171
    }
  ],
  "variables": {
172
    "autounattend": "./answer_files/server_1709/Autounattend.xml",
Stefan Scherer's avatar
Stefan Scherer committed
173
174
    "disk_size": "61440",
    "disk_type_id": "1",
175
176
177
    "docker_images": "microsoft/windowsservercore:1709 microsoft/nanoserver:1709",
    "docker_provider": "DockerProvider",
    "docker_version": "preview",
178
179
    "headless": "false",
    "iso_checksum": "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591",
Stefan Scherer's avatar
Stefan Scherer committed
180
    "iso_checksum_type": "sha256",
181
182
    "iso_url": "https://software-download.microsoft.com/pr/en_windows_server_version_1709_x64_dvd_100090904.iso",
    "manually_download_iso_from": "https://my.visualstudio.com/downloads?pid=2347",
Stefan Scherer's avatar
Stefan Scherer committed
183
    "restart_timeout": "5m",
184
    "vhv_enable": "false",
Stefan Scherer's avatar
Stefan Scherer committed
185
186
187
    "winrm_timeout": "2h"
  }
}
188