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
|
{
"builders": [
{
"name": "development",
"type": "docker",
"image": "fedora:20",
"commit": true,
"run_command": ["-d", "-i", "-t", "{{.Image}}", "/bin/sh"]
},
{
"name": "production",
"type": "openstack",
"image_name": "database-mariadb",
"flavor": "f0577618-9125-4948-b450-474e225bbc4c",
"source_image": "742e0414-c985-4994-b307-4aafade942b3",
"networks": ["d079fa3e-2558-4bcb-ad5a-279040c202b5"],
"floating_ip": "85.199.252.164",
"use_floating_ip": true,
"ssh_username": "fedora"
}
],
"provisioners": [
{
"type": "shell",
"inline": [ "sudo yum install -y ansible"]
},
{
"type": "ansible-local",
"playbook_file": "database/image-config.yml",
"command": "sudo ansible-playbook"
},
{
"type": "shell",
"inline": [
"sudo yum install -y libselinux-python",
"sudo ansible localhost -m selinux -a state=disabled",
"sudo setenforce 0",
],
"only": ["production"]
},
{
"type": "shell",
"inline": [ "sync; sync; sleep 10; sync" ],
"only": ["production"]
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "baserock/database",
"tag": "latest",
"only": ["development"]
}
]
]
}
|