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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0e76021c2188815543806a45d895faefe103cf3
4
- data.tar.gz: 901f08bf7cdc58f315e5da314406a0e6637e8d59
3
+ metadata.gz: 8c72d876a8523117cb28e9b64938792732d01991
4
+ data.tar.gz: 49c8f8baab9ce2b173296c79d6327cee0abfca16
5
5
  SHA512:
6
- metadata.gz: 3f45ff523f92db022cf67fd8bc531ccda88d54fa2c98b2e051a3a6c3c9224a735a0edfb41ce1d1656a7f4059e6d7697a4fe76b21bee267340115f2fa24505a75
7
- data.tar.gz: e4656997f0aea4ffa8388d54a937d7457aefbfdf74d054f6aa278c30f2a69360b788029ddfb742d3826af69d7176292a42c21ee25462dbcf1e32168de5903eb5
6
+ metadata.gz: 03605a8ac2a59471ecf74c9f08f06fc62c84c3188adac5804d3b7001d742619dd1c0379a230f3fc1aa98b37238b6ff6cb788efe16a56f78b83384d0a2885a1af
7
+ data.tar.gz: eb370ef4164435c9f580080106f2af47ca2b5d93aad987dedf027a53e55995ede062a54dff8181a1fcba8216a94e0283d5f3a927d58d5ae640c9c7648639569f
@@ -1,3 +1,8 @@
1
+ # 1.8.1 (2017-09-15)
2
+ ## Improvements
3
+ - Add container_name and container_port option to elb and elb_v2
4
+ - See [examples/hello-nofront.yml](examples/hello-nofront.yml)
5
+
1
6
  # 1.8.0 (2017-09-15)
2
7
  ## Changes
3
8
  - Migrate to aws-sdk v3
@@ -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
@@ -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
- { load_balancer_name: name }
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
- { target_group_arn: describe_target_group.target_group_arn }
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hako
4
- VERSION = '1.8.0'
4
+ VERSION = '1.8.1'
5
5
  end
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.0
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