-
Notifications
You must be signed in to change notification settings - Fork 3
/
ubuntu-desktop.json
57 lines (57 loc) · 1.82 KB
/
ubuntu-desktop.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
{
"variables": {
"build_name": "desktop",
"base_box": "ubuntu/ubuntu.ovf",
"aws_source_ami": "ami-889260e0",
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"aws_account_id": "884882099534",
"aws_region": "us-east-1",
"aws_instance_type": "g2.2xlarge",
"aws_s3_bucket": "devops.cloudspace.com",
"aws_security_group": "default",
"username": "vagrant",
"password": "vagrant"
},
"provisioners": [{
"type": "shell",
"scripts": [
"packer-shell-scripts/desktop.sh"
],
"pause_before": "4s"
}],
"builders": [{
"name": "aws",
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"source_ami": "{{user `aws_source_ami`}}",
"instance_type": "{{user `aws_instance_type`}}",
"ssh_username": "ubuntu",
"ami_name": "{{user `build_name`}}-{{timestamp}}",
"ami_groups": ["all"],
"security_group_id": "{{user `aws_security_group`}}",
"tags": {
"Name": "packer",
"Name": "{{user `build_name`}}"
},
"user_data": ""
},{
"name": "virtualbox",
"type": "virtualbox-ovf",
"vm_name": "{{user `build_name`}}",
"source_path": "./builds/{{user `base_box`}}",
"output_directory": "./builds/{{user `build_name`}}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "20m",
"shutdown_command": "sudo shutdown -P now"
}],
"post-processors": [{
"output": "./builds/{{user `build_name`}}/{{user `build_name`}}.box",
"type": "vagrant",
"keep_input_artifact": true,
"only": ["virtualbox"]
}]
}