hako 1.8.0 → 1.8.1
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/CHANGELOG.md +5 -0
- data/examples/hello-nofront.yml +44 -0
- data/lib/hako/schedulers/ecs.rb +1 -3
- data/lib/hako/schedulers/ecs_elb.rb +5 -1
- data/lib/hako/schedulers/ecs_elb_v2.rb +5 -1
- data/lib/hako/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c72d876a8523117cb28e9b64938792732d01991
|
4
|
+
data.tar.gz: 49c8f8baab9ce2b173296c79d6327cee0abfca16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03605a8ac2a59471ecf74c9f08f06fc62c84c3188adac5804d3b7001d742619dd1c0379a230f3fc1aa98b37238b6ff6cb788efe16a56f78b83384d0a2885a1af
|
7
|
+
data.tar.gz: eb370ef4164435c9f580080106f2af47ca2b5d93aad987dedf027a53e55995ede062a54dff8181a1fcba8216a94e0283d5f3a927d58d5ae640c9c7648639569f
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
scheduler:
|
2
|
+
type: ecs
|
3
|
+
region: ap-northeast-1
|
4
|
+
cluster: eagletmt
|
5
|
+
desired_count: 2
|
6
|
+
role: ecsServiceRole
|
7
|
+
elb_v2:
|
8
|
+
# VPC id where the target group is located
|
9
|
+
vpc_id: vpc-WWWWWWWW
|
10
|
+
# Health check path of the target group
|
11
|
+
health_check_path: /site/sha
|
12
|
+
listeners:
|
13
|
+
- port: 80
|
14
|
+
protocol: HTTP
|
15
|
+
- port: 443
|
16
|
+
protocol: HTTPS
|
17
|
+
certificate_arn: arn:aws:iam::012345678901:server-certificate/hello-lb-v2.example.com
|
18
|
+
subnets:
|
19
|
+
- subnet-XXXXXXXX
|
20
|
+
- subnet-YYYYYYYY
|
21
|
+
security_groups:
|
22
|
+
- sg-ZZZZZZZZ
|
23
|
+
load_balancer_attributes:
|
24
|
+
access_logs.s3.enabled: 'true'
|
25
|
+
access_logs.s3.bucket: hako-access-logs
|
26
|
+
access_logs.s3.prefix: hako-hello-lb-v2
|
27
|
+
# Connect ELB to app container
|
28
|
+
container_name: app
|
29
|
+
container_port: 3000
|
30
|
+
app:
|
31
|
+
image: ryotarai/hello-sinatra
|
32
|
+
memory: 128
|
33
|
+
cpu: 256
|
34
|
+
env:
|
35
|
+
$providers:
|
36
|
+
- type: file
|
37
|
+
path: hello.env
|
38
|
+
PORT: '3000'
|
39
|
+
MESSAGE: '#{username}-san'
|
40
|
+
# Add port mapping to connect to ELB
|
41
|
+
port_mappings:
|
42
|
+
- container_port: 3000
|
43
|
+
host_port: 0
|
44
|
+
protocol: tcp
|
data/lib/hako/schedulers/ecs.rb
CHANGED
@@ -742,9 +742,7 @@ module Hako
|
|
742
742
|
}
|
743
743
|
if ecs_elb_client.find_or_create_load_balancer(front_port)
|
744
744
|
ecs_elb_client.modify_attributes
|
745
|
-
params[:load_balancers] = [
|
746
|
-
@ecs_elb_client.load_balancer_params_for_service.merge(container_name: 'front', container_port: 80),
|
747
|
-
]
|
745
|
+
params[:load_balancers] = [ecs_elb_client.load_balancer_params_for_service]
|
748
746
|
end
|
749
747
|
ecs_client.create_service(params).service
|
750
748
|
end
|
@@ -104,7 +104,11 @@ module Hako
|
|
104
104
|
|
105
105
|
# @return [Hash]
|
106
106
|
def load_balancer_params_for_service
|
107
|
-
{
|
107
|
+
{
|
108
|
+
load_balancer_name: name,
|
109
|
+
container_name: @elb_config.fetch('container_name', 'front'),
|
110
|
+
container_port: @elb_config.fetch('container_port', 80),
|
111
|
+
}
|
108
112
|
end
|
109
113
|
end
|
110
114
|
end
|
@@ -155,7 +155,11 @@ module Hako
|
|
155
155
|
|
156
156
|
# @return [Hash]
|
157
157
|
def load_balancer_params_for_service
|
158
|
-
{
|
158
|
+
{
|
159
|
+
target_group_arn: describe_target_group.target_group_arn,
|
160
|
+
container_name: @elb_v2_config.fetch('container_name', 'front'),
|
161
|
+
container_port: @elb_v2_config.fetch('container_port', 80),
|
162
|
+
}
|
159
163
|
end
|
160
164
|
|
161
165
|
private
|
data/lib/hako/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
@@ -277,6 +277,7 @@ files:
|
|
277
277
|
- examples/hello-awslogs-driver.yml
|
278
278
|
- examples/hello-lb-v2.yml
|
279
279
|
- examples/hello-lb.yml
|
280
|
+
- examples/hello-nofront.yml
|
280
281
|
- examples/hello-privileged-app.yml
|
281
282
|
- examples/hello.env
|
282
283
|
- examples/hello.yml
|