hako 1.9.0 → 2.0.0
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 +6 -0
- data/README.md +5 -5
- data/docs/jsonnet.md +48 -0
- data/examples/front.libsonnet +8 -0
- data/examples/hello-fargate.jsonnet +84 -0
- data/examples/hello.jsonnet +45 -0
- data/hako.gemspec +1 -0
- data/lib/hako/application.rb +14 -4
- data/lib/hako/cli.rb +10 -7
- data/lib/hako/commander.rb +12 -12
- data/lib/hako/definition_loader.rb +2 -2
- data/lib/hako/jsonnet_loader.rb +46 -0
- data/lib/hako/version.rb +1 -1
- metadata +21 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85ef57c377dafbf524ddb4d442108f92aee5f278d2506c5f91ca61df1541dd2b
|
4
|
+
data.tar.gz: 7de25a114cf37299e18ffa034d8eed56d6253857c67865bd0a15f90c1c87bb02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a30d023690fc56f462e230b0e9b229c63091489446ac85c45a01d7158d0ba363f999ea28ca0cac2a2c9c22dfb387f3a7d5cc8b5fcd9a552fb98581f518eedeee
|
7
|
+
data.tar.gz: 2095d02a1a7da744416a599abf5ba16762206349c4dfd772d7d74f7ef030aab4ffa4a6a4d36005f68d42fdced3e82c2bdbef51b4a0ea1839cdd4b07432709da2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 2.0.0 (2017-12-13)
|
2
|
+
## New features
|
3
|
+
- Support Jsonnet as the definition file format
|
4
|
+
- See [docs/jsonnet.md](docs/jsonnet.md)
|
5
|
+
- YAML definitions continues to be supported by hako at least v2.x series. Currently I don't have a plan which will be the default format.
|
6
|
+
|
1
7
|
# 1.9.0 (2017-12-06)
|
2
8
|
## New features
|
3
9
|
- Add support for awsvpc network mode
|
data/README.md
CHANGED
@@ -23,16 +23,16 @@ Or install it yourself as:
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
```
|
26
|
-
% hako deploy examples/hello.
|
26
|
+
% hako deploy examples/hello.jsonnet
|
27
27
|
I, [2015-10-02T12:51:24.530274 #7988] INFO -- : Registered task-definition: arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:task-definition/hello:29
|
28
28
|
I, [2015-10-02T12:51:24.750501 #7988] INFO -- : Uploaded front configuration to s3://nanika/hako/front_config/hello.conf
|
29
29
|
I, [2015-10-02T12:51:24.877409 #7988] INFO -- : Updated service: arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:service/hello
|
30
30
|
I, [2015-10-02T12:56:07.284874 #7988] INFO -- : Deployment completed
|
31
31
|
|
32
|
-
% hako deploy examples/hello.
|
32
|
+
% hako deploy examples/hello.jsonnet
|
33
33
|
I, [2015-10-02T12:56:12.262760 #8141] INFO -- : Deployment isn't needed
|
34
34
|
|
35
|
-
% hako status examples/hello.
|
35
|
+
% hako status examples/hello.jsonnet
|
36
36
|
Load balancer:
|
37
37
|
hako-hello-XXXXXXXXXX.ap-northeast-1.elb.amazonaws.com:80 -> front:80
|
38
38
|
Deployments:
|
@@ -44,7 +44,7 @@ Events:
|
|
44
44
|
2015-10-05 13:35:53 +0900: (service hello) has reached a steady state.
|
45
45
|
2015-10-05 13:35:14 +0900: (service hello) stopped 1 running tasks.
|
46
46
|
|
47
|
-
% hako rollback examples/hello.
|
47
|
+
% hako rollback examples/hello.jsonnet
|
48
48
|
I, [2016-05-02T13:07:12.679926 #10961] INFO -- : Current task defintion is hello:29. Rolling back to arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:task-definition/hello:28
|
49
49
|
I, [2016-05-02T13:07:12.959116 #10961] INFO -- : Updated service: arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:service/hello
|
50
50
|
I, [2016-05-02T13:08:27.280686 #10961] INFO -- : Deployment completed
|
@@ -53,7 +53,7 @@ I, [2016-05-02T13:08:27.280686 #10961] INFO -- : Deployment completed
|
|
53
53
|
Run oneshot command.
|
54
54
|
|
55
55
|
```
|
56
|
-
% hako oneshot examples/hello.
|
56
|
+
% hako oneshot examples/hello.jsonnet date
|
57
57
|
I, [2017-07-18T18:14:06.099763 #6627] INFO -- : Task definition isn't changed: arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:task-definition/hello-oneshot:32
|
58
58
|
I, [2017-07-18T18:14:06.147062 #6627] INFO -- : Started task: arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:task/01234567-89ab-cdef-0123-456789abcdef
|
59
59
|
I, [2017-07-18T18:14:06.193860 #6627] INFO -- : Container instance is arn:aws:ecs:ap-northeast-1:XXXXXXXXXXXX:container-instance/01234567-89ab-cdef-0123-456789abcdef (i-0123456789abcdef0)
|
data/docs/jsonnet.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
Jsonnet is a domain specific configuration language that helps you define JSON data.
|
2
|
+
http://jsonnet.org/
|
3
|
+
|
4
|
+
In hako, you can use Jsonnet format for defining applications.
|
5
|
+
|
6
|
+
# External variables
|
7
|
+
Jsonnet provide a way to refer external variables by `std.extVar(x)`.
|
8
|
+
http://jsonnet.org/docs/stdlib.html#ext_vars
|
9
|
+
|
10
|
+
## appId
|
11
|
+
`std.extVar('appId')` returns application id of the definition.
|
12
|
+
|
13
|
+
### Example
|
14
|
+
```
|
15
|
+
% cat awesome-app.jsonnet
|
16
|
+
{
|
17
|
+
id: std.extVar('appId'),
|
18
|
+
}
|
19
|
+
% hako show-definition awesome-app.jsonnet
|
20
|
+
---
|
21
|
+
id: awesome-app
|
22
|
+
```
|
23
|
+
|
24
|
+
# Native functions
|
25
|
+
Jsonnet provide a way to refer native functions by `std.native(x)`.
|
26
|
+
|
27
|
+
## provide.$NAME
|
28
|
+
`std.native('provide.$NAME')` returns a function which returns a corresponding EnvProvider.
|
29
|
+
|
30
|
+
### Example
|
31
|
+
```
|
32
|
+
% cat awesome-app.env
|
33
|
+
username=eagletmt
|
34
|
+
% cat awesome-app.yml
|
35
|
+
password: hako
|
36
|
+
% cat awesome-app.jsonnet
|
37
|
+
local provideFromFile(name) = std.native('provide.file')(std.toString({ path: 'awesome-app.env' }), name);
|
38
|
+
local provideFromYaml(name) = std.native('provide.yaml')(std.toString({ path: 'awesome-app.yml' }), name);
|
39
|
+
|
40
|
+
{
|
41
|
+
username: provideFromFile('username'),
|
42
|
+
password: provideFromYaml('password'),
|
43
|
+
}
|
44
|
+
% hako show-definition --expand awesome-app.jsonnet
|
45
|
+
---
|
46
|
+
password: hako
|
47
|
+
username: eagletmt
|
48
|
+
```
|
@@ -0,0 +1,84 @@
|
|
1
|
+
local appId = std.extVar('appId');
|
2
|
+
|
3
|
+
local region = 'us-east-1';
|
4
|
+
local publicSubnets = ['subnet-xxxxxxxx', 'subnet-yyyyyyyy'];
|
5
|
+
local privateSubnets = ['subnet-zzzzzzzz', 'subnet-wwwwwwww'];
|
6
|
+
local elbSecurityGroups = ['sg-xxxxxxxx'];
|
7
|
+
local taskSecurityGroups = ['sg-yyyyyyyy', 'sg-zzzzzzzz'];
|
8
|
+
local awslogs = {
|
9
|
+
log_driver: 'awslogs',
|
10
|
+
options: {
|
11
|
+
'awslogs-group': std.format('/ecs/%s', appId),
|
12
|
+
'awslogs-region': region,
|
13
|
+
'awslogs-stream-prefix': 'ecs',
|
14
|
+
},
|
15
|
+
};
|
16
|
+
|
17
|
+
{
|
18
|
+
scheduler: {
|
19
|
+
type: 'ecs',
|
20
|
+
region: region,
|
21
|
+
cluster: 'eagletmt',
|
22
|
+
desired_count: 1,
|
23
|
+
task_role_arn: 'arn:aws:iam::012345678901:role/EcsDefault',
|
24
|
+
elb_v2: {
|
25
|
+
vpc_id: 'vpc-xxxxxxxx',
|
26
|
+
health_check_path: '/site/sha',
|
27
|
+
listeners: [
|
28
|
+
{
|
29
|
+
port: 80,
|
30
|
+
protocol: 'HTTP',
|
31
|
+
},
|
32
|
+
{
|
33
|
+
port: 443,
|
34
|
+
protocol: 'HTTPS',
|
35
|
+
certificate_arn: 'arn:aws:acm:us-east-1:012345678901:certificate/01234567-89ab-cdef-0123-456789abcdef',
|
36
|
+
},
|
37
|
+
],
|
38
|
+
subnets: publicSubnets,
|
39
|
+
security_groups: elbSecurityGroups,
|
40
|
+
load_balancer_attributes: {
|
41
|
+
'access_logs.s3.enabled': 'true',
|
42
|
+
'access_logs.s3.bucket': 'hako-access-logs',
|
43
|
+
'access_logs.s3.prefix': std.format('hako-%s', appId),
|
44
|
+
'idle_timeout.timeout_seconds': '5',
|
45
|
+
},
|
46
|
+
target_group_attributes: {
|
47
|
+
'deregistration_delay.timeout_seconds': '20',
|
48
|
+
},
|
49
|
+
},
|
50
|
+
# Fargate
|
51
|
+
execution_role_arn: 'arn:aws:iam::012345678901:role/ecsTaskExecutionRole',
|
52
|
+
cpu: '1024',
|
53
|
+
memory: '2048',
|
54
|
+
requires_compatibilities: ['FARGATE'],
|
55
|
+
network_mode: 'awsvpc',
|
56
|
+
launch_type: 'FARGATE',
|
57
|
+
network_configuration: {
|
58
|
+
awsvpc_configuration: {
|
59
|
+
subnets: privateSubnets,
|
60
|
+
security_groups: taskSecurityGroups,
|
61
|
+
assign_public_ip: 'DISABLED',
|
62
|
+
},
|
63
|
+
},
|
64
|
+
},
|
65
|
+
app: {
|
66
|
+
image: 'ryotarai/hello-sinatra',
|
67
|
+
cpu: 128,
|
68
|
+
memory: 256,
|
69
|
+
env: {
|
70
|
+
PORT: '3000',
|
71
|
+
MESSAGE: 'Hello, Fargate',
|
72
|
+
},
|
73
|
+
log_configuration: awslogs,
|
74
|
+
},
|
75
|
+
additional_containers: {
|
76
|
+
front: {
|
77
|
+
image_tag: 'hako-nginx',
|
78
|
+
log_configuration: awslogs,
|
79
|
+
},
|
80
|
+
},
|
81
|
+
scripts: [
|
82
|
+
(import 'front.libsonnet') + { backend_port: 3000 },
|
83
|
+
],
|
84
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
local fileProvider = std.native('provide.file');
|
2
|
+
local provide(name) = fileProvider(std.toString({ path: 'hello.env' }), name);
|
3
|
+
|
4
|
+
{
|
5
|
+
scheduler: {
|
6
|
+
type: 'ecs',
|
7
|
+
region: 'ap-northeast-1',
|
8
|
+
cluster: 'eagletmt',
|
9
|
+
desired_count: 2,
|
10
|
+
task_role_arn: 'arn:aws:iam::012345678901:role/HelloRole',
|
11
|
+
deployment_configuration: {
|
12
|
+
maximum_percent: 200,
|
13
|
+
minimum_healthy_percent: 50,
|
14
|
+
},
|
15
|
+
},
|
16
|
+
app: {
|
17
|
+
image: 'ryotarai/hello-sinatra',
|
18
|
+
memory: 128,
|
19
|
+
cpu: 256,
|
20
|
+
links: [
|
21
|
+
'redis:redis',
|
22
|
+
],
|
23
|
+
env: {
|
24
|
+
PORT: '3000',
|
25
|
+
MESSAGE: std.format('%s-san', provide('username')),
|
26
|
+
},
|
27
|
+
},
|
28
|
+
additional_containers: {
|
29
|
+
front: {
|
30
|
+
image_tag: 'hako-nginx',
|
31
|
+
memory: 32,
|
32
|
+
cpu: 32,
|
33
|
+
},
|
34
|
+
redis: {
|
35
|
+
image_tag: 'redis:3.0',
|
36
|
+
cpu: 64,
|
37
|
+
memory: 512,
|
38
|
+
},
|
39
|
+
},
|
40
|
+
scripts: [
|
41
|
+
(import 'front.libsonnet') + {
|
42
|
+
backend_port: 3000,
|
43
|
+
},
|
44
|
+
],
|
45
|
+
}
|
data/hako.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency 'aws-sdk-elasticloadbalancingv2'
|
32
32
|
spec.add_dependency 'aws-sdk-s3'
|
33
33
|
spec.add_dependency 'aws-sdk-sns'
|
34
|
+
spec.add_dependency 'jsonnet'
|
34
35
|
|
35
36
|
spec.add_development_dependency 'bundler'
|
36
37
|
spec.add_development_dependency 'coveralls'
|
data/lib/hako/application.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'hako/error'
|
4
|
+
require 'hako/jsonnet_loader'
|
3
5
|
require 'hako/yaml_loader'
|
4
6
|
require 'pathname'
|
5
7
|
|
@@ -9,15 +11,23 @@ module Hako
|
|
9
11
|
# @return [String]
|
10
12
|
# @!attribute [r] root_path
|
11
13
|
# @return [Pathname]
|
12
|
-
# @!attribute [r]
|
14
|
+
# @!attribute [r] definition
|
13
15
|
# @return [Hash]
|
14
|
-
attr_reader :id, :root_path, :
|
16
|
+
attr_reader :id, :root_path, :definition
|
15
17
|
|
16
|
-
def initialize(yaml_path)
|
18
|
+
def initialize(yaml_path, expand_variables: true)
|
17
19
|
path = Pathname.new(yaml_path)
|
18
20
|
@id = path.basename.sub_ext('').to_s
|
19
21
|
@root_path = path.parent
|
20
|
-
@
|
22
|
+
@definition =
|
23
|
+
case path.extname
|
24
|
+
when '.yml', '.yaml'
|
25
|
+
YamlLoader.new.load(path)
|
26
|
+
when '.jsonnet', '.json'
|
27
|
+
JsonnetLoader.new(self, expand_variables).load(path)
|
28
|
+
else
|
29
|
+
raise Error.new("Unknown extension: #{path}")
|
30
|
+
end
|
21
31
|
end
|
22
32
|
end
|
23
33
|
end
|
data/lib/hako/cli.rb
CHANGED
@@ -10,7 +10,7 @@ module Hako
|
|
10
10
|
deploy
|
11
11
|
rollback
|
12
12
|
oneshot
|
13
|
-
show-
|
13
|
+
show-definition
|
14
14
|
status
|
15
15
|
remove
|
16
16
|
stop
|
@@ -181,17 +181,19 @@ module Hako
|
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
184
|
-
class
|
184
|
+
class ShowDefinition
|
185
185
|
def run(argv)
|
186
186
|
parse!(argv)
|
187
|
-
require 'hako/
|
188
|
-
|
187
|
+
require 'hako/application'
|
188
|
+
app = Application.new(@path, expand_variables: @expand_variables)
|
189
|
+
puts app.definition.to_yaml
|
189
190
|
end
|
190
191
|
|
191
192
|
def parse!(argv)
|
193
|
+
@expand_variables = false
|
192
194
|
parser.parse!(argv)
|
193
|
-
@
|
194
|
-
if @
|
195
|
+
@path = argv.first
|
196
|
+
if @path.nil?
|
195
197
|
puts parser.help
|
196
198
|
exit 1
|
197
199
|
end
|
@@ -199,8 +201,9 @@ module Hako
|
|
199
201
|
|
200
202
|
def parser
|
201
203
|
@parser ||= OptionParser.new do |opts|
|
202
|
-
opts.banner = 'hako show-
|
204
|
+
opts.banner = 'hako show-definition FILE'
|
203
205
|
opts.version = VERSION
|
206
|
+
opts.on('--expand', 'Expand variables (Jsonnet only)') { @expand_variables = true }
|
204
207
|
end
|
205
208
|
end
|
206
209
|
end
|
data/lib/hako/commander.rb
CHANGED
@@ -20,9 +20,9 @@ module Hako
|
|
20
20
|
# @return [nil]
|
21
21
|
def deploy(force: false, tag: 'latest', dry_run: false, timeout:)
|
22
22
|
containers = load_containers(tag, dry_run: dry_run)
|
23
|
-
scripts = @app.
|
24
|
-
volumes = @app.
|
25
|
-
scheduler = load_scheduler(@app.
|
23
|
+
scripts = @app.definition.fetch('scripts', []).map { |config| load_script(config, dry_run: dry_run) }
|
24
|
+
volumes = @app.definition.fetch('volumes', {})
|
25
|
+
scheduler = load_scheduler(@app.definition['scheduler'], scripts, volumes: volumes, force: force, dry_run: dry_run, timeout: timeout)
|
26
26
|
|
27
27
|
scripts.each { |script| script.deploy_starting(containers) }
|
28
28
|
scheduler.deploy(containers)
|
@@ -33,8 +33,8 @@ module Hako
|
|
33
33
|
# @param [Boolean] dry_run
|
34
34
|
# @return [nil]
|
35
35
|
def rollback(dry_run: false)
|
36
|
-
scripts = @app.
|
37
|
-
scheduler = load_scheduler(@app.
|
36
|
+
scripts = @app.definition.fetch('scripts', []).map { |config| load_script(config, dry_run: dry_run) }
|
37
|
+
scheduler = load_scheduler(@app.definition['scheduler'], scripts, dry_run: dry_run)
|
38
38
|
|
39
39
|
scripts.each(&:rollback_starting)
|
40
40
|
scheduler.rollback
|
@@ -49,9 +49,9 @@ module Hako
|
|
49
49
|
# @return [nil]
|
50
50
|
def oneshot(commands, tag:, containers:, env: {}, dry_run: false, no_wait: false)
|
51
51
|
containers = load_containers(tag, dry_run: dry_run, with: containers)
|
52
|
-
scripts = @app.
|
53
|
-
volumes = @app.
|
54
|
-
scheduler = load_scheduler(@app.
|
52
|
+
scripts = @app.definition.fetch('scripts', []).map { |config| load_script(config, dry_run: dry_run) }
|
53
|
+
volumes = @app.definition.fetch('volumes', {})
|
54
|
+
scheduler = load_scheduler(@app.definition['scheduler'], scripts, volumes: volumes, dry_run: dry_run)
|
55
55
|
|
56
56
|
scripts.each { |script| script.oneshot_starting(containers) }
|
57
57
|
exit_code = with_oneshot_signal_handlers(scheduler) do
|
@@ -63,19 +63,19 @@ module Hako
|
|
63
63
|
|
64
64
|
# @return [nil]
|
65
65
|
def status
|
66
|
-
load_scheduler(@app.
|
66
|
+
load_scheduler(@app.definition['scheduler'], [], dry_run: false).status
|
67
67
|
end
|
68
68
|
|
69
69
|
# @param [Boolean] dry_run
|
70
70
|
# @return [nil]
|
71
71
|
def remove(dry_run:)
|
72
|
-
scripts = @app.
|
73
|
-
load_scheduler(@app.
|
72
|
+
scripts = @app.definition.fetch('scripts', []).map { |config| load_script(config, dry_run: dry_run) }
|
73
|
+
load_scheduler(@app.definition['scheduler'], scripts, dry_run: dry_run).remove
|
74
74
|
scripts.each(&:after_remove)
|
75
75
|
end
|
76
76
|
|
77
77
|
def stop(dry_run:)
|
78
|
-
load_scheduler(@app.
|
78
|
+
load_scheduler(@app.definition['scheduler'], [], dry_run: dry_run).stop
|
79
79
|
end
|
80
80
|
|
81
81
|
private
|
@@ -18,7 +18,7 @@ module Hako
|
|
18
18
|
# @param [Array<String>, nil] with
|
19
19
|
# @return [Hash<String, Container>]
|
20
20
|
def load(tag, with: nil)
|
21
|
-
additional_containers = @app.
|
21
|
+
additional_containers = @app.definition.fetch('additional_containers', {})
|
22
22
|
container_names = ['app']
|
23
23
|
if with
|
24
24
|
container_names.concat(with)
|
@@ -43,7 +43,7 @@ module Hako
|
|
43
43
|
containers[name] =
|
44
44
|
case name
|
45
45
|
when 'app'
|
46
|
-
AppContainer.new(@app, @app.
|
46
|
+
AppContainer.new(@app, @app.definition['app'].merge('tag' => tag), dry_run: @dry_run)
|
47
47
|
else
|
48
48
|
Container.new(@app, additional_containers.fetch(name), dry_run: @dry_run)
|
49
49
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'hako'
|
4
|
+
require 'hako/env_providers'
|
5
|
+
require 'hako/loader'
|
6
|
+
require 'json'
|
7
|
+
require 'jsonnet'
|
8
|
+
|
9
|
+
module Hako
|
10
|
+
class JsonnetLoader
|
11
|
+
# @param [Application] application
|
12
|
+
# @param [Boolean] expand_variables
|
13
|
+
def initialize(application, expand_variables)
|
14
|
+
@vm = Jsonnet::VM.new
|
15
|
+
@root_path = application.root_path
|
16
|
+
define_provider_functions(expand_variables)
|
17
|
+
@vm.ext_var('appId', application.id)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param [Pathname] path
|
21
|
+
def load(path)
|
22
|
+
JSON.parse(@vm.evaluate_file(path.to_s))
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def define_provider_functions(expand_variables)
|
28
|
+
Gem.loaded_specs.each do |gem_name, spec|
|
29
|
+
spec.require_paths.each do |path|
|
30
|
+
Dir.glob(File.join(spec.full_gem_path, path, 'hako/env_providers/*.rb')).each do |provider_path|
|
31
|
+
provider_name = File.basename(provider_path, '.rb')
|
32
|
+
provider_class = Loader.new(Hako::EnvProviders, 'hako/env_providers').load(provider_name)
|
33
|
+
Hako.logger.debug("Loaded #{provider_class} from '#{gem_name}' gem")
|
34
|
+
@vm.define_function("provide.#{provider_name}") do |options, name|
|
35
|
+
if expand_variables
|
36
|
+
provider_class.new(@root_path, JSON.parse(options)).ask([name]).fetch(name)
|
37
|
+
else
|
38
|
+
"\#{#{name}}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/hako/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-applicationautoscaling
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: jsonnet
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: bundler
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,19 +284,23 @@ files:
|
|
270
284
|
- bin/console
|
271
285
|
- bin/setup
|
272
286
|
- docs/ecs-task-notification.md
|
287
|
+
- docs/jsonnet.md
|
273
288
|
- examples/create_aws_cloud_watch_logs_log_group.yml
|
289
|
+
- examples/front.libsonnet
|
274
290
|
- examples/front.yml
|
275
291
|
- examples/hello-autoscaling-group.yml
|
276
292
|
- examples/hello-autoscaling.yml
|
277
293
|
- examples/hello-awslogs-driver.yml
|
278
294
|
- examples/hello-cap-add-app.yml
|
279
295
|
- examples/hello-fargate-batch.yml
|
296
|
+
- examples/hello-fargate.jsonnet
|
280
297
|
- examples/hello-fargate.yml
|
281
298
|
- examples/hello-lb-v2.yml
|
282
299
|
- examples/hello-lb.yml
|
283
300
|
- examples/hello-nofront.yml
|
284
301
|
- examples/hello-privileged-app.yml
|
285
302
|
- examples/hello.env
|
303
|
+
- examples/hello.jsonnet
|
286
304
|
- examples/hello.yml
|
287
305
|
- examples/put-ecs-container-status-to-s3/index.js
|
288
306
|
- examples/put-ecs-container-status-to-s3/package.json
|
@@ -301,6 +319,7 @@ files:
|
|
301
319
|
- lib/hako/env_providers/file.rb
|
302
320
|
- lib/hako/env_providers/yaml.rb
|
303
321
|
- lib/hako/error.rb
|
322
|
+
- lib/hako/jsonnet_loader.rb
|
304
323
|
- lib/hako/loader.rb
|
305
324
|
- lib/hako/scheduler.rb
|
306
325
|
- lib/hako/schedulers.rb
|