Skip to content

Commit

Permalink
Fix contributor links.
Browse files Browse the repository at this point in the history
  • Loading branch information
relistan committed Jun 10, 2016
1 parent 6a4ef23 commit ddd07d0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Your name could be here!
* [Mark Borcherding][markborcherding]
* [Nick Laferriere][laferrieren]
* [Hugo Chinchilla][hugochinchilla]
* [Dan Selans][dselans]
* [Dan Young][idleyoungman]

Pre-release
-----------
Expand Down
6 changes: 5 additions & 1 deletion lib/centurion/docker_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class Centurion::DockerServer
def initialize(host, docker_path, tls_params = {})
@docker_path = docker_path
@hostname, @port = host.split(':')
@port ||= '2375'
@port ||= if tls_params.empty?
'2375'
else
'2376'
end
@tls_params = tls_params
end

Expand Down
1 change: 1 addition & 0 deletions lib/centurion/docker_via_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def configure_excon_globally
Excon.defaults[:nonblock] = false
Excon.defaults[:tcp_nodelay] = true
Excon.defaults[:ssl_ca_file] = @tls_args[:tlscacert]
Excon.defaults[:ssl_verify_peer] = false
end

def default_tls_args(tls_enabled)
Expand Down
2 changes: 1 addition & 1 deletion lib/centurion/docker_via_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def tls_parameters

def build_command(action, destination)
command = "#{@docker_path} -H=#{@docker_host}"
command << tls_parameters
command << tls_parameters || ''
command << case action
when :pull then ' pull '
when :logs then ' logs -f '
Expand Down
8 changes: 8 additions & 0 deletions lib/tasks/deploy.rake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ end

task :stop => ['deploy:stop']
task :enter_container => ['deploy:enter_container']
task :logs => ['deploy:logs']

namespace :dev do
task :export_only do
Expand Down Expand Up @@ -125,6 +126,13 @@ namespace :deploy do
end
end

task :logs do
Centurion::DockerServerGroup.new(fetch(:hosts, []), fetch(:docker_path)).each_in_parallel do |host|
container_id = host.ps.select { |c| c['Names'].select { |n| n =~ /#{fetch(:name)}/ } }.first['Id']
host.tail(container_id)
end
end

task :rolling_deploy do
on_each_docker_host do |server|
service = defined_service
Expand Down

0 comments on commit ddd07d0

Please sign in to comment.