-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudify-packer.json
76 lines (76 loc) · 2.17 KB
/
cloudify-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [
{
"type": "virtualbox-ovf",
"source_path": "/home/nir0s/.vagrant.d/boxes/precise64/0/virtualbox/box.ovf",
"vm_name": "cloudify",
"ssh_username": "vagrant",
"ssh_key_path": "insecure_private_key",
"ssh_wait_timeout": "3m",
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"],
["modifyvm", "{{.Name}}", "--natdnshostresolver1", "on"]
]
},
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
"ssh_private_key_file": "/home/nir0s/.ssh/aws/vagrant_build.pem",
"source_ami": "ami-07ed3a70",
"instance_type": "m3.medium",
"ssh_username": "ubuntu",
"ami_name": "cloudify {{timestamp}}"
}
],
"provisioners": [
{
"type": "shell",
"only": ["virtualbox-ovf"],
"inline": ["mkdir -p /home/vagrant/.ssh/"]
},
{
"type": "shell",
"only": ["amazon-ebs"],
"inline": ["mkdir -p /home/ubuntu/.ssh/"]
},
{
"type": "file",
"only": ["virtualbox-ovf"],
"source": "insecure_private_key",
"destination": "/home/vagrant/.ssh/cloudify_private_key"
},
{
"type": "file",
"only": ["amazon-ebs"],
"source": "/home/nir0s/.ssh/aws/vagrant_build.pem",
"destination": "/home/ubuntu/.ssh/cloudify_private_key.pem"
},
{
"type": "shell",
"script": "vagrant/provision.sh",
"environment_vars": [
"COMPONENTS_PACKAGE_URL={{ components_package_url }}",
"CORE_PACKAGE_URL={{ core_package_url }}",
"UI_PACKAGE_URL={{ ui_package_url }}",
"UBUNTU_AGENT_URL={{ ubuntu_agent_url }}",
"CENTOS_AGENT_URL={{ centos_agent_url }}",
"WINDOWS_AGENT_URL={{ windows_agent_url }}"
]
}
],
"post-processors": [
{
"type": "vagrant",
"compression_level": 9,
"output": "cloudify_{{ release }}_{{.Provider}}.box"
}
]
}