docker-armada 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/lib/armada/deploy_dsl.rb +4 -0
- data/lib/armada/docker/container.rb +1 -1
- data/spec/docker/container_spec.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e09a97ff289d801558221773a79b789b7dfe4470
|
4
|
+
data.tar.gz: 8588032a019f0a9202d245b2829020ee9c9efa60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afc28e67549fef69833e17fbb2ae5aae82f715afdb475d7e16ce20f817d6c33e750983e19d4f3a86d22b19eca77bf537391cbc5761dce0f134890f20ff45cdaf
|
7
|
+
data.tar.gz: fc5768eca420e28248590783f86611ce28fdfc81c3ec86df94f6267ff952d46e164b8f15ace9a590ea6f5ca151619f21894b8c387576b84ee09c3a4bff00debb
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
Armada is a docker deployment tool which we originally forked from the [NewRelic Centurion](https://github.com/newrelic/centurion) project. It has since seen a huge refactor occur where we started using the [swipely/docker-api](https://github.com/swipely/docker-api) gem for interacting with our docker hosts instead of the mix of docker-cli and api calls that Centurion makes. The DSL is largely unchanged as it works really well for our intended purposes.
|
9
9
|
|
10
10
|
## Disclaimer
|
11
|
-
This gem is used in production for deployments at Rally Software. We like the structure it gives us and the simplicity of the DSL. If you feel that we are missing something please open an issue and let's have a discussion about it. If you find a bug please submit an issue and if possible a reproducible test case.
|
11
|
+
This gem is used in production for deployments at Rally Software. We like the structure it gives us and the simplicity of the DSL. If you feel that we are missing something please open an issue and let's have a discussion about it. If you find a bug please submit an issue and if possible a reproducible test case.
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
@@ -153,12 +153,18 @@ Armada can perform a http health check for your application. There are 4 pieces
|
|
153
153
|
|
154
154
|
**health_check_port will work even if you do not specify a contianer -> host port mapping. Armada will determine the dynamically assigned port to the expected container health check port and use that when performing the health check.**
|
155
155
|
|
156
|
-
#### Raw Container Config
|
157
|
-
If you want to use a docker feature not yet exposed through the armadafile, you can include a raw container config, and the rest of the armadafile will be applied on top of it.
|
156
|
+
#### Raw Create Container Config
|
157
|
+
If you want to use a create container docker feature not yet exposed through the armadafile, you can include a raw container config, and the rest of the armadafile will be applied on top of it.
|
158
158
|
|
159
159
|
```ruby
|
160
160
|
container_config({ "Cmd" => [ "date" ] })
|
161
161
|
```
|
162
|
+
#### Raw Start Container Config
|
163
|
+
If you want to use a start container docker feature not yet exposed through the armadafile, you can include a raw start container config, and the rest of the armadafile will be applied on top of it.
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
start_config({ "VolumesFrom" => [ "other_container" ] })
|
167
|
+
```
|
162
168
|
|
163
169
|
## CLI
|
164
170
|
The CLI is written using [Thor](http://whatisthor.com/). Below is current commands that can be executed using the Armada gem.
|
@@ -266,7 +272,7 @@ This will remove all images that are considered "orphaned". This means they are
|
|
266
272
|
```bash
|
267
273
|
bld-docker-01 -- unable to remove image 9d535e81db1e because of the following error - Expected([200, 201, 202, 203, 204, 304]) <=> Actual(409 Conflict)
|
268
274
|
```
|
269
|
-
This is because it is not the parent image. We are working to resolve this problem. You may also have to run this command a few times to get all the images cleaned up.
|
275
|
+
This is because it is not the parent image. We are working to resolve this problem. You may also have to run this command a few times to get all the images cleaned up.
|
270
276
|
|
271
277
|
Options:
|
272
278
|
* `hosts` - The list of hosts you wish to perform this action against
|
data/lib/armada/deploy_dsl.rb
CHANGED
@@ -55,7 +55,7 @@ module Armada
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.create_host_config(options)
|
58
|
-
host_config = {}
|
58
|
+
host_config = options[:start_config] || {}
|
59
59
|
host_config['Binds'] = options[:binds] if options[:binds] && !options[:binds].empty?
|
60
60
|
host_config['PortBindings'] = options[:port_bindings] if options[:port_bindings]
|
61
61
|
host_config['PublishAllPorts'] = true
|
@@ -23,7 +23,9 @@ describe Armada::Container do
|
|
23
23
|
"2222/udp" => [{"HostIp" => "0.0.0.0", "HostPort" => "2222"}]},
|
24
24
|
:env_vars => { "KEY" => "VALUE" },
|
25
25
|
:binds => [ "/host/log:/container/log" ],
|
26
|
-
:restart_policy => { "MaximumRetryCount" => 5, "Name" => "always" }
|
26
|
+
:restart_policy => { "MaximumRetryCount" => 5, "Name" => "always" },
|
27
|
+
:container_config => { "CreateConfigKey" => "CreateConfigValue" },
|
28
|
+
:start_config => { "StartConfigKey" => "StartConfigValue" },
|
27
29
|
}}
|
28
30
|
|
29
31
|
describe "#stop" do
|
@@ -111,6 +113,7 @@ describe Armada::Container do
|
|
111
113
|
it { should include("Volumes" => { "/container/log" => {}}) }
|
112
114
|
it { should include("VolumesFrom" => "parent") }
|
113
115
|
it { should include("RestartPolicy" => { "MaximumRetryCount" => 5, "Name" => "always" }) }
|
116
|
+
it { should include("CreateConfigKey" => "CreateConfigValue") }
|
114
117
|
end
|
115
118
|
|
116
119
|
describe ".create_host_config" do
|
@@ -119,6 +122,7 @@ describe Armada::Container do
|
|
119
122
|
it { should include("PortBindings" => {"1111/tcp" => [{"HostIp" => "0.0.0.0", "HostPort" => "1111"}],
|
120
123
|
"2222/udp" => [{"HostIp" => "0.0.0.0", "HostPort" => "2222"}]}) }
|
121
124
|
it { should include("PublishAllPorts" => true) }
|
125
|
+
it { should include("StartConfigKey" => "StartConfigValue") }
|
122
126
|
end
|
123
127
|
|
124
128
|
end
|
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.
|
4
|
+
version: 2.2.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: 2014-12-
|
13
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: excon
|