orchestration 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/.gitignore +2 -0
- data/README.md +19 -6
- data/lib/orchestration/file_helpers.rb +3 -2
- data/lib/orchestration/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d589d50ab6d3d03c9822ba9b93ef34cf5ff8da72cf533fda977ff4636b02971f
|
4
|
+
data.tar.gz: fa76ff6d543d6b1b9163ae65eec399485afa6cd6c64e197075f63061cb9bc048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c628f61477317a5d0f59a74f20edf79f7f2f30558afcb39cd4a31d545b41b142873f8346fdf1fc20012d1fd77a7ac02261a3e3657372f48ed390355f73c02842
|
7
|
+
data.tar.gz: 1bd874621d3b9bac7f06d771c8f1c77fbeaafb0646a073f39e08b2262d4e1db22bfa57b80ac3312c32cbb59381959e217e39c8a9789d82e61e82b2a230c6c417
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -29,7 +29,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
|
|
29
29
|
Add _Orchestration_ to your Gemfile:
|
30
30
|
|
31
31
|
```ruby
|
32
|
-
gem 'orchestration', '~> 0.4.
|
32
|
+
gem 'orchestration', '~> 0.4.2'
|
33
33
|
```
|
34
34
|
|
35
35
|
Install:
|
@@ -237,9 +237,9 @@ See related documentation:
|
|
237
237
|
|
238
238
|
| Variable | Meaning | Default Value |
|
239
239
|
|-|-|-|
|
240
|
-
| `WEB_HOST` | Host to reach application (
|
241
|
-
| `WEB_PORT` | Port to reach application (
|
242
|
-
| `WEB_HEALTHCHECK_PATH` | Path
|
240
|
+
| `WEB_HOST` | Host to reach application (from inside application container) | `localhost` |
|
241
|
+
| `WEB_PORT` | Port to reach application (from inside application container) | `8080` |
|
242
|
+
| `WEB_HEALTHCHECK_PATH` | Path expected to return a successful response | `/` |
|
243
243
|
| `WEB_HEALTHCHECK_READ_TIMEOUT` | Number of seconds to wait for data before failing healthcheck | `10` |
|
244
244
|
| `WEB_HEALTHCHECK_OPEN_TIMEOUT` | Number of seconds to wait for connection before failing healthcheck | `10` |
|
245
245
|
| `WEB_HEALTHCHECK_SUCCESS_CODES` | Comma-separated list of HTTP status codes that will be deemed a success | `200,202,204` |
|
@@ -271,14 +271,27 @@ An [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint) sc
|
|
271
271
|
<a name="rabbitmq-configuration"></a>
|
272
272
|
## RabbitMQ Configuration
|
273
273
|
|
274
|
-
The [Bunny](https://github.com/ruby-amqp/bunny) _RabbitMQ_ gem does not recognise `config/rabbitmq.yml`. If your application uses _RabbitMQ_ then you must manually update your code to reference this file, e.g.:
|
274
|
+
The [Bunny](https://github.com/ruby-amqp/bunny) _RabbitMQ_ gem does not recognise `config/rabbitmq.yml` or `RABBITMQ_URL`. If your application uses _RabbitMQ_ then you must manually update your code to reference this file, e.g.:
|
275
275
|
|
276
276
|
```ruby
|
277
277
|
connection = Bunny.new(config_for(:rabbit_mq)['url'])
|
278
278
|
connection.start
|
279
279
|
```
|
280
280
|
|
281
|
-
|
281
|
+
_Orchestration_ generates the following `config/rabbitmq.yml`:
|
282
|
+
|
283
|
+
```
|
284
|
+
development:
|
285
|
+
url: amqp://127.0.0.1:51070
|
286
|
+
|
287
|
+
test:
|
288
|
+
url: amqp://127.0.0.1:51068
|
289
|
+
|
290
|
+
production:
|
291
|
+
url: <%= ENV['RABBITMQ_URL'] %>
|
292
|
+
```
|
293
|
+
|
294
|
+
Using this approach, the environment variable `RABBITMQ_URL` can be used to configure _Bunny_ in production (similar to `DATABASE_URL` and `MONGO_URL`).
|
282
295
|
|
283
296
|
This is a convention of the _Orchestration_ gem intended to make _RabbitMQ_ configuration consistent with other services.
|
284
297
|
|
@@ -60,10 +60,9 @@ module Orchestration
|
|
60
60
|
return @terminal.write(:skip, relative_path(path))
|
61
61
|
end
|
62
62
|
|
63
|
+
backup(path, previous_content) if options.fetch(:backup, false)
|
63
64
|
File.write(path, content)
|
64
65
|
@terminal.write(:update, relative_path(path))
|
65
|
-
|
66
|
-
backup(path, previous_content) if options.fetch(:backup, false)
|
67
66
|
end
|
68
67
|
|
69
68
|
def skip?(present, content, previous_content, options)
|
@@ -75,6 +74,8 @@ module Orchestration
|
|
75
74
|
end
|
76
75
|
|
77
76
|
def backup(path, previous_content)
|
77
|
+
return if previous_content.nil?
|
78
|
+
|
78
79
|
backup_path = Pathname.new("#{path}.bak")
|
79
80
|
File.write(backup_path, previous_content)
|
80
81
|
@terminal.write(:backup, relative_path(backup_path))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestration
|
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
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|