bigrig 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99b5f00bb1d9aaed030eb08d2fb4bc79e7dcdc3b
4
- data.tar.gz: 988da417c88855fe554b87c35df7356baeda0165
3
+ metadata.gz: 681ac8a51eebdb90849b5e4d444583f4b651119d
4
+ data.tar.gz: d25ebc45f4af29b468231985847e7c1d295348e2
5
5
  SHA512:
6
- metadata.gz: 4fe24f80563124bb78aa7e3480a22ba901598ceef6b56567b601ed5ca8f1f4d62115cbf70381614decdf84237ce62987537399d56caba171f57cee7cd8bbb90f
7
- data.tar.gz: 8ea9d97e635b3efd6ab682184afe7b82692de5abf5398070eed4dc0a7b64102069d36085c35113d7f6b1ea89550816f2f477b19f5acdc5a430a64954515c952b
6
+ metadata.gz: cf7d8a8ad5b9735817c8e2ef4a535a1928afd7314e890693ffc4c883cb9059acf9d83fa510bac8a46b947776e90622ab9cd4e291964be6327a7c5628e4453976
7
+ data.tar.gz: 5a6699fd7aa8df839185dcd9f2177c22fcbb6ce349042cb60df644b5167367ce5383384f67ab858246fbc885e226c0f05273e142284d3c1af8a2ae0be2a2b3d8
data/CHANGELOG.md CHANGED
@@ -17,3 +17,7 @@ Add -c flag to cleanup after ship
17
17
  0.0.7
18
18
  =====
19
19
  Add profiles to most commands
20
+
21
+ 0.1.0
22
+ =====
23
+ Add `volumes` attriute
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bigrig (0.0.7)
4
+ bigrig (0.1.0)
5
5
  colorize (= 0.7.5)
6
6
  docker-api (= 1.20.0)
7
7
  gli (= 2.12.2)
@@ -84,7 +84,8 @@ module Bigrig
84
84
  'Links' => args[:links],
85
85
  'ExtraHosts' => hosts(args[:hosts]),
86
86
  'PortBindings' => port_bindings(args[:ports]),
87
- 'VolumesFrom' => args[:volumes_from]
87
+ 'VolumesFrom' => args[:volumes_from],
88
+ 'Binds' => args[:volumes]
88
89
  )
89
90
  container.id
90
91
  end
@@ -1,15 +1,13 @@
1
1
  module Bigrig
2
2
  class Container < BaseModel
3
- attr_accessor :env, :name, :path, :ports, :tag, :volumes_from, :links, :hosts, :repo
3
+ attr_accessor :env, :name, :path, :ports, :tag, :volumes_from, :links, :hosts, :repo, :volumes
4
4
 
5
5
  class << self
6
6
  def from_json(name, json)
7
7
  opts = [:env, :path, :ports, :tag, :repo].each_with_object(name: name) do |e, o|
8
8
  o[e] = json.send :[], e.to_s
9
9
  end
10
- opts[:volumes_from] = as_array json['volumes_from']
11
- opts[:links] = as_array json['links']
12
- opts[:hosts] = as_array json['hosts']
10
+ [:volumes_from, :links, :hosts, :volumes].each { |x| opts[x] = as_array json[x.to_s] }
13
11
 
14
12
  Container.new opts
15
13
  end
@@ -25,6 +23,7 @@ module Bigrig
25
23
  super
26
24
  @env ||= {}
27
25
  @ports ||= []
26
+ @volumes ||= []
28
27
  @volumes_from ||= []
29
28
  @links ||= []
30
29
  @hosts ||= []
data/lib/bigrig/runner.rb CHANGED
@@ -43,6 +43,7 @@ module Bigrig
43
43
  name: container.name,
44
44
  ports: container.ports,
45
45
  volumes_from: container.volumes_from,
46
+ volumes: container.volumes,
46
47
  links: container.links,
47
48
  hosts: container.hosts }
48
49
  end
@@ -1,3 +1,3 @@
1
1
  module Bigrig
