ecs_deployer 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -6
- data/circle.yml +3 -0
- data/ecs_deployer.gemspec +1 -1
- data/lib/ecs_deployer/cli.rb +2 -2
- data/lib/ecs_deployer/client.rb +4 -4
- data/lib/ecs_deployer/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9813a9bd195326308a360eaba2a75f2efcc87bf
|
4
|
+
data.tar.gz: f66001debcccb993a7c224a79c3d47a8b18880a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1693e38e90b37b5986c88f3e63c6eec4b70272ef5938311d59ceffbb26a856e8ad02695fafa0d8708e53a53ca7feeca6a35fa550c4eacf08063b21415b72d3
|
7
|
+
data.tar.gz: e7915c43d4fceb45fb1cec63afec848c003814ecaae779823e66af69d26e657c358b51d505103c8384d53e58ea35cf6067530dd05858df5a9b40b39390a03063
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
## Description
|
9
9
|
|
10
|
-
|
10
|
+
Deploy Docker container on AWS ECS..
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
@@ -98,26 +98,46 @@ deployer.register_task('development.yml', tag: 'latest')
|
|
98
98
|
|
99
99
|
#### Register new task
|
100
100
|
|
101
|
-
```
|
102
|
-
$ bundle exec ecs_deployer task-register --path=
|
101
|
+
```
|
102
|
+
$ bundle exec ecs_deployer task-register --path=spec/fixtures/task.yml --replace-variables=tag:latest
|
103
|
+
Registered task: arn:aws:ecs:ap-northeast-1:xxx:task-definition/hello_world:53
|
103
104
|
```
|
104
105
|
|
105
106
|
#### Encrypt environment value
|
106
107
|
|
107
|
-
```
|
108
|
+
```
|
108
109
|
$ bundle exec ecs_deployer encrypt --master-key=master --value='test'
|
109
110
|
Encrypted value: ${xxx}
|
110
111
|
```
|
111
112
|
|
112
113
|
#### Decrypt environment value
|
113
114
|
|
114
|
-
```
|
115
|
+
```
|
115
116
|
$ bundle exec ecs_deployer decrypt --value='${xxx}'
|
116
117
|
Decrypted value: xxx
|
117
118
|
```
|
118
119
|
|
119
120
|
#### Update service
|
120
121
|
|
121
|
-
```
|
122
|
+
```
|
122
123
|
$ bundle exec ecs_deployer update-service --cluster=xxx --service=xxx --wait --timeout=600
|
124
|
+
Start deploying...
|
125
|
+
Deploying... [0/1] (20 seconds elapsed)
|
126
|
+
New task: arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:68
|
127
|
+
------------------------------------------------------------------------------------------------
|
128
|
+
arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:67 [RUNNING]
|
129
|
+
------------------------------------------------------------------------------------------------
|
130
|
+
You can stop process with Ctrl+C. Deployment will continue.
|
131
|
+
|
132
|
+
Deploying... [1/2] (40 seconds elapsed)
|
133
|
+
New task: arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:68
|
134
|
+
------------------------------------------------------------------------------------------------
|
135
|
+
arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:68 [RUNNING]
|
136
|
+
arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:67 [RUNNING]
|
137
|
+
------------------------------------------------------------------------------------------------
|
138
|
+
You can stop process with Ctrl+C. Deployment will continue.
|
139
|
+
|
140
|
+
Service update succeeded. [1/1]
|
141
|
+
New task definition: arn:aws:ecs:ap-northeast-1:xxxx:task-definition/sandbox-development:68
|
142
|
+
Update service: arn:aws:ecs:ap-northeast-1:xxxx:service/development
|
123
143
|
```
|
data/circle.yml
CHANGED
data/ecs_deployer.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['n.yamakita@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = 'Deploy application to ECS.'
|
13
|
-
spec.description = '
|
13
|
+
spec.description = 'Deploy Docker container on AWS ECS.'
|
14
14
|
spec.homepage = 'https://github.com/naomichi-y/ecs_deployer'
|
15
15
|
|
16
16
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
data/lib/ecs_deployer/cli.rb
CHANGED
@@ -22,7 +22,7 @@ module EcsDeployer
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
desc '
|
25
|
+
desc 'task-register', 'Create new task definition'
|
26
26
|
option :path, required: true
|
27
27
|
option :replace_variables, type: :hash, default: {}
|
28
28
|
def task_register
|
@@ -32,7 +32,7 @@ module EcsDeployer
|
|
32
32
|
puts "Registered task: #{result}"
|
33
33
|
end
|
34
34
|
|
35
|
-
desc '
|
35
|
+
desc 'update-service', 'Update service difinition.'
|
36
36
|
option :cluster, required: true
|
37
37
|
option :service, required: true
|
38
38
|
option :wait, type: :boolean, default: true
|
data/lib/ecs_deployer/client.rb
CHANGED
@@ -47,16 +47,16 @@ module EcsDeployer
|
|
47
47
|
end
|
48
48
|
|
49
49
|
# @param [String] path
|
50
|
-
# @param [Hash]
|
50
|
+
# @param [Hash] replace_variables
|
51
51
|
# @return [String]
|
52
|
-
def register_task(path,
|
52
|
+
def register_task(path, replace_variables = {})
|
53
53
|
raise IOError, "File does not exist. [#{path}]" unless File.exist?(path)
|
54
54
|
|
55
|
-
register_task_hash(YAML.load(File.read(path)),
|
55
|
+
register_task_hash(YAML.load(File.read(path)), replace_variables)
|
56
56
|
end
|
57
57
|
|
58
58
|
# @param [Hash] task_definition
|
59
|
-
# @param [Hash]
|
59
|
+
# @param [Hash] replace_variables
|
60
60
|
# @return [String]
|
61
61
|
def register_task_hash(task_definition, replace_variables = {})
|
62
62
|
task_definition = Oj.load(Oj.dump(task_definition), symbol_keys: true)
|
data/lib/ecs_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naomichi-y
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runtime_command
|
@@ -178,7 +178,7 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
-
description:
|
181
|
+
description: Deploy Docker container on AWS ECS.
|
182
182
|
email:
|
183
183
|
- n.yamakita@gmail.com
|
184
184
|
executables:
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project:
|
225
|
-
rubygems_version: 2.
|
225
|
+
rubygems_version: 2.5.1
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Deploy application to ECS.
|