vx-container_connector 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db21fe3331dbe6a729da8bb12dcf87087fd2ceb3
4
- data.tar.gz: 816eda636dc9bdae8a9c361eca41d3ebe4e2a6d4
3
+ metadata.gz: eae10f077e9c1aeef071e6b40291dce6e9fed3b2
4
+ data.tar.gz: 44a40ee38498f36ac01a882ee9f6d2c4f3e28131
5
5
  SHA512:
6
- metadata.gz: d41134848e869821cf8903e929a67c0e91fd474b5c0856191be67f7980ca52a9c41688dc3a5a52b6341025423bfa08c72c6af5c0f92c68628ddb138bffba46be
7
- data.tar.gz: 3fd36596e6c37e51e103564349997f649ef87017bf3c50cb87c9039ce925772fbdda9c7dd100573f44c3970ea8a6686faf59ef6e42f4cb223f2609d727ddfab0
6
+ metadata.gz: ea42fa3c6b221b58628c1f921e37d2b2d474844340a111a5bb3d97d1d12b7cf42011139976a7c9afbba688245d5b026d396169fa351d7039ed95c0e4aa5c42e1
7
+ data.tar.gz: a4305f503bb7d53093bd59125e0393f2c9d472c2a1fef7fed9ad78564dac0b0bbf6a276bc9fbdbc0b4979a7dc04be9450f12d21a57daca5ff91fddf6f5d2c609
@@ -15,15 +15,16 @@ module Vx
15
15
  include ContainerConnector::Retriable
16
16
  include Instrument
17
17
 
18
- attr_reader :user, :password, :init, :image, :remote_dir, :memory
18
+ attr_reader :user, :password, :init, :image, :remote_dir, :memory, :memory_swap
19
19
 
20
20
  def initialize(options = {})
21
- @user = options[:user] || "vexor"
22
- @password = options[:password] || "vexor"
23
- @init = options[:init] || %w{ /sbin/my_init }
24
- @image = options[:image] || "ubuntu"
25
- @remote_dir = options[:remote_dir] || "/home/#{user}"
26
- @memory = options[:memory].to_i || 0
21
+ @user = options[:user] || "vexor"
22
+ @password = options[:password] || "vexor"
23
+ @init = options[:init] || %w{ /sbin/my_init }
24
+ @image = options[:image] || "ubuntu"
25
+ @remote_dir = options[:remote_dir] || "/home/#{user}"
26
+ @memory = options[:memory].to_i
27
+ @memory_swap = options[:memory_swap].to_i
27
28
  end
28
29
 
29
30
  def start(&block)
@@ -34,9 +35,10 @@ module Vx
34
35
 
35
36
  def create_container_options
36
37
  Default.create_container_options.merge(
37
- 'Cmd' => init,
38
- 'Image' => image,
39
- 'Memory' => memory
38
+ 'Cmd' => init,
39
+ 'Image' => image,
40
+ 'Memory' => memory,
41
+ 'MemorySwap' => memory_swap
40
42
  )
41
43
  end
42
44
 
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module ContainerConnector
3
- VERSION = "0.5.5"
3
+ VERSION = "0.5.6"
4
4
  end
5
5
  end
@@ -62,7 +62,7 @@ describe Vx::ContainerConnector::Docker do
62
62
  end
63
63
 
64
64
  it 'should be successfuly with memory limit' do
65
- conn = described_class.new memory: 1024 * 1024 * 10, init: "/bin/sleep 1", image: 'ubuntu'
65
+ conn = described_class.new memory: 1024 * 1024 * 10, memory_swap: 1024 * 1024 * 20, init: "/bin/sleep 1", image: 'ubuntu'
66
66
  rs = nil
67
67
  conn.start do |spawner|
68
68
  rs = spawner.id
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency 'docker-api', '1.12.0'
21
+ spec.add_runtime_dependency 'docker-api', '= 1.15.0'
22
22
  spec.add_runtime_dependency 'vx-common-spawn', '= 0.0.8'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-container_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.12.0
19
+ version: 1.15.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.12.0
26
+ version: 1.15.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: vx-common-spawn
29
29
  requirement: !ruby/object:Gem::Requirement