forked from gvlproject/gvl.ansible.playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
118 lines (116 loc) · 3.4 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"vnc_pwd": "{{env `CM_VNC_PWD`}}",
"gftp_pwd": "{{env `CM_GALAXY_FTP_PWD`}}",
"image_name": "GVL 4.1.0 Image {{timestamp}}",
"source_ami": "ami-6c14310f",
"instance_type": "m3.large",
"os_source_image": "c8663e68-921c-4e0a-9048-d9e042a4b41f",
"os_flavor": "1"
},
"builders": [
{
"type": "openstack",
"openstack_provider": "Compute Service",
"region": "Melbourne",
"ssh_username": "ubuntu",
"source_image": "{{user `os_source_image`}}",
"flavor": "{{user `os_flavor`}}",
"image_name": "{{user `image_name`}}",
"security_groups": [ "default" ]
},
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "ap-southeast-2",
"ssh_username": "ubuntu",
"ami_virtualization_type": "hvm",
"ami_description": "{{user `image_name`}}",
"ami_groups": [ "all" ],
"ami_regions": [ "us-east-1" ],
"source_ami": "{{user `source_ami`}}",
"instance_type": "{{user `instance_type`}}",
"ami_name": "{{user `image_name`}}",
"ami_block_device_mappings": [ {
"device_name": "/dev/sda1",
"volume_size": 20,
"delete_on_termination": true
} ],
"launch_block_device_mappings": [ {
"device_name": "/dev/sda1",
"volume_size": 20,
"delete_on_termination": true
} ]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30",
"sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7",
"sudo apt-get update",
"sudo apt-get install -y libffi-dev libssl-dev",
"sudo apt-get -y upgrade",
"sudo apt-get install -y python2.7 python-pip python-dev build-essential",
"sudo pip install --upgrade ansible"
]
},
{
"type": "ansible-local",
"playbook_file": "playbook.yml",
"inventory_groups" : "gvl-image-hosts,gvl-filesystem-hosts",
"role_paths": [
"roles/galaxyprojectdotorg.cloudman-image",
"roles/galaxyprojectdotorg.cloudman-database",
"roles/galaxyprojectdotorg.cloudman-galaxy-setup",
"roles/galaxyprojectdotorg.galaxy-os",
"roles/galaxyprojectdotorg.galaxy",
"roles/galaxyprojectdotorg.galaxy-tools",
"roles/galaxyprojectdotorg.trackster",
"roles/smola.java",
"roles/gvl.ansible.image",
"roles/gvl.ansible.filesystem.presetup",
"roles/gvl.ansible.filesystem",
"roles/microgvl.ansible.filesystem"
],
"extra_arguments": [
"--extra-vars",
"vnc_password='{{user `vnc_pwd`}}'",
"--extra-vars",
"psql_galaxyftp_password='{{user `gftp_pwd`}}'",
"--tags",
"gvl-image",
"--extra-vars",
"cleanup=no"
]
},
{
"type": "ansible-local",
"playbook_file": "playbook.yml",
"inventory_groups" : "gvl-image-hosts,gvl-filesystem-hosts",
"extra_arguments": [
"--extra-vars",
"psql_galaxyftp_password='{{user `gftp_pwd`}}'",
"--tags",
"gvl-fs"
]
},
{
"type": "ansible-local",
"playbook_file": "playbook.yml",
"inventory_groups" : "gvl-image-hosts,gvl-filesystem-hosts",
"extra_arguments": [
"--extra-vars",
"psql_galaxyftp_password='{{user `gftp_pwd`}}'",
"--tags",
"gvl-image",
"--extra-vars",
"only_cleanup=yes"
]
}
]
}