windows_2019_docker_azure.json 3.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
{
  "builders": [
    {
      "boot_wait": "0s",
      "communicator": "winrm",
      "cpu": 2,
      "differencing_disk": false,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
      "floppy_files": [
        "{{user `autounattend`}}",
        "./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/sysprep.bat",
        "./scripts/win-updates.ps1"
      ],
      "generation": 1,
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
      "ram_size": 2048,
      "shutdown_command": "a:/sysprep.bat",
      "skip_compaction": true,
      "skip_export": true,
      "switch_name": "{{user `hyperv_switchname`}}",
      "type": "hyperv-iso",
      "use_fixed_vhd_format": true,
      "vm_name": "WindowsServer2019Docker",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
    }
  ],
  "post-processors": [],
  "provisioners": [
    {
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
        "./scripts/enable-rdp.bat"
      ],
      "type": "windows-shell"
    },
    {
      "scripts": [
        "./scripts/debloat-windows.ps1",
        "./scripts/docker/set-winrm-automatic.ps1"
      ],
      "type": "powershell"
    },
    {
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
    },
    {
      "environment_vars": [
        "docker_images={{user `docker_images`}}",
        "docker_provider={{user `docker_provider`}}",
        "docker_version={{user `docker_version`}}"
      ],
      "scripts": [
        "./scripts/docker/add-docker-group.ps1",
        "./scripts/docker/install-docker.ps1",
        "./scripts/docker/docker-pull.ps1",
        "./scripts/wait-for-tiworker.ps1",
        "./scripts/docker/open-docker-swarm-ports.ps1",
        "./scripts/docker/remove-docker-key-json.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
      ],
      "type": "powershell"
    },
    {
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
        "./scripts/pin-powershell.bat",
        "./scripts/set-winrm-automatic.bat",
        "./scripts/uac-enable.bat",
        "./scripts/compile-dotnet-assemblies.bat",
        "./scripts/dis-updates.bat"
      ],
      "type": "windows-shell"
    },
    {
      "scripts": [
        "./scripts/docker/chocolatey-and-tools.ps1",
        "./scripts/prepare-for-upload-vhd-image.ps1"
      ],
      "type": "powershell"
    }
  ],
  "variables": {
    "autounattend": "./answer_files/2019/Autounattend.xml",
97
    "disk_size": "51200",
98
    "disk_type_id": "1",
Stefan Scherer's avatar
Stefan Scherer committed
99
    "docker_images": "mcr.microsoft.com/nanoserver:sac2019 mcr.microsoft.com/windowsservercore:ltsc2019 mcr.microsoft.com/windows:ltsc2019",
100 101 102 103
    "docker_provider": "ee",
    "docker_version": "18-03-1-ee-3",
    "headless": "false",
    "hyperv_switchname": "{{env `hyperv_switchname`}}",
104
    "iso_checksum": "dbb0ffbab5d114ce7370784c4e24740191fefdb3349917c77a53ff953dd10f72",
105
    "iso_checksum_type": "sha256",
106
    "iso_url": "https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVER_EVAL_x64FRE_en-us.iso",
107 108 109 110 111
    "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver",
    "restart_timeout": "5m",
    "winrm_timeout": "2h"
  }
}