open-nomad/e2e/terraform/packer/packer-windows.json

70 lines
1.8 KiB
JSON
Raw Normal View History

{
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "Windows_Server-2016-English-Full-Base-*",
"root-device-type": "ebs"
},
"owners": [
"amazon"
],
"most_recent": true
},
"instance_type": "t2.medium",
"ami_name": "nomad-e2e-windows-2016-{{timestamp}}",
"ami_groups": [
"all"
],
"communicator": "winrm",
"user_data_file": "windows/setupwinrm.ps1",
"winrm_username": "Administrator",
"winrm_insecure": true,
"winrm_use_ssl": true,
"tags": {
"OS": "Windows2016"
}
}
],
"provisioners": [
{
"type": "powershell",
"elevated_user": "Administrator",
"elevated_password": "{{.WinRMPassword}}",
"scripts": [
"windows/disable-windows-updates.ps1",
"windows/fix-tls.ps1",
"windows/install-nuget.ps1",
"windows/install-tools.ps1",
"windows/install-docker.ps1",
"windows/setup-directories.ps1",
"windows/install-openssh.ps1"
]
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"elevated_user": "Administrator",
"elevated_password": "{{.WinRMPassword}}",
"scripts": [
"windows/install-consul.ps1",
"windows/install-vault.ps1",
"windows/install-nomad.ps1"
]
},
{
"type": "powershell",
"inline": [
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SendWindowsIsReady.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown"
]
}
]
}