forked from aws-samples/amazon-eks-custom-amis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amazon-eks-node-windows1809full.json
88 lines (87 loc) · 2.57 KB
/
amazon-eks-node-windows1809full.json
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
{
"variables":{
"aws_region":"us-east-2",
"ami_description":"EKS Kubernetes Worker AMI on Windows 2019 Full image (k8s: {{user `eks_version`}})",
"eks_version":"1.18",
"root_volume_size": "50",
"vpc_id":"",
"subnet_id":"",
"http_proxy": "",
"https_proxy": "",
"no_proxy": "",
"source_ami_owner":"801119661308",
"source_ami_owner_govcloud":"077303321853",
"source_ami_arch":"x86_64",
"source_ami_name":"Windows_Server-2019-English-Full-EKS_Optimized-{{user `eks_version`}}-*",
"target_ami_name": "amazon-eks-node-{{user `eks_version`}}-windows1809full-{{ timestamp }}"
},
"builders":[
{
"type":"amazon-ebs",
"region":"{{user `aws_region`}}",
"source_ami_filter":{
"filters":{
"name":"{{user `source_ami_name`}}",
"root-device-type":"ebs",
"state":"available",
"virtualization-type":"hvm",
"architecture":"{{user `source_ami_arch`}}"
},
"owners":[
"{{user `source_ami_owner`}}",
"{{user `source_ami_owner_govcloud`}}"
],
"most_recent":true
},
"instance_type":"m5.large",
"user_data_file":"./scripts/windows/UserData.ps1",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_insecure": true,
"winrm_use_ssl": true,
"subnet_id": "{{user `subnet_id`}}",
"launch_block_device_mappings":[
{
"device_name": "/dev/sda1",
"volume_size": "{{user `root_volume_size`}}",
"volume_type": "gp2",
"delete_on_termination":true
}
],
"tags":{
"Name":"{{user `target_ami_name`}}",
"BuildDate":"{{ isotime }}"
},
"ami_name":"{{user `target_ami_name`}}",
"ami_description":"{{user `ami_description` }}",
"ami_virtualization_type":"hvm",
"run_tags":{
"Name":"packer-{{user `target_ami_name`}}"
}
}
],
"provisioners":[
{
"type": "powershell",
"scripts": [
"./scripts/windows/DisableUAC.ps1",
"./scripts/windows/UpdateWindows.ps1",
"./scripts/windows/UpdateDocker.ps1"
],
"elevated_user": "Administrator",
"elevated_password": "{{ build `Password`}}"
},
{
"type": "windows-restart",
"restart_check_command": "powershell -command \"& {Write-Output 'restarted.'}\""
},
{
"type": "powershell",
"scripts": [
"./scripts/windows/Cleanup.ps1"
],
"elevated_user": "Administrator",
"elevated_password": "{{ build `Password`}}"
}
]
}