windows_2016_docker.json 5.58 KB
Newer Older
1
2
{
  "builders": [
3
    {
Stefan Scherer's avatar
Stefan Scherer committed
4
      "vm_name":"WindowsServer2016Docker",
5
      "type": "hyperv-iso",
6
      "disk_size": "{{user `disk_size`}}",
7
8
9
10
11
      "boot_wait": "0s",
      "guest_additions_mode":"disable",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
12
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
13
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
14
        "./scripts/disable-screensaver.ps1",
15
16
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
17
        "./scripts/docker/2016/install-containers-feature.ps1",
18
19
20
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
21
22
23
      "communicator":"winrm",
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
24
      "winrm_timeout" : "{{user `winrm_timeout`}}",
Stefan Scherer's avatar
Stefan Scherer committed
25
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
26
      "ram_size": 2048,
27
28
      "cpu": 2,
      "switch_name":"{{user `hyperv_switchname`}}",
Patrick Lang's avatar
Patrick Lang committed
29
30
      "enable_secure_boot":true,
      "enable_virtualization_extensions":true
31
    },
32
    {
Stefan Scherer's avatar
Stefan Scherer committed
33
      "vm_name":"WindowsServer2016Docker",
34
35
      "type": "vmware-iso",
      "communicator": "winrm",
Stefan Scherer's avatar
Stefan Scherer committed
36
37
38
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
39
      "headless": "{{user `headless`}}",
40
      "boot_wait": "2m",
41
42
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
43
      "winrm_timeout" : "{{user `winrm_timeout`}}",
44
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
45
      "guest_os_type": "windows9srv-64",
46
47
      "disk_size": "{{user `disk_size`}}",
      "disk_type_id": "{{user `disk_type_id`}}",
48
49
      "vnc_port_min": 5900,
      "vnc_port_max": 5980,
50
      "version": 11,
51
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
52
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
53
        "./scripts/disable-screensaver.ps1",
54
55
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
56
        "./scripts/docker/2016/install-containers-feature.ps1",
57
58
59
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
60
      "vmx_remove_ethernet_interfaces": true,
61
62
63
64
65
66
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068",
67
        "vhv.enable": "{{user `vhv_enable`}}"
68
69
70
      }
    },
    {
Stefan Scherer's avatar
Stefan Scherer committed
71
      "vm_name":"WindowsServer2016Docker",
72
73
      "type": "virtualbox-iso",
      "communicator": "winrm",
Stefan Scherer's avatar
Stefan Scherer committed
74
75
76
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
77
      "headless": "{{user `headless`}}",
78
      "boot_wait": "2m",
79
80
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
81
      "winrm_timeout" : "{{user `winrm_timeout`}}",
82
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
83
      "post_shutdown_delay": "10s",
84
85
      "guest_os_type": "Windows2012_64",
      "guest_additions_mode": "disable",
86
      "disk_size": "{{user `disk_size`}}",
87
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
88
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
89
        "./scripts/disable-screensaver.ps1",
90
91
        "./scripts/disable-winrm.ps1",
        "./scripts/docker/enable-winrm.ps1",
92
        "./scripts/docker/2016/install-containers-feature.ps1",
93
        "./scripts/microsoft-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
94
        "./scripts/win-updates.ps1"
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
120
      ],
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "2"
        ]
      ]
    }
  ],
  "provisioners": [
    {
      "type": "windows-shell",
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat"
      ]
    },
Stefan Scherer's avatar
Stefan Scherer committed
121
122
123
124
125
126
    {
      "type": "powershell",
      "scripts": [
        "./scripts/debloat-windows.ps1"
      ]
    },
127
    {
128
129
      "type": "windows-restart",
      "restart_timeout": "{{user `restart_timeout`}}"
130
131
132
133
    },
    {
      "type": "powershell",
      "scripts": [
134
        "./scripts/docker/add-docker-group.ps1",
135
        "./scripts/docker/set-winrm-automatic.ps1",
136
        "./scripts/docker/2016/install-docker-ee-preview.ps1",
137
        "./scripts/docker/docker-pull-async.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
138
        "./scripts/docker/open-docker-insecure-port.ps1",
139
        "./scripts/docker/open-docker-swarm-ports.ps1",
140
141
        "./scripts/docker/remove-docker-key-json.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
142
      ]
Stefan Scherer's avatar
Stefan Scherer committed
143
144
145
146
    },
    {
      "type": "windows-shell",
      "scripts": [
147
        "./scripts/set-winrm-automatic.bat",
148
        "./scripts/uac-enable.bat",
Stefan Scherer's avatar
Cleanup  
Stefan Scherer committed
149
        "./scripts/compile-dotnet-assemblies.bat",
150
        "./scripts/dis-updates.bat",
Stefan Scherer's avatar
Cleanup  
Stefan Scherer committed
151
        "./scripts/compact.bat"
Stefan Scherer's avatar
Stefan Scherer committed
152
      ]
153
154
155
156
157
158
159
    }
  ],
  "post-processors": [
    {
      "type": "vagrant",
      "keep_input_artifact": false,
      "output": "windows_2016_docker_{{.Provider}}.box",
160
      "vagrantfile_template": "vagrantfile-windows_2016_core.template"
161
    }
Stefan Scherer's avatar
Stefan Scherer committed
162
163
  ],
  "variables": {
164
    "headless": "false",
165
166
167
    "disk_size": "61440",
    "disk_type_id": "1",
    "vhv_enable": "false",
Patrick Lang's avatar
Patrick Lang committed
168
    "iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
Stefan Scherer's avatar
Stefan Scherer committed
169
    "iso_checksum_type": "md5",
170
    "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
171
    "autounattend": "./answer_files/2016_core/Autounattend.xml",
172
173
    "restart_timeout": "5m",
    "winrm_timeout": "6h"
Stefan Scherer's avatar
Stefan Scherer committed
174
  }
175
}