centurion 1.8.7 → 1.8.8

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: 826ffcff6537706e1e3c3098e11ed44fb3a5e720
4
- data.tar.gz: 2def18407e0b1fd89eb3b25859121394ae86abd9
3
+ metadata.gz: 5d6a3ace96ff33ba0c059c1c0147e33f20120569
4
+ data.tar.gz: ae5f4c1b8f87f86ccdf0a2535772c27f3511677e
5
5
  SHA512:
6
- metadata.gz: f7ea4eaca3ae871e7bb443fa273cfb52c791125bf82b2257943ff844be552431cd182608d5461493b5e9ade45e2b718dfc4fa5fb807443a4ae495a8af97013c9
7
- data.tar.gz: 30a236769d57b729f60d8067f71d5ad6c64d6fd8b2dff13e35b01d4b5d331243839370599a6cc1eb9a36b42523f6e54de0f074de65c6f58b8013784e630a1227
6
+ metadata.gz: 9d3e9aedb002d7d000fecd8ba45a8ade798752f3da06c1cfe3522caf1ab7c891ee33e83686470e90878d8b24ec83a612fc313b233b0622dcfadacfddcc7a08b6
7
+ data.tar.gz: 6eaa259d3cd1b9a5ad45e12bc2991905e870085dc09d66649ba8e5d4a7dca8ee5526da721c2978b10dcccbc450dc8a1fe0786e503656dad747b7c96e3e793873
@@ -14,6 +14,8 @@ Your name could be here!
14
14
  * [Mark Borcherding][markborcherding]
15
15
  * [Nick Laferriere][laferrieren]
16
16
  * [Hugo Chinchilla][hugochinchilla]
17
+ * [Dan Selans][dselans]
18
+ * [Dan Young][idleyoungman]
17
19
 
18
20
  Pre-release
19
21
  -----------
