-
Notifications
You must be signed in to change notification settings - Fork 31
/
vagrant_config.json
238 lines (238 loc) · 8.68 KB
/
vagrant_config.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
{
"vagrant": {
"extension_paths": [ // add paths of Vagrantfile-ext.rb files to be loaded
// the path must be relative to the Vagrantfile
"Vagrantfile-ext.rb"
]
},
"vm": {
"hostname": "teracy.dev",
"box": "bento/ubuntu-16.04",
"box_version": "",
"networks": [{ // see: http://docs.vagrantup.com/v2/networking/index.html
"_id": "0",
"mode": "public_network", // one of "forwarded_port", "private_network" or "public_network"
//by default, 192.168.99.100 is used for Boot2Docker
// for convention, use 192.168.99.101 for teracy-dev, 192.168.99.102 for teracy-staging, etc.
//"ip": "" // for private_network, public_network mode
//"type":"dhcp", // for private_network mode; if ip and type are both defined, ip takes precedence
//"auto_config":true, // for private_network mode + ip
"bridge": [
// see: https://github.com/teracyhq/dev/issues/262
// "eth0", //wired LAN, the first priority
// "en0: Wi-Fi (AirPort)", // macOS 10.12
// "en1: Wi-Fi (AirPort)", // macOS 10.11
// "wlan0" // linux
], // for public_network mode
"auto_bridge_default_network": true
}],
"synced_folders":[{ //see: http://docs.vagrantup.com/v2/synced-folders/index.html
"_id": "0",
"type": "virtual_box",
"host": ".",
"guest": "/vagrant"
}, {
"_id": "1",
"type": "rsync",
"host": "./workspace",
"guest": "/home/vagrant/workspace",
"rsync__exclude": [".git", ".idea/", "node_modules/", "bower_components/", ".npm/", ".#*"]
}, { // should persist docker auth token after login success #170
"_id": "2",
"type": "virtual_box",
"host": "./home/.docker",
"guest": "/home/vagrant/.docker",
"mount_options": [
"dmode=775",
"fmode=755"
]
// {
// "type":"virtual_box", // virtual_box, "nfs", "rsync" or "smb", incase smb mount failed,
// // ssh to vm and install cifs-utils allow vm mount smb directory
// // mount.cifs needs to be used with dir_mode file_mode instead of dmode fmode
// // Windows 7 needs powershell 3.0 to create smb share on windows
// // http://www.microsoft.com/en-us/download/details.aspx?id=34595
// "host":"./docker",
// "guest":"/var/lib/docker/",
// "mount_options":[
// "dmode=775",
// "fmode=755"
// ]
// },
//TODO: how to keep and reused existing Docker images after destroying the VM?
// or even attaching the existing data into it, so that developers should share the Docker images
// remove /vagrant default file sync on the VM guest machine #184
}]
// Other configs
// "boot_timeout": 300,
// "box_check_update": true,
// "box_download_checksum": "",
// "box_download_checksum_type": "", // "md5", "sha1", "sha256"
// "box_download_client_cert": "",
// "box_download_ca_cert": "",
// "box_download_ca_path": "",
// "box_download_insecure": true, // true, false
// "communicator": "ssh", // ssh, winrm
// "graceful_halt_timeout": 60,
// "guest": "linux", // linux
// "hostname": "",
// "post_up_message": "",
// "usable_port_range": "2200..2250" // 2200..2250
},
"vb": { //virtualbox settings from https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm
//"gui":true,
//"name":"teracy-dev",
"memory": 1024,
//"cpus":1,
"description": "teracy-dev #{Time.now.getutc.to_i}"
},
"provisioners": [{
"_id": "0",
"version": "13.1.31",
"type": "chef_solo",
"log_level": "info", //one of debug, info, warn, error, fatal. Default: info
"cookbooks_path": [
"vendor-cookbooks",
"main-cookbooks"
],
"roles_path": "roles",
"nodes_path": "nodes",
"data_bags_path": "data_bags",
"run_list": [
"vim",
"teracy-dev"
],
"json": {
// we mix teracy-dev config along with vender-cookbooks config, hopefully this is better than
// separated as we did before, this is for advanded users only
"docker": {
"enabled": true,
"version": "", // use this to install a specific docker version, default: ""
// used along with the version key, this is default for Ubuntu
"package_options": "--force-yes -o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-all'",
"repo": "main", // one of main, test, experimental, default: "main"
"members": ["vagrant"], // to append this member to "docker" group
"action": "create" // one of create, delete. Default: create
},
"docker_registry": {
// set true to force re-login with all the defined entries, default: false (login once)
"force": false,
"entries": []
// example:
// "entries": [
// {
// "host": "https://index.docker.io/v1/",
// "username": "",
// "password": ""
// },
// {
// "host": "registry.gitlab.com",
// "username": "",
// "password": ""
// }
// ]
},
"docker_compose": {
"version": "", // more: https://github.com/docker/compose/releases/
"enabled": true // "docker" must be enabled to get this
},
"docker_machine": {
"enabled": false,
"release": "v0.8.2" // more: https://github.com/docker/machine/releases/
},
"teracy-dev": {
"directories": [{
"_id": "0",
"path": "/home/vagrant/workspace",
"owner": "vagrant",
"group": "vagrant",
"mode": "0775",
"action": "create" // one of create, delete, nothing. Default: create.
// See more: https://docs.chef.io/resource_directory.html
}],
"aliases": [{
"_id": "0",
"name": "ws",
"command": "cd ~/workspace",
"action": "add" // one of add, remove. Default: add.
// See more: https://github.com/customink-webops/magic_shell/blob/master/resources/alias.rb
}, {
"_id": "1",
"name": "ctop", // `$ ctop` for top-like interface for container metrics, see: https://github.com/bcicen/ctop
"command": "docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest",
"action": "add"
},{
"_id": "2",
"name": "http", // `$ http` to make http requests, how to use: https://github.com/teracyhq/httpie-jwt-auth
"command": "docker container run -it --rm --net=host teracy/httpie-jwt-auth:latest-alpine",
"action": "add"
}, {
"_id": "3",
"name": "https", // shortcut for making https requests
"command": "http --default-scheme=https",
"action": "add"
}],
"env_vars": [{
"_id": "0",
"key": "EDITOR",
"value": "vim",
"action": "add" // one of add, remove. Default: add.
// See more: https://github.com/customink-webops/magic_shell/blob/master/resources/environment.rb
}],
"inotify": {
"max_user_watches": 524288 // see: https://github.com/teracyhq/dev/issues/208, set value = 0 to unset this setting
},
"proxy": {
"enabled": true,
"certs": {
"enabled": true,
"sources": ["nginx/certs/default.crt", "nginx/certs/default.key"],
"destination": "/etc/nginx/certs",
"owner": "vagrant",
"group": "vagrant",
"mode": "0644"
},
"container": {
"enabled": false,
"name": "nginx-proxy",
"repo": "jwilder/nginx-proxy",
"tag": "alpine",
"volumes": ["/var/run/docker.sock:/tmp/docker.sock:ro", "/etc/nginx/certs:/etc/nginx/certs"],
"restart_policy": "always",
"port": ["80:80", "443:443"]
}
}
}
}
}],
"plugins": [{
"_id": "0",
"name": "vagrant-gatling-rsync",
"config_key": "gatling",
"required": true,
"enabled": true,
"options": {
// auto rsync watch when up/ reload done
// should try to reduce rsync latency to 0.5s instead of 1s #173
"latency": 0.5, //0.5s
"time_format": "%H:%M:%S",
"rsync_on_startup": true
}
}, {
"_id": "1",
"name": "vagrant-rsync-back",
"required": true,
"enabled": true
}, {
"_id" : "2",
"name" : "vagrant-hostmanager",
"config_key" : "hostmanager",
"required" : true,
"enabled" : true,
"options" : {
"enabled" : true,
"manage_host" : true,
"manage_guest" : true
}
}]
}