chef-metal-docker 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef_metal_docker.rb +0 -2
- data/lib/chef_metal_docker/docker_container_machine.rb +1 -1
- data/lib/chef_metal_docker/docker_transport.rb +11 -3
- data/lib/chef_metal_docker/version.rb +1 -1
- metadata +5 -7
- data/lib/chef/provider/docker_container.rb +0 -21
- data/lib/chef/resource/docker_container.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9f887c370b4d9532f2b54d32bf4f83ba3007185
|
4
|
+
data.tar.gz: 27e57e757b0a975d2e2878dcc621d62bdd0b8339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cab7c6159f5d8e0a18084c0e99481d2047bc534b0f992e64fbc22e01c36867891528fac32322aa753b8f4da855511e8c359c8bbb416cc0a4d5cbe2de31b5c6cc
|
7
|
+
data.tar.gz: 718f8274204319a35cbd98c6db40ecb72e22262bbde99d4fd797618421ff2cae9e62c9dadca50c0b5ccdde9a24fbe77e2c80cbb94f53542a6d31474c921520fc
|
data/lib/chef_metal_docker.rb
CHANGED
@@ -18,7 +18,7 @@ module ChefMetalDocker
|
|
18
18
|
super action_handler
|
19
19
|
if @command
|
20
20
|
Chef::Log.debug("DockerContainerMachine converge complete, executing #{@command} in #{@container_name}")
|
21
|
-
@transport.execute(@command)
|
21
|
+
@transport.execute(@command, :detached => true, :read_only => true)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -52,10 +52,18 @@ module ChefMetalDocker
|
|
52
52
|
live_stream = nil
|
53
53
|
live_stream = STDOUT if options[:stream]
|
54
54
|
live_stream = options[:stream_stdout] if options[:stream_stdout]
|
55
|
-
cmd = Mixlib::ShellOut.new(Shellwords.join(['docker', 'run', '--name', container_name, @image.id ] + command),
|
56
|
-
:live_stream => live_stream, :timeout => execute_timeout(options))
|
57
55
|
|
58
|
-
|
56
|
+
args = ['docker', 'run', '--name', container_name]
|
57
|
+
if options[:detached]
|
58
|
+
args << '--detach'
|
59
|
+
end
|
60
|
+
args << @image.id
|
61
|
+
args += command
|
62
|
+
cmdstr = Shellwords.join(args)
|
63
|
+
Chef::Log.debug("Executing #{cmdstr}")
|
64
|
+
|
65
|
+
cmd = Mixlib::ShellOut.new(cmdstr, :live_stream => live_stream, :timeout => execute_timeout(options))
|
66
|
+
|
59
67
|
cmd.run_command
|
60
68
|
|
61
69
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-metal-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Duffield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -116,18 +116,16 @@ extra_rdoc_files:
|
|
116
116
|
- README.md
|
117
117
|
- LICENSE
|
118
118
|
files:
|
119
|
+
- Rakefile
|
119
120
|
- LICENSE
|
120
121
|
- README.md
|
121
|
-
- Rakefile
|
122
|
-
- lib/chef/provider/docker_container.rb
|
123
|
-
- lib/chef/resource/docker_container.rb
|
124
122
|
- lib/chef_metal/driver_init/docker.rb
|
125
|
-
- lib/chef_metal_docker.rb
|
126
123
|
- lib/chef_metal_docker/chef_zero_http_proxy.rb
|
127
124
|
- lib/chef_metal_docker/docker_container_machine.rb
|
128
125
|
- lib/chef_metal_docker/docker_driver.rb
|
129
126
|
- lib/chef_metal_docker/docker_transport.rb
|
130
127
|
- lib/chef_metal_docker/version.rb
|
128
|
+
- lib/chef_metal_docker.rb
|
131
129
|
homepage: https://github.com/opscode/chef-metal-docker
|
132
130
|
licenses: []
|
133
131
|
metadata: {}
|
@@ -147,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
145
|
version: '0'
|
148
146
|
requirements: []
|
149
147
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.0.14
|
151
149
|
signing_key:
|
152
150
|
specification_version: 4
|
153
151
|
summary: Provisioner for creating Docker containers in Chef Metal.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'chef/provider/lwrp_base'
|
2
|
-
|
3
|
-
class Chef::Provider::DockerContainer < Chef::Provider::LWRPBase
|
4
|
-
|
5
|
-
def whyrun_supported?
|
6
|
-
true
|
7
|
-
end
|
8
|
-
|
9
|
-
def load_current_resource
|
10
|
-
# Don't do this here...
|
11
|
-
end
|
12
|
-
|
13
|
-
action :create do
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
action :delete do
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'chef/resource/lwrp_base'
|
2
|
-
|
3
|
-
class Chef::Resource::DockerContainer < Chef::Resource::Machine
|
4
|
-
|
5
|
-
attribute :image, :name_attribute => true
|
6
|
-
attribute :attach, :kind_of => [TrueClass, FalseClass]
|
7
|
-
attribute :author, :kind_of => [String]
|
8
|
-
attribute :cidfile, :kind_of => [String]
|
9
|
-
attribute :cmd_timeout, :kind_of => [Integer], :default => 60
|
10
|
-
attribute :command, :kind_of => [String]
|
11
|
-
attribute :container_name, :kind_of => [String]
|
12
|
-
attribute :cookbook, :kind_of => [String], :default => 'docker'
|
13
|
-
attribute :created, :kind_of => [String]
|
14
|
-
attribute :cpu_shares, :kind_of => [Fixnum]
|
15
|
-
attribute :destination, :kind_of => [String]
|
16
|
-
attribute :detach, :kind_of => [TrueClass, FalseClass]
|
17
|
-
attribute :dns, :kind_of => [String, Array], :default => nil
|
18
|
-
attribute :dns_search, :kind_of => [String, Array], :default => nil
|
19
|
-
attribute :entrypoint, :kind_of => [String]
|
20
|
-
attribute :env, :kind_of => [String, Array]
|
21
|
-
attribute :expose, :kind_of => [Fixnum, String, Array]
|
22
|
-
attribute :force, :kind_of => [TrueClass, FalseClass], :default => false
|
23
|
-
attribute :hostname, :kind_of => [String]
|
24
|
-
attribute :id, :kind_of => [String]
|
25
|
-
attribute :init_type, :kind_of => [FalseClass, String], :default => nil
|
26
|
-
attribute :init_template, :kind_of => [String]
|
27
|
-
attribute :link, :kind_of => [String, Array]
|
28
|
-
attribute :label, :kind_of => [String]
|
29
|
-
attribute :lxc_conf, :kind_of => [String, Array]
|
30
|
-
attribute :memory, :kind_of => [Fixnum]
|
31
|
-
attribute :message, :kind_of => [String]
|
32
|
-
attribute :networking, :kind_of => [TrueClass, FalseClass]
|
33
|
-
attribute :opt, :kind_of => [String, Array]
|
34
|
-
attribute :port, :kind_of => [Fixnum, String, Array]
|
35
|
-
attribute :privileged, :kind_of => [TrueClass, FalseClass]
|
36
|
-
attribute :publish_exposed_ports, :kind_of => [TrueClass, FalseClass], :default => false
|
37
|
-
attribute :public_port, :kind_of => [Fixnum]
|
38
|
-
attribute :remove_automatically, :kind_of => [TrueClass, FalseClass], :default => false
|
39
|
-
attribute :repository, :kind_of => [String]
|
40
|
-
attribute :run, :kind_of => [String]
|
41
|
-
attribute :socket_template, :kind_of => [String]
|
42
|
-
attribute :source, :kind_of => [String]
|
43
|
-
attribute :status, :kind_of => [String]
|
44
|
-
attribute :stdin, :kind_of => [TrueClass, FalseClass]
|
45
|
-
attribute :tag, :kind_of => [String]
|
46
|
-
attribute :tty, :kind_of => [TrueClass, FalseClass]
|
47
|
-
attribute :user, :kind_of => [String]
|
48
|
-
attribute :volume, :kind_of => [String, Array]
|
49
|
-
attribute :volumes_from, :kind_of => [String]
|
50
|
-
attribute :working_directory, :kind_of => [String]
|
51
|
-
|
52
|
-
end
|