-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
47 lines (47 loc) · 1.72 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
{
"builders": [
{
"type": "openstack",
"identity_endpoint": "https://api.entercloudsuite.com/v2.0",
"tenant_name": "{{user `tenant`}}",
"username": "{{user `username`}}",
"password": "{{user `password`}}",
"region": "{{user `region`}}",
"image_name": "{{user `image_name`}}",
"instance_name": "{{user `instance_name`}}",
"source_image": "{{user `source_image`}}",
"ssh_username": "ubuntu",
"flavor": "{{user `flavor`}}",
"networks": [ "{{user `network`}}" ],
"floating_ip_pool": "PublicNetwork"
}
],
"provisioners": [
{
"type": "shell",
"inline_shebang": "/bin/bash -e",
"inline": [
"until [[ -f /var/lib/cloud/instance/boot-finished ]]; do sleep 1; done",
"sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y python2.7 python && sudo apt-get clean"
]
},
{
"type": "ansible",
"playbook_file": "./molecule/default/playbook.yml",
"ansible_env_vars": [
"ANSIBLE_BECOME=True", "ANSIBLE_BECOME_METHOD=sudo", "ANSIBLE_BECOME_USER=root", "ANSIBLE_ROLES_PATH=:/home/travis/build/entercloudsuite/", "ANSIBLE_HOST_KEY_CHECKING=False", "ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s'", "ANSIBLE_NOCOLOR=True"
]
}
],
"variables": {
"source_image": "6a1e4c2b-d663-492a-a828-205f4b28d9e0",
"image_name": "mysql-{{env `TRAVIS_BRANCH`}}-{{env `TRAVIS_BUILD_NUMBER`}}",
"instance_name": "mysql",
"flavor": "e3standard.x4",
"region": "nl-ams1",
"tenant": "{{env `OS_TENANT`}}",
"username": "{{env `OS_USERNAME`}}",
"password": "{{env `OS_PASSWORD`}}",
"network": "{{env `OS_NETWORK`}}"
}
}