data/README.md CHANGED
@@ -23,7 +23,7 @@ Commercial Docker Registry Providers:
23
23
  - [Quay.io](https://quay.io) from the CoreOS team
24
24
 
25
25
  Open-source:
26
- - The [Docker registry](https://github.com/dotcloud/docker-registry) project,
26
+ - The [Docker Distribution](https://github.com/docker/distribution) project,
27
27
  built and maintained by Docker. You host this yourself.
28
28
  - (*NEW!*) [Dogestry](https://github.com/dogestry/dogestry) is an
29
29
  s3-backed Docker registry alternative that removes the requirement to set up
@@ -37,8 +37,6 @@ one roll-up commit of all our internal code. But all internal development will
37
37
  now be on public GitHub. See the CONTRIBUTORS file for the contributors to the
38
38
  original internal project.
39
39
 
40
- The **current stable release** is 1.8.0.
41
-
42
40
  Installation
43
41
  ------------
44
42
 
@@ -150,7 +148,7 @@ You can cause your container to be started with a specific DNS server
150
148
  IP address (the equivalent of `docker run --dns 172.17.42.1 ...`) like this:
151
149
  ```ruby
152
150
  task :production => :common do
153
- set :dns, '172.17.42.1'
151
+ set :dns, [ '172.17.42.1' ]
154
152
  # ...
155
153
  end
156
154
  ```
@@ -21,7 +21,11 @@ class Centurion::DockerServer
21
21
  def initialize(host, docker_path, tls_params = {})
22
22
  @docker_path = docker_path
23
23
  @hostname, @port = host.split(':')
24
- @port ||= '2375'
24
+ @port ||= if tls_params.empty?
25
+ '2375'
26
+ else
27
+ '2376'
28
+ end
25
29
  @tls_params = tls_params
26
30
  end
27
31
 
@@ -49,7 +49,9 @@ class Centurion::DockerViaApi
49
49
  path = @docker_api_version + "/containers/#{container_id}/stop?t=#{timeout}"
50
50
  response = Excon.post(
51
51
  @base_uri + path,
52
- tls_excon_arguments
52
+ tls_excon_arguments.merge(
53
+ read_timeout: timeout
54
+ )
53
55
  )
54
56
  raise response.inspect unless response.status == 204
55
57
  true
@@ -150,6 +152,7 @@ class Centurion::DockerViaApi
150
152
  Excon.defaults[:nonblock] = false
151
153
  Excon.defaults[:tcp_nodelay] = true
152
154
  Excon.defaults[:ssl_ca_file] = @tls_args[:tlscacert]
155
+ Excon.defaults[:ssl_verify_peer] = false
153
156
  end
154
157
 
155
158
  def default_tls_args(tls_enabled)
@@ -68,7 +68,7 @@ class Centurion::DockerViaCli
68
68
 
69
69
  def build_command(action, destination)
70
70
  command = "#{@docker_path} -H=#{@docker_host}"
71
- command << tls_parameters
71
+ command << tls_parameters || ''
72
72
  command << case action
73
73
  when :pull then ' pull '
74
74
  when :logs then ' logs -f '
@@ -1,3 +1,3 @@
1
1
  module Centurion
2
- VERSION = '1.8.7'
2
+ VERSION = '1.8.8'
3
3
  end
@@ -31,6 +31,7 @@ end
31
31
 
32
32
  task :stop => ['deploy:stop']
33
33
  task :enter_container => ['deploy:enter_container']
34
+ task :logs => ['deploy:logs']
34
35
 
35
36
  namespace :dev do
36
37
  task :export_only do
@@ -125,6 +126,13 @@ namespace :deploy do
125
126
  end
126
127
  end
127
128
 
129
+ task :logs do
130
+ Centurion::DockerServerGroup.new(fetch(:hosts, []), fetch(:docker_path)).each_in_parallel do |host|
131
+ container_id = host.ps.select { |c| c['Names'].select { |n| n =~ /#{fetch(:name)}/ } }.first['Id']
132
+ host.tail(container_id)
133
+ end
134
+ end
135
+
128
136
  task :rolling_deploy do
129
137
  on_each_docker_host do |server|
130
138
  service = defined_service
@@ -63,14 +63,14 @@ describe Centurion::DockerViaApi do
63
63
 
64
64
  it 'stops a container' do
65
65
  expect(Excon).to receive(:post).
66
- with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", {}).
66
+ with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", {read_timeout: 300}).
67
67
  and_return(double(status: 204))
68
68
  api.stop_container('12345', 300)
69
69
  end
70
70
 
71
71
  it 'stops a container with a custom timeout' do
72
72
  expect(Excon).to receive(:post).
73
- with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", {}).
73
+ with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", {read_timeout: 30}).
74
74
  and_return(double(status: 204))
75
75
  api.stop_container('12345')
76
76
  end
@@ -178,7 +178,8 @@ describe Centurion::DockerViaApi do
178
178
  expect(Excon).to receive(:post).
179
179
  with(excon_uri + "v1.12" + "/containers/12345/stop?t=300",
180
180
  client_cert: '/certs/cert.pem',
181
- client_key: '/certs/key.pem').
181
+ client_key: '/certs/key.pem',
182
+ read_timeout: 300).
182
183
  and_return(double(status: 204))
183
184
  api.stop_container('12345', 300)
184
185
  end
@@ -187,7 +188,8 @@ describe Centurion::DockerViaApi do
187
188
  expect(Excon).to receive(:post).
188
189
  with(excon_uri + "v1.12" + "/containers/12345/stop?t=30",
189
190
  client_cert: '/certs/cert.pem',
190
- client_key: '/certs/key.pem').
191
+ client_key: '/certs/key.pem',
192
+ read_timeout: 30).
191
193
  and_return(double(status: 204))
192
194
  api.stop_container('12345')
193
195
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: centurion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Benders
@@ -20,118 +20,118 @@ authors:
20
20
  autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2016-05-05 00:00:00.000000000 Z
23
+ date: 2016-12-19 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: trollop
27
27
  requirement: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - ">="
29
+ - - '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '0'
32
32
  type: :runtime
33
33
  prerelease: false
34
34
  version_requirements: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ">="
36
+ - - '>='
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: excon
41
41
  requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - "~>"
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0.33'
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - "~>"
50
+ - - ~>
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0.33'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: logger-colors
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ">="
57
+ - - '>='
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
64
+ - - '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: bundler
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ">="
71
+ - - '>='
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ">="
78
+ - - '>='
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rake
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ">="
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ">="
92
+ - - '>='
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rspec
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ~>
100
100
  - !ruby/object:Gem::Version
101
101
  version: 3.1.0
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - "~>"
106
+ - - ~>
107
107
  - !ruby/object:Gem::Version
108
108
  version: 3.1.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: pry
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ">="
113
+ - - '>='
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ">="
120
+ - - '>='
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: simplecov
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ">="
127
+ - - '>='
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ">="
134
+ - - '>='
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  description:
@@ -155,8 +155,8 @@ executables:
155
155
  extensions: []
156
156
  extra_rdoc_files: []
157
157
  files:
158
- - ".gitignore"
159
- - ".travis.yml"
158
+ - .gitignore
159
+ - .travis.yml
160
160
  - CONTRIBUTORS.md
161
161
  - Gemfile
162
162
  - LICENSE
@@ -208,17 +208,17 @@ require_paths:
208
208
  - lib
209
209
  required_ruby_version: !ruby/object:Gem::Requirement
210
210
  requirements:
211
- - - ">="
211
+ - - '>='
212
212
  - !ruby/object:Gem::Version
213
213
  version: 1.9.3
214
214
  required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  requirements:
216
- - - ">="
216
+ - - '>='
217
217
  - !ruby/object:Gem::Version
218
218
  version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
- rubygems_version: 2.2.2
221
+ rubygems_version: 2.0.14.1
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: A deployment tool for Docker. Takes containers from a Docker registry and