orchestration 0.4.1 → 0.4.3
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/.gitignore +2 -0
- data/README.md +19 -6
- data/lib/orchestration/file_helpers.rb +3 -2
- data/lib/orchestration/templates/orchestration.mk.erb +5 -4
- 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: 0cb5ae60827d78174136105aa5d569442403e0c66fbd91b52dc1fa960d54b901
|
4
|
+
data.tar.gz: ebc464ac7f85474af8cd888571583f863d2a0ffe6629190e8a6d412e6abc20dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20653aa7ed7ee911d562cab05df0184525655af43a156082840a2052ed687575cd46c8a34fc975721fb97eaea0899c4b7e9d0244e6af67531905f91f6fdef569
|
7
|
+
data.tar.gz: 9aa560232ac183ba7368c23109e17d382f6483c1f125fbf155f3f8a58eddf25f1cf626ac85581ca1dbe0b8e0dfb3110774b3ca549890a816c7e90e0c17423617
|
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.3'
|
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))
|
@@ -32,7 +32,8 @@ else
|
|
32
32
|
endif
|
33
33
|
|
34
34
|
ifneq (,$(wildcard ${env_file}))
|
35
|
-
|
35
|
+
rake_cmd:=${rake}
|
36
|
+
rake=. ${env_file} && ${rake_cmd}
|
36
37
|
endif
|
37
38
|
|
38
39
|
docker_organization=$(shell bash ${orchestration_dir}/yaml.bash docker_organization)
|
@@ -201,11 +202,11 @@ endif
|
|
201
202
|
|
202
203
|
.PHONY: deploy
|
203
204
|
ifndef manager
|
204
|
-
@$(call println_error,'Missing `manager` parameter: `make deploy manager=swarm-manager.example.
|
205
|
+
@$(call println_error,'Missing `manager` parameter: `make deploy manager=swarm-manager.example.com`')
|
205
206
|
endif
|
206
207
|
deploy: env := production
|
207
208
|
deploy: project_name = ${docker_repository}_${env}
|
208
|
-
deploy: path
|
209
|
+
deploy: path := $(shell mktemp -d)
|
209
210
|
deploy: RAILS_ENV = ${env}
|
210
211
|
deploy: RACK_ENV = ${env}
|
211
212
|
deploy: DOCKER_TAG = ${git_version}
|
@@ -215,7 +216,7 @@ deploy:
|
|
215
216
|
$(call make,_verify_compose env_file=${env_file} env=${env}) && \
|
216
217
|
$(call make,bundle path='${path}/bundle.tar') ${log} && \
|
217
218
|
cd '${path}' ${log} && \
|
218
|
-
tar xf '
|
219
|
+
tar xf 'bundle.tar' ${log} && \
|
219
220
|
cd '${docker_repository}' ${log} && \
|
220
221
|
( [ -z '${env_file}' ] || cp '${env_file}' './.env' ${log} ) && \
|
221
222
|
$(call println,'${yellow}Deployment environment${reset}:') && \
|
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.3
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|