-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpacker.json
54 lines (54 loc) · 1.35 KB
/
packer.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
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"owner" : "{{env `OWNER`}}"
},
"builders": [{
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"ami_name": "bryan-k3s-server-{{timestamp}}",
"instance_type": "t3.large",
"region": "me-south-1",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20200625",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"ssh_username": "ubuntu",
"type": "amazon-ebs",
"run_tags" : {
"owner" : "{{user `owner`}}",
"type" : "k3s-server"
},
"run_volume_tags" : {
"owner" : "{{user `owner`}}",
"type" : "k3s-server"
}
}],
"provisioners": [{
"type": "file",
"source": "./provision.sh",
"destination": "/home/ubuntu/"
},
{
"type": "shell",
"inline": ["/home/ubuntu/provision.sh"]
},
{
"type": "file",
"source": "/home/ubuntu/token",
"destination": "/output/token",
"direction": "download"
},
{
"type": "file",
"source": "/etc/rancher/k3s/k3s.yaml",
"destination": "/output/k3s.yaml",
"direction": "download"
}]
}