docker-armada 2.5.0 → 2.6.0

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: 3a2f5310391f2084d5d296b0b548998ec13af230
4
- data.tar.gz: f44750dbb09b63886daeb448fe839e77ba1b9261
3
+ metadata.gz: 94c071928f455d69d8bd5ea46f533df159dd8686
4
+ data.tar.gz: 2111c88ab451971eb5cb41fb1724369f35a5af6e
5
5
  SHA512:
6
- metadata.gz: 16d255a647af783034fa5723711d94f0465b80b3e0fe0c8e6de6cce4eb480473a0c3649c7a9c4c91b60316e341b264109edcbbd633a19653708a1ced0219ac5a
7
- data.tar.gz: 5cf9fee2ca6bcce102ed9b04c172ec08e59cfc5cce3c441b90a80db0c057f3dfd63e83bd1f097158d3e1f2a8d6d05f2cb5479a15179e802b2b51b1ef8cde22fe
6
+ metadata.gz: f23d9f96684152737244dd7d027104980cd751a86c48dd55b140b59252b35bc31a52993113f8b5e40917de8bdf96f942ee8fddb242ea3ebc21d4177897da9a47
7
+ data.tar.gz: 6acc45b91eb2da738d37cd614944bd6c914a5c228899f6e949a9209cdf95cdf7c745b0965ef57048d4026eb687d829952976be7cffc9fb7c2d84900e58e97d82
data/lib/armada/cli.rb CHANGED
@@ -36,10 +36,11 @@ module Armada
36
36
  subcommand "clean", Armada::CleanCli
37
37
 
38
38
  desc "stop <project> <environment>", "Stop running containers for the project in the environment. Use --force to actually stop the containers"
39
+ option :force, :type => :boolean, :aliases => :f, :desc => "Must specify the force option if you want the containers stopped", :default => false, :lazy_default => true
39
40
  option :hosts, :type => :array, :aliases => :h, :desc => "The docker host(s) to deploy to. This can be a comma sepearted list."
40
41
  option :ssh_gateway, :type => :string, :aliases => :G, :desc => "SSH Gateway Host"
41
42
  option :ssh_gateway_user, :type => :string, :aliases => :U, :desc => "SSH Gateway User"
42
- option :force, :type => :boolean, :aliases => :f, :desc => "Must specify the force option if you want the containers stopped", :default => false, :lazy_default => true
43
+ option :volumes, :type => :boolean, :aliases => :v, :desc => "Remove the volumes associated with the container", :default => false, :lazy_default => true
43
44
  def stop(project, environment)
44
45
  Armada::Commands.stop(project, environment, options)
45
46
  end
@@ -12,7 +12,7 @@ module Armada
12
12
 
13
13
  now_in_ns = Integer(Time.now.to_f * 1000000.0)
14
14
  @options[:binds] ||= []
15
- @options[:binds] << "/var/log/#{@name}-#{now_in_ns}:/var/log/service"
15
+ @options[:binds] << "/var/log/containers/#{@name}/#{SecureRandom.uuid}:/var/log/service"
16
16
  end
17
17
 
18
18
  def stop
@@ -45,7 +45,7 @@ module Armada
45
45
  def kill
46
46
  return if @container.nil?
47
47
  info "Stopping old container #{@container.id[0..7]} (#{@name})"
48
- @container.kill
48
+ @container.kill :v => @options[:volumes]
49
49
  end
50
50
 
51
51
  def remove
@@ -34,7 +34,7 @@ describe Armada::Container do
34
34
  it "should have the log mount" do
35
35
  expect(options[:binds]).not_to be_nil
36
36
  expect(options[:binds].length).to equal 1
37
- expect(options[:binds][0]).to match /^\/var\/log\/#{container_name}-\d+:\/var\/log\/service$/
37
+ expect(options[:binds][0]).to match /^\/var\/log\/containers\/#{container_name}\/.*:\/var\/log\/service$/
38
38
  end
39
39
  end
40
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-armada
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chauncey
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-02-03 00:00:00.000000000 Z
13
+ date: 2015-02-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: excon