wrapbox 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +28 -21
- data/lib/wrapbox/runner/ecs.rb +5 -5
- data/lib/wrapbox/version.rb +1 -1
- data/wrapbox.gemspec +1 -1
- metadata +3 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5a28f3af84133c270e231a949bd36a0fdde4cc202f8f8f67de03e52075cacf44
|
4
|
+
data.tar.gz: 4bdb1546a8241d60bff8023d0b0201763ac40bfd55897521ead82ae94086b930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba3d465e670b3608b190b0859ab1bf5af1113a005a5a1f573b39828d835c4987a06506ae563ad293450b007ea6ac288961ef070359578c8d1549532e4d53af76
|
7
|
+
data.tar.gz: 9dcf2cd150611c6c140320d0b457cc4ba16f9ffd531dc70b15b4577997ff40cfebb72cdafdf7d3b9dbaf4f27d613e41ce5e9c8e87bee816266bf12badc4b9dab
|
data/README.md
CHANGED
@@ -27,19 +27,19 @@ default:
|
|
27
27
|
cluster: wrapbox
|
28
28
|
runner: ecs
|
29
29
|
region: ap-northeast-1
|
30
|
-
|
31
|
-
image: joker1007/wrapbox
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
container_definitions:
|
31
|
+
- image: joker1007/wrapbox
|
32
|
+
cpu: 512
|
33
|
+
memory: 1024
|
34
|
+
essential: true
|
35
35
|
|
36
36
|
docker:
|
37
37
|
runner: docker
|
38
38
|
rm: true
|
39
|
-
|
40
|
-
image: joker1007/wrapbox
|
41
|
-
|
42
|
-
|
39
|
+
container_definitions:
|
40
|
+
- image: joker1007/wrapbox
|
41
|
+
cpu: 512
|
42
|
+
memory: 1024
|
43
43
|
|
44
44
|
ecs2:
|
45
45
|
cluster: wrapbox
|
@@ -88,13 +88,20 @@ Wrapbox.run_cmd(["ls ."], environments: [{name: "RAILS_ENV", value: "development
|
|
88
88
|
|
89
89
|
### for ECS
|
90
90
|
|
91
|
-
| name
|
92
|
-
| --------------------
|
93
|
-
| cluster
|
94
|
-
| region
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
| name | desc |
|
92
|
+
| -------------------- | ------------------------------------------------ |
|
93
|
+
| cluster | target ECS cluster name |
|
94
|
+
| region | region of ECS cluster |
|
95
|
+
| container_definitions | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
96
|
+
| task_role_arn | see. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html |
|
97
|
+
| volumes | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
98
|
+
| placement_constraints | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
99
|
+
| placement_strategy | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
100
|
+
| launch_type | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#run_task-instance_method |
|
101
|
+
| newtork_mode | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
102
|
+
| network_configuration | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#run_task-instance_method |
|
103
|
+
| cpu | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
104
|
+
| memory | see. http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html#register_task_definition-instance_method |
|
98
105
|
|
99
106
|
`WRAPBOX_CMD_INDEX` environment variable is available in `run_cmd` and you can distinguish logs from each command like below:
|
100
107
|
|
@@ -108,11 +115,11 @@ log_configuration:
|
|
108
115
|
```
|
109
116
|
|
110
117
|
### for docker
|
111
|
-
| name
|
112
|
-
| --------------------
|
113
|
-
|
|
114
|
-
| rm
|
115
|
-
| use_sudo
|
118
|
+
| name | desc |
|
119
|
+
| -------------------- | ----------------------------------------------------------- |
|
120
|
+
| container_definitions | only use `image`, `cpu`, `memory`, and `memory_reservation` |
|
121
|
+
| rm | If true, add `--rm` to cmd options |
|
122
|
+
| use_sudo | If true, invoke `sudo docker` command |
|
116
123
|
|
117
124
|
## API
|
118
125
|
|
data/lib/wrapbox/runner/ecs.rb
CHANGED
@@ -58,17 +58,17 @@ module Wrapbox
|
|
58
58
|
@cpu = options[:cpu]
|
59
59
|
@memory = options[:memory]
|
60
60
|
|
61
|
-
|
61
|
+
@container_definitions = options[:container_definition] ? [options[:container_definition]] : options[:container_definitions] || []
|
62
|
+
@container_definitions.concat(options[:additional_container_definitions]) if options[:additional_container_definitions] # deprecated
|
63
|
+
|
64
|
+
if !@container_definitions.empty? && options[:task_definition]
|
62
65
|
raise "Please set only one of `container_definition` and `task_definition`"
|
63
66
|
end
|
64
67
|
|
65
|
-
if options[:additional_container_definitions].empty
|
68
|
+
if options[:additional_container_definitions] && !options[:additional_container_definitions].empty?
|
66
69
|
warn "`additional_container_definitions` is deprecated parameter, Use `container_definitions` instead of it"
|
67
70
|
end
|
68
71
|
|
69
|
-
@container_definitions = options[:container_definition] ? [options[:container_definition]] : options[:container_definitions]
|
70
|
-
@container_definitions.concat(options[:additional_container_definitions]) # deprecated
|
71
|
-
|
72
72
|
@task_definition_info = options[:task_definition]
|
73
73
|
|
74
74
|
if !@container_definitions.empty?
|
data/lib/wrapbox/version.rb
CHANGED
data/wrapbox.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_runtime_dependency "aws-sdk", "
|
23
|
+
spec.add_runtime_dependency "aws-sdk", ">= 2.10.109"
|
24
24
|
spec.add_runtime_dependency "activesupport", ">= 4"
|
25
25
|
spec.add_runtime_dependency "docker-api"
|
26
26
|
spec.add_runtime_dependency "multi_json"
|
metadata
CHANGED
@@ -1,22 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrapbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.10'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 2.10.109
|
@@ -24,9 +21,6 @@ dependencies:
|
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '2.10'
|
30
24
|
- - ">="
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: 2.10.109
|
@@ -220,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
214
|
version: '0'
|
221
215
|
requirements: []
|
222
216
|
rubyforge_project:
|
223
|
-
rubygems_version: 2.
|
217
|
+
rubygems_version: 2.7.4
|
224
218
|
signing_key:
|
225
219
|
specification_version: 4
|
226
220
|
summary: Ruby method runner on AWS ECS
|