2
- VERSION = '0.0.7'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -143,8 +143,28 @@ module Bigrig
143
143
  end
144
144
  end
145
145
 
146
- context 'given a file with volumes_from' do
146
+ context 'given a file with volumes' do
147
147
  let(:file) { 'volumes.json' }
148
+ let(:container) { Docker::Container.get 'volumes' }
149
+ let(:volumes) { container.json['HostConfig']['Binds'] }
150
+ let(:perform) { subject }
151
+
152
+ after do
153
+ begin
154
+ c1 = Docker::Container.get 'volumes'
155
+ c1.kill.delete
156
+ rescue Docker::Error::NotFoundError # rubocop:disable Lint/HandleExceptions
157
+ end
158
+ end
159
+
160
+ it 'should pass volumes to the right container', :vcr do
161
+ perform
162
+ expect(volumes).to eq ['/tmp/test:/test']
163
+ end
164
+ end
165
+
166
+ context 'given a file with volumes_from' do
167
+ let(:file) { 'volumes_from.json' }
148
168
  let(:container) { Docker::Container.get 'mounts_volumes' }
149
169
  let(:volumes_from) { container.json['HostConfig']['VolumesFrom'] }
150
170
  let(:perform) { subject }
@@ -254,8 +274,11 @@ module Bigrig
254
274
  let(:active_profiles) { ['notreallyathing'] }
255
275
 
256
276
  after do
257
- container = Docker::Container.get 'profiles'
258
- container.delete force: true
277
+ begin
278
+ container = Docker::Container.get 'profiles'
279
+ container.delete force: true
280
+ rescue Docker::Error::NotFoundError # rubocop:disable Lint/HandleExceptions
281
+ end
259
282
  end
260
283
 
261
284
  it 'ignores the missing profile', :vcr do
@@ -16,6 +16,16 @@ module Bigrig
16
16
  it { is_expected.to respond_to :tag= }
17
17
  it { is_expected.to respond_to :volumes_from }
18
18
  it { is_expected.to respond_to :volumes_from= }
19
+ it { is_expected.to respond_to :volumes }
20
+ it { is_expected.to respond_to :volumes= }
21
+
22
+ it 'accepts volumes as an array' do
23
+ expect(Container.from_json(nil, 'volumes' => ['test']).volumes).to be_kind_of Array
24
+ end
25
+
26
+ it 'wraps a single volumes in an array' do
27
+ expect(Container.from_json(nil, 'volumes' => 'test').volumes).to be_kind_of Array
28
+ end
19
29
 
20
30
  it 'accepts volumes_from as an array' do
21
31
  expect(Container.from_json(nil, 'volumes_from' => ['test']).volumes_from).to be_kind_of Array
@@ -68,6 +78,9 @@ module Bigrig
68
78
  its(:volumes_from) { is_expected.to be_empty }
69
79
  its(:volumes_from) { is_expected.to be_a Array }
70
80
 
81
+ its(:volumes) { is_expected.to be_empty }
82
+ its(:volumes) { is_expected.to be_a Array }
83
+
71
84
  its(:ports) { is_expected.to be_a Array }
72
85
  its(:ports) { is_expected.to be_empty }
