-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-u18.json
35 lines (35 loc) · 1.03 KB
/
aws-u18.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
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_region": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"source_ami": "ami-003634241a8fcdec0",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "cio-{{user `build`}}-u18",
"ami_block_device_mappings":[{
"device_name":"/dev/sda1",
"volume_size":30}]
}
],
"provisioners": [{
"type": "shell",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"inline": [
"sleep 30",
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers",
"sudo wget ftp://download.storidge.com/pub/ce/u18/cio-{{user `build`}}-u18-ce.amd64.txz",
"sudo tar xvf cio-{{user `build`}}-u18-ee.amd64.txz",
"sudo -i",
"cd /home/ubuntu/cio-{{user `build`}}-u18.amd64",
"./install",
"sed -ie '$d' /etc/sudoers"
]
}]
}