windows_server_insider_docker.json 5.31 KB
Newer Older
1
2
3
{
  "builders": [
    {
4
5
6
      "boot_command": [
        "<enter>"
      ],
7
      "boot_wait": "60s",
8
9
10
11
12
      "communicator": "winrm",
      "cpu": 2,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
13
      "generation": 2,
14
15
16
17
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
18
      "ram_size": 2048,
19
20
21
      "secondary_iso_images": [
        "./iso/windows_server_insider_unattend.iso"
      ],
22
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
Stefan Scherer's avatar
Stefan Scherer committed
23
      "switch_name": "{{user `hyperv_switchname`}}",
24
      "type": "hyperv-iso",
Stefan Scherer's avatar
Stefan Scherer committed
25
      "vm_name": "WindowsServerInsiderDocker",
26
      "winrm_password": "vagrant",
Stefan Scherer's avatar
Stefan Scherer committed
27
      "winrm_timeout": "{{user `winrm_timeout`}}",
28
29
30
      "winrm_username": "vagrant"
    },
    {
31
32
33
      "boot_command": [
        "<enter>"
      ],
34
35
      "boot_wait": "60s",
      "communicator": "winrm",
36
37
      "cpus": 2,
      "disk_adapter_type": "lsisas1068",
Stefan Scherer's avatar
Stefan Scherer committed
38
39
      "disk_size": "{{user `disk_size`}}",
      "disk_type_id": "{{user `disk_type_id`}}",
40
41
42
43
44
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1"
      ],
45
46
47
48
49
      "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`}}",
50
      "memory": 2048,
51
52
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "vmware-iso",
53
      "version": 14,
54
      "vm_name": "WindowsServerInsiderDocker",
55
56
57
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
58
        "vhv.enable": "{{user `vhv_enable`}}"
59
60
61
62
63
64
65
      },
      "vmx_remove_ethernet_interfaces": true,
      "vnc_port_max": 5980,
      "vnc_port_min": 5900,
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
66
67
    },
    {
68
69
70
      "boot_command": [
        "<enter>"
      ],
71
      "boot_wait": "60s",
72
      "communicator": "winrm",
73
      "cpus": 2,
Stefan Scherer's avatar
Stefan Scherer committed
74
      "disk_size": "{{user `disk_size`}}",
75
76
77
78
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
79
        "./scripts/enable-winrm.ps1"
80
      ],
81
      "guest_additions_mode": "disable",
Stefan Scherer's avatar
Stefan Scherer committed
82
      "guest_os_type": "Windows2016_64",
83
84
85
86
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
87
      "memory": 2048,
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "virtualbox-iso",
      "vm_name": "WindowsServerInsiderDocker",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
    }
  ],
  "post-processors": [
    {
      "keep_input_artifact": false,
      "output": "windows_server_insider_docker_{{.Provider}}.box",
      "type": "vagrant",
      "vagrantfile_template": "vagrantfile-windows_2016_core.template"
102
103
104
105
    }
  ],
  "provisioners": [
    {
106
107
108
109
110
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat"
      ],
      "type": "windows-shell"
111
112
    },
    {
113
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
114
115
        "./scripts/docker/2016/install-containers-feature.ps1",
        "./scripts/docker/set-winrm-delayed-automatic.ps1"
116
117
      ],
      "type": "powershell"
118
119
    },
    {
120
121
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
122
123
    },
    {
124
125
126
127
128
      "environment_vars": [
        "docker_images={{user `docker_images`}}",
        "docker_provider={{user `docker_provider`}}",
        "docker_version={{user `docker_version`}}"
      ],
129
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
130
        "./scripts/docker/set-winrm-automatic.ps1",
131
        "./scripts/docker/add-docker-group.ps1",
132
133
        "./scripts/docker/install-docker.ps1",
        "./scripts/docker/docker-pull.ps1",
134
        "./scripts/docker/open-docker-insecure-port.ps1",
135
        "./scripts/docker/open-docker-swarm-ports.ps1",
136
137
        "./scripts/docker/remove-docker-key-json.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
138
139
      ],
      "type": "powershell"
140
141
142
    }
  ],
  "variables": {
143
    "autounattend": "./answer_files/server_insider/Autounattend.xml",
Stefan Scherer's avatar
Stefan Scherer committed
144
145
    "disk_size": "61440",
    "disk_type_id": "1",
146
    "old_docker_images": "microsoft/nanoserver-insider microsoft/windowsservercore-insider",
Stefan Scherer's avatar
Stefan Scherer committed
147
    "docker_images": "mcr.microsoft.com/windows/nanoserver/insider:10.0.18298.1000 mcr.microsoft.com/windows/servercore/insider:10.0.18298.1000 mcr.microsoft.com/windows/insider:10.0.18298.1000",
148
    "docker_provider": "ee",
Stefan Scherer's avatar
Stefan Scherer committed
149
    "docker_version": "18-09-1",
150
    "headless": "false",
151
    "iso_checksum": "0dccf29961df59f55a637bb111729ae5123ea8ba63917424e40bd094100fc2b7",
152
    "iso_checksum_type": "sha256",
153
    "iso_url": "https://software-download.microsoft.com/pr/Windows_InsiderPreview_Server_en-us_18298.iso",
154
    "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver",
155
    "restart_timeout": "5m",
Stefan Scherer's avatar
Stefan Scherer committed
156
    "vhv_enable": "true",
Stefan Scherer's avatar
Stefan Scherer committed
157
    "winrm_timeout": "4h"
158
159
  }
}
160