73
86
 
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "containers": {
3
- "exports_volumes": {
4
- "repo": "hawknewton/show-env",
5
- "tag": "0.0.1"
6
- },
7
- "mounts_volumes": {
3
+ "volumes": {
8
4
  "repo": "hawknewton/show-env",
9
5
  "tag": "0.0.1",
10
- "volumes_from": "exports_volumes"
6
+ "volumes": "/tmp/test:/test"
11
7
  }
12
8
  }
13
9
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "containers": {
3
+ "exports_volumes": {
4
+ "repo": "hawknewton/show-env",
5
+ "tag": "0.0.1"
6
+ },
7
+ "mounts_volumes": {
8
+ "repo": "hawknewton/show-env",
9
+ "tag": "0.0.1",
10
+ "volumes_from": "exports_volumes"
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,430 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: "<DOCKER_HOST>/v1.16/images/hawknewton/show-env:0.0.1/json"
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Swipely/Docker-API 1.20.0
12
+ Content-Type:
13
+ - text/plain
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ Content-Type:
20
+ - application/json
21
+ Date:
22
+ - Tue, 31 Mar 2015 20:20:49 GMT
23
+ Content-Length:
24
+ - '1859'
25
+ body:
26
+ encoding: UTF-8
27
+ string: |
28
+ {"Architecture":"amd64","Author":"","Comment":"","Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/bin/sh","-c","ruby /code/server.rb"],"Env":["PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","RUBY_MAJOR=2.1","RUBY_VERSION=2.1.3","GEM_HOME=/usr/local/bundle","BUNDLE_APP_CONFIG=/usr/local/bundle"],"ExposedPorts":{"80/tcp":{}},"Hostname":"e5474231b7cd","Image":"4929b61a5fda27a07a26efc94ad61504c0f4aa2fb50471bfa4fd61c656d42131","MacAddress":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":[],"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Container":"d6d34d2bfd452f4175eab78597ddd29856f0af494d503b00f4160d5eb3f13f1b","ContainerConfig":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/bin/sh","-c","#(nop) ENTRYPOINT [/bin/sh -c ruby /code/server.rb]"],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/bin/sh","-c","ruby /code/server.rb"],"Env":["PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","RUBY_MAJOR=2.1","RUBY_VERSION=2.1.3","GEM_HOME=/usr/local/bundle","BUNDLE_APP_CONFIG=/usr/local/bundle"],"ExposedPorts":{"80/tcp":{}},"Hostname":"e5474231b7cd","Image":"4929b61a5fda27a07a26efc94ad61504c0f4aa2fb50471bfa4fd61c656d42131","MacAddress":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":[],"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Created":"2014-10-23T20:00:42.057514693Z","DockerVersion":"1.3.0","Id":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","Os":"linux","Parent":"4929b61a5fda27a07a26efc94ad61504c0f4aa2fb50471bfa4fd61c656d42131","Size":0,"VirtualSize":801041825}
29
+ http_version:
30
+ recorded_at: Tue, 31 Mar 2015 20:20:48 GMT
31
+ - request:
32
+ method: get
33
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ''
37
+ headers:
38
+ User-Agent:
39
+ - Swipely/Docker-API 1.20.0
40
+ Content-Type:
41
+ - text/plain
42
+ response:
43
+ status:
44
+ code: 404
45
+ message:
46
+ headers:
47
+ Content-Type:
48
+ - text/plain; charset=utf-8
49
+ Date:
50
+ - Tue, 31 Mar 2015 20:20:49 GMT
51
+ Content-Length:
52
+ - '27'
53
+ body:
54
+ encoding: UTF-8
55
+ string: |
56
+ No such container: volumes
57
+ http_version:
58
+ recorded_at: Tue, 31 Mar 2015 20:20:48 GMT
59
+ - request:
60
+ method: get
61
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
62
+ body:
63
+ encoding: US-ASCII
64
+ string: ''
65
+ headers:
66
+ User-Agent:
67
+ - Swipely/Docker-API 1.20.0
68
+ Content-Type:
69
+ - text/plain
70
+ response:
71
+ status:
72
+ code: 404
73
+ message:
74
+ headers:
75
+ Content-Type:
76
+ - text/plain; charset=utf-8
77
+ Date:
78
+ - Tue, 31 Mar 2015 20:20:49 GMT
79
+ Content-Length:
80
+ - '27'
81
+ body:
82
+ encoding: UTF-8
83
+ string: |
84
+ No such container: volumes
85
+ http_version:
86
+ recorded_at: Tue, 31 Mar 2015 20:20:48 GMT
87
+ - request:
88
+ method: get
89
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ User-Agent:
95
+ - Swipely/Docker-API 1.20.0
96
+ Content-Type:
97
+ - text/plain
98
+ response:
99
+ status:
100
+ code: 404
101
+ message:
102
+ headers:
103
+ Content-Type:
104
+ - text/plain; charset=utf-8
105
+ Date:
106
+ - Tue, 31 Mar 2015 20:20:49 GMT
107
+ Content-Length:
108
+ - '27'
109
+ body:
110
+ encoding: UTF-8
111
+ string: |
112
+ No such container: volumes
113
+ http_version:
114
+ recorded_at: Tue, 31 Mar 2015 20:20:48 GMT
115
+ - request:
116
+ method: get
117
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
118
+ body:
119
+ encoding: US-ASCII
120
+ string: ''
121
+ headers:
122
+ User-Agent:
123
+ - Swipely/Docker-API 1.20.0
124
+ Content-Type:
125
+ - text/plain
126
+ response:
127
+ status:
128
+ code: 404
129
+ message:
130
+ headers:
131
+ Content-Type:
132
+ - text/plain; charset=utf-8
133
+ Date:
134
+ - Tue, 31 Mar 2015 20:20:49 GMT
135
+ Content-Length:
136
+ - '27'
137
+ body:
138
+ encoding: UTF-8
139
+ string: |
140
+ No such container: volumes
141
+ http_version:
142
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
143
+ - request:
144
+ method: get
145
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
146
+ body:
147
+ encoding: US-ASCII
148
+ string: ''
149
+ headers:
150
+ User-Agent:
151
+ - Swipely/Docker-API 1.20.0
152
+ Content-Type:
153
+ - text/plain
154
+ response:
155
+ status:
156
+ code: 404
157
+ message:
158
+ headers:
159
+ Content-Type:
160
+ - text/plain; charset=utf-8
161
+ Date:
162
+ - Tue, 31 Mar 2015 20:20:49 GMT
163
+ Content-Length:
164
+ - '27'
165
+ body:
166
+ encoding: UTF-8
167
+ string: |
168
+ No such container: volumes
169
+ http_version:
170
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
171
+ - request:
172
+ method: get
173
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
174
+ body:
175
+ encoding: US-ASCII
176
+ string: ''
177
+ headers:
178
+ User-Agent:
179
+ - Swipely/Docker-API 1.20.0
180
+ Content-Type:
181
+ - text/plain
182
+ response:
183
+ status:
184
+ code: 404
185
+ message:
186
+ headers:
187
+ Content-Type:
188
+ - text/plain; charset=utf-8
189
+ Date:
190
+ - Tue, 31 Mar 2015 20:20:49 GMT
191
+ Content-Length:
192
+ - '27'
193
+ body:
194
+ encoding: UTF-8
195
+ string: |
196
+ No such container: volumes
197
+ http_version:
198
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
199
+ - request:
200
+ method: get
201
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
202
+ body:
203
+ encoding: US-ASCII
204
+ string: ''
205
+ headers:
206
+ User-Agent:
207
+ - Swipely/Docker-API 1.20.0
208
+ Content-Type:
209
+ - text/plain
210
+ response:
211
+ status:
212
+ code: 404
213
+ message:
214
+ headers:
215
+ Content-Type:
216
+ - text/plain; charset=utf-8
217
+ Date:
218
+ - Tue, 31 Mar 2015 20:20:49 GMT
219
+ Content-Length:
220
+ - '27'
221
+ body:
222
+ encoding: UTF-8
223
+ string: |
224
+ No such container: volumes
225
+ http_version:
226
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
227
+ - request:
228
+ method: get
229
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
230
+ body:
231
+ encoding: US-ASCII
232
+ string: ''
233
+ headers:
234
+ User-Agent:
235
+ - Swipely/Docker-API 1.20.0
236
+ Content-Type:
237
+ - text/plain
238
+ response:
239
+ status:
240
+ code: 404
241
+ message:
242
+ headers:
243
+ Content-Type:
244
+ - text/plain; charset=utf-8
245
+ Date:
246
+ - Tue, 31 Mar 2015 20:20:49 GMT
247
+ Content-Length:
248
+ - '27'
249
+ body:
250
+ encoding: UTF-8
251
+ string: |
252
+ No such container: volumes
253
+ http_version:
254
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
255
+ - request:
256
+ method: post
257
+ uri: "<DOCKER_HOST>/v1.16/containers/create?name=volumes"
258
+ body:
259
+ encoding: UTF-8
260
+ string: '{"Env":[],"Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","ExposedPorts":{}}'
261
+ headers:
262
+ User-Agent:
263
+ - Swipely/Docker-API 1.20.0
264
+ Content-Type:
265
+ - application/json
266
+ response:
267
+ status:
268
+ code: 201
269
+ message:
270
+ headers:
271
+ Content-Type:
272
+ - application/json
273
+ Date:
274
+ - Tue, 31 Mar 2015 20:20:49 GMT
275
+ Content-Length:
276
+ - '90'
277
+ body:
278
+ encoding: UTF-8
279
+ string: |
280
+ {"Id":"e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8","Warnings":null}
281
+ http_version:
282
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
283
+ - request:
284
+ method: post
285
+ uri: "<DOCKER_HOST>/v1.16/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/start"
286
+ body:
287
+ encoding: UTF-8
288
+ string: '{"Links":[],"ExtraHosts":[],"PortBindings":{},"VolumesFrom":[],"Binds":["/tmp/test:/test"]}'
289
+ headers:
290
+ User-Agent:
291
+ - Swipely/Docker-API 1.20.0
292
+ Content-Type:
293
+ - application/json
294
+ response:
295
+ status:
296
+ code: 204
297
+ message:
298
+ headers:
299
+ Date:
300
+ - Tue, 31 Mar 2015 20:20:49 GMT
301
+ body:
302
+ encoding: UTF-8
303
+ string: ''
304
+ http_version:
305
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
306
+ - request:
307
+ method: get
308
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
309
+ body:
310
+ encoding: US-ASCII
311
+ string: ''
312
+ headers:
313
+ User-Agent:
314
+ - Swipely/Docker-API 1.20.0
315
+ Content-Type:
316
+ - text/plain
317
+ response:
318
+ status:
319
+ code: 200
320
+ message:
321
+ headers:
322
+ Content-Type:
323
+ - application/json
324
+ Date:
325
+ - Tue, 31 Mar 2015 20:20:49 GMT
326
+ body:
327
+ encoding: UTF-8
328
+ string: |
329
+ {"AppArmorProfile":"","Args":["-c","ruby /code/server.rb"],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/bin/sh","-c","ruby /code/server.rb"],"Env":["PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","RUBY_MAJOR=2.1","RUBY_VERSION=2.1.3","GEM_HOME=/usr/local/bundle","BUNDLE_APP_CONFIG=/usr/local/bundle"],"ExposedPorts":{"80/tcp":{}},"Hostname":"e724885676e7","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MacAddress":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Created":"2015-03-31T20:20:49.429686833Z","Driver":"aufs","ExecDriver":"native-0.2","ExecIDs":null,"HostConfig":{"Binds":["/tmp/test:/test"],"CapAdd":null,"CapDrop":null,"ContainerIDFile":"","Devices":null,"Dns":null,"DnsSearch":null,"ExtraHosts":[],"IpcMode":"","Links":null,"LxcConf":null,"NetworkMode":"","PidMode":"","PortBindings":{},"Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":""},"SecurityOpt":null,"VolumesFrom":[]},"HostnamePath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hostname","HostsPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hosts","Id":"e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MountLabel":"","Name":"/volumes","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.176","IPPrefixLen":16,"IPv6Gateway":"","LinkLocalIPv6Address":"fe80::42:acff:fe11:b0","LinkLocalIPv6PrefixLen":64,"MacAddress":"02:42:ac:11:00:b0","PortMapping":null,"Ports":{"80/tcp":null}},"Path":"/bin/sh","ProcessLabel":"","ResolvConfPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/resolv.conf","RestartCount":0,"State":{"Error":"","ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","OOMKilled":false,"Paused":false,"Pid":11117,"Restarting":false,"Running":true,"StartedAt":"2015-03-31T20:20:49.785091726Z"},"Volumes":{"/test":"/mnt/sda1/tmp/test"},"VolumesRW":{"/test":true}}
330
+ http_version:
331
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
332
+ - request:
333
+ method: get
334
+ uri: "<DOCKER_HOST>/v1.16/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/json"
335
+ body:
336
+ encoding: US-ASCII
337
+ string: ''
338
+ headers:
339
+ User-Agent:
340
+ - Swipely/Docker-API 1.20.0
341
+ Content-Type:
342
+ - text/plain
343
+ response:
344
+ status:
345
+ code: 200
346
+ message:
347
+ headers:
348
+ Content-Type:
349
+ - application/json
350
+ Date:
351
+ - Tue, 31 Mar 2015 20:20:49 GMT
352
+ body:
353
+ encoding: UTF-8
354
+ string: |
355
+ {"AppArmorProfile":"","Args":["-c","ruby /code/server.rb"],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/bin/sh","-c","ruby /code/server.rb"],"Env":["PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","RUBY_MAJOR=2.1","RUBY_VERSION=2.1.3","GEM_HOME=/usr/local/bundle","BUNDLE_APP_CONFIG=/usr/local/bundle"],"ExposedPorts":{"80/tcp":{}},"Hostname":"e724885676e7","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MacAddress":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Created":"2015-03-31T20:20:49.429686833Z","Driver":"aufs","ExecDriver":"native-0.2","ExecIDs":null,"HostConfig":{"Binds":["/tmp/test:/test"],"CapAdd":null,"CapDrop":null,"ContainerIDFile":"","Devices":null,"Dns":null,"DnsSearch":null,"ExtraHosts":[],"IpcMode":"","Links":null,"LxcConf":null,"NetworkMode":"","PidMode":"","PortBindings":{},"Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":""},"SecurityOpt":null,"VolumesFrom":[]},"HostnamePath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hostname","HostsPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hosts","Id":"e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MountLabel":"","Name":"/volumes","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.176","IPPrefixLen":16,"IPv6Gateway":"","LinkLocalIPv6Address":"fe80::42:acff:fe11:b0","LinkLocalIPv6PrefixLen":64,"MacAddress":"02:42:ac:11:00:b0","PortMapping":null,"Ports":{"80/tcp":null}},"Path":"/bin/sh","ProcessLabel":"","ResolvConfPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/resolv.conf","RestartCount":0,"State":{"Error":"","ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","OOMKilled":false,"Paused":false,"Pid":11117,"Restarting":false,"Running":true,"StartedAt":"2015-03-31T20:20:49.785091726Z"},"Volumes":{"/test":"/mnt/sda1/tmp/test"},"VolumesRW":{"/test":true}}
356
+ http_version:
357
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
358
+ - request:
359
+ method: get
360
+ uri: "<DOCKER_HOST>/v1.16/containers/volumes/json"
361
+ body:
362
+ encoding: US-ASCII
363
+ string: ''
364
+ headers:
365
+ User-Agent:
366
+ - Swipely/Docker-API 1.20.0
367
+ Content-Type:
368
+ - text/plain
369
+ response:
370
+ status:
371
+ code: 200
372
+ message:
373
+ headers:
374
+ Content-Type:
375
+ - application/json
376
+ Date:
377
+ - Tue, 31 Mar 2015 20:20:49 GMT
378
+ body:
379
+ encoding: UTF-8
380
+ string: |
381
+ {"AppArmorProfile":"","Args":["-c","ruby /code/server.rb"],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/bin/sh","-c","ruby /code/server.rb"],"Env":["PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","RUBY_MAJOR=2.1","RUBY_VERSION=2.1.3","GEM_HOME=/usr/local/bundle","BUNDLE_APP_CONFIG=/usr/local/bundle"],"ExposedPorts":{"80/tcp":{}},"Hostname":"e724885676e7","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MacAddress":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Created":"2015-03-31T20:20:49.429686833Z","Driver":"aufs","ExecDriver":"native-0.2","ExecIDs":null,"HostConfig":{"Binds":["/tmp/test:/test"],"CapAdd":null,"CapDrop":null,"ContainerIDFile":"","Devices":null,"Dns":null,"DnsSearch":null,"ExtraHosts":[],"IpcMode":"","Links":null,"LxcConf":null,"NetworkMode":"","PidMode":"","PortBindings":{},"Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":""},"SecurityOpt":null,"VolumesFrom":[]},"HostnamePath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hostname","HostsPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/hosts","Id":"e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8","Image":"b9c5be3a918d80b0d898ed8eca3fc76f75c482b531238e539cb00f75bb4e12d2","MountLabel":"","Name":"/volumes","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.176","IPPrefixLen":16,"IPv6Gateway":"","LinkLocalIPv6Address":"fe80::42:acff:fe11:b0","LinkLocalIPv6PrefixLen":64,"MacAddress":"02:42:ac:11:00:b0","PortMapping":null,"Ports":{"80/tcp":null}},"Path":"/bin/sh","ProcessLabel":"","ResolvConfPath":"/mnt/sda1/var/lib/docker/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/resolv.conf","RestartCount":0,"State":{"Error":"","ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","OOMKilled":false,"Paused":false,"Pid":11117,"Restarting":false,"Running":true,"StartedAt":"2015-03-31T20:20:49.785091726Z"},"Volumes":{"/test":"/mnt/sda1/tmp/test"},"VolumesRW":{"/test":true}}
382
+ http_version:
383
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
384
+ - request:
385
+ method: post
386
+ uri: "<DOCKER_HOST>/v1.16/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8/kill"
387
+ body:
388
+ encoding: US-ASCII
389
+ string: ''
390
+ headers:
391
+ User-Agent:
392
+ - Swipely/Docker-API 1.20.0
393
+ Content-Type:
394
+ - text/plain
395
+ response:
396
+ status:
397
+ code: 204
398
+ message:
399
+ headers:
400
+ Date:
401
+ - Tue, 31 Mar 2015 20:20:50 GMT
402
+ body:
403
+ encoding: UTF-8
404
+ string: ''
405
+ http_version:
406
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
407
+ - request:
408
+ method: delete
409
+ uri: "<DOCKER_HOST>/v1.16/containers/e724885676e76be916c830a571f3cdee1ca58898ad8005275bb1cec60c815fb8"
410
+ body:
411
+ encoding: US-ASCII
412
+ string: ''
413
+ headers:
414
+ User-Agent:
415
+ - Swipely/Docker-API 1.20.0
416
+ Content-Type:
417
+ - text/plain
418
+ response:
419
+ status:
420
+ code: 204
421
+ message:
422
+ headers:
423
+ Date:
424
+ - Tue, 31 Mar 2015 20:20:50 GMT
425
+ body:
426
+ encoding: UTF-8
427
+ string: ''
428
+ http_version:
429
+ recorded_at: Tue, 31 Mar 2015 20:20:49 GMT
430
+ recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigrig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Your Name Here
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -231,6 +231,7 @@ files:
231
231
  - spec/data/tagandpath.json
232
232
  - spec/data/tiny-image.tar
233
233
  - spec/data/volumes.json
234
+ - spec/data/volumes_from.json
234
235
  - spec/spec_helper.rb
235
236
  - spec/support/bigrig_vcr
236
237
  - spec/support/vcr.rb
@@ -271,6 +272,7 @@ files:
271
272
  - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_multiple_containers/spins_up_multiple_containers.yml
272
273
  - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/should_spin_up_a_single_container.yml
273
274
  - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/when_a_dead_container_exists/should_remove_existing_containers.yml
275
+ - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes/should_pass_volumes_to_the_right_container.yml
274
276
  - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/should_pass_volumes_from_to_the_right_container.yml
275
277
  - spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/starts_the_dependant_container_last.yml
276
278
  - spec/vcr/Bigrig_RunAction/_perform/when_activating_profiles_that_do_not_exist/ignores_the_missing_profile.yml