ufo 4.5.7 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +2 -0
- data/docs/_docs/conventions.md +1 -1
- data/docs/_docs/extras/codebuild-iam-role.md +2 -2
- data/docs/_docs/extras/dockerfile-erb.md +2 -2
- data/docs/_docs/extras/ecs-network-mode.md +2 -2
- data/docs/_docs/extras/load-balancer.md +2 -2
- data/docs/_docs/extras/minimal-deploy-iam.md +2 -2
- data/docs/_docs/extras/redirection-support.md +2 -2
- data/docs/_docs/extras/route53-support.md +2 -2
- data/docs/_docs/extras/security-groups.md +2 -2
- data/docs/_docs/extras/ssl-support.md +2 -2
- data/docs/_docs/faq.md +2 -2
- data/docs/_docs/helpers.md +1 -1
- data/docs/_docs/install.md +1 -1
- data/docs/_docs/more/auto-completion.md +2 -2
- data/docs/_docs/more/automated-cleanup.md +2 -2
- data/docs/_docs/more/customize-cloudformation.md +2 -2
- data/docs/_docs/more/migrations.md +2 -2
- data/docs/_docs/more/run-in-pieces.md +2 -2
- data/docs/_docs/more/single-task.md +2 -2
- data/docs/_docs/more/stuck-cloudformation.md +2 -2
- data/docs/_docs/more/why-cloudformation.md +2 -2
- data/docs/_docs/next-steps.md +2 -2
- data/docs/_docs/quick-start-ec2.md +1 -1
- data/docs/_docs/settings.md +1 -1
- data/docs/_docs/settings/aws_profile.md +1 -1
- data/docs/_docs/settings/cfn.md +1 -1
- data/docs/_docs/settings/cluster.md +1 -1
- data/docs/_docs/settings/network.md +1 -1
- data/docs/_docs/ssl_errors.md +40 -0
- data/docs/_docs/structure.md +1 -1
- data/docs/_docs/tutorial-ufo-docker-build.md +1 -1
- data/docs/_docs/tutorial-ufo-init.md +1 -1
- data/docs/_docs/tutorial-ufo-ship.md +1 -1
- data/docs/_docs/tutorial-ufo-ships.md +1 -1
- data/docs/_docs/tutorial-ufo-tasks-build.md +1 -1
- data/docs/_docs/tutorial.md +1 -1
- data/docs/_docs/ufo-current.md +2 -2
- data/docs/_docs/ufo-env-extra.md +2 -2
- data/docs/_docs/ufo-env.md +2 -2
- data/docs/_docs/ufo-logs.md +50 -0
- data/docs/_docs/ufo-task-params.md +2 -2
- data/docs/_docs/upgrading.md +2 -2
- data/docs/_docs/upgrading/upgrade4.5.md +2 -2
- data/docs/_docs/upgrading/upgrade4.md +2 -2
- data/docs/_docs/variables.md +1 -1
- data/docs/_includes/subnav.html +2 -1
- data/docs/_reference/ufo-logs.md +39 -0
- data/docs/articles.md +2 -2
- data/docs/docs.md +1 -1
- data/docs/quick-start.md +1 -1
- data/docs/reference.md +1 -0
- data/docs/utils/ssl-doctor.rb +89 -0
- data/docs/utils/test-aws-api-access.rb +11 -0
- data/docs/utils/update-cert-chains.sh +11 -0
- data/lib/template/.ufo/settings/cfn/default.yml.tt +1 -1
- data/lib/ufo/aws_service.rb +2 -0
- data/lib/ufo/cancel.rb +1 -1
- data/lib/ufo/cli.rb +9 -0
- data/lib/ufo/core.rb +5 -5
- data/lib/ufo/help/logs.md +10 -0
- data/lib/ufo/logs.rb +55 -0
- data/lib/ufo/version.rb +1 -1
- data/spec/fixtures/mocks/logs/awslogs.json +70 -0
- data/spec/fixtures/mocks/logs/no-awslogs.json +70 -0
- data/spec/lib/logs_spec.rb +55 -0
- data/ufo.gemspec +2 -0
- metadata +45 -4
@@ -35,4 +35,4 @@ ufo ships demo-{web,worker,clock}
|
|
35
35
|
|
36
36
|
In the case of the `ufo ships` command the `--wait` option defaults to false so that all the specified ECS services update in parallel. You can check on the status of the update on the CloudFormation console.
|
37
37
|
|
38
|
-
{% include prev_next.md %}
|
38
|
+
{% include prev_next.md %}
|
data/docs/_docs/tutorial.md
CHANGED
data/docs/_docs/ufo-current.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Ufo Current
|
3
|
-
nav_order:
|
3
|
+
nav_order: 23
|
4
4
|
---
|
5
5
|
|
6
6
|
## service
|
@@ -46,4 +46,4 @@ This can be shorten with with current also.
|
|
46
46
|
ufo current --services demo-web demo-worker demo-clock
|
47
47
|
ufo ships
|
48
48
|
|
49
|
-
{% include prev_next.md %}
|
49
|
+
{% include prev_next.md %}
|
data/docs/_docs/ufo-env-extra.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: UFO_ENV_EXTRA
|
3
|
-
nav_order:
|
3
|
+
nav_order: 22
|
4
4
|
---
|
5
5
|
|
6
6
|
<div class="video-box"><div class="video-container"><iframe src="https://www.youtube.com/embed/UVQuwQGToYE" frameborder="0" allowfullscreen=""></iframe></div></div>
|
@@ -19,4 +19,4 @@ The precedence:
|
|
19
19
|
1. UFO_ENV_EXTRA - takes highest precedence
|
20
20
|
2. `.ufo/current` env-extra setting - takes lower precedence
|
21
21
|
|
22
|
-
{% include prev_next.md %}
|
22
|
+
{% include prev_next.md %}
|
data/docs/_docs/ufo-env.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: UFO_ENV
|
3
|
-
nav_order:
|
3
|
+
nav_order: 21
|
4
4
|
---
|
5
5
|
|
6
6
|
Ufo's behavior is controlled by the `UFO_ENV` environment variable. For example, the `UFO_ENV` variable is used to layer different ufo variable files together to make it easy to specify settings for different environments like production and development. This is covered thoroughly in the [Variables]({% link _docs/variables.md %}) section. `UFO_ENV` defaults to `development` when not set.
|
@@ -45,4 +45,4 @@ AWS_PROFILE=whatever => UFO_ENV=development # since there are no profiles that m
|
|
45
45
|
|
46
46
|
Notice how `AWS_PROFILE=whatever` results in `UFO_ENV=development`. This is because there are no matching aws_profiles in the `settings.yml`. More info on settings is available at [settings]({% link _docs/settings.md %}).
|
47
47
|
|
48
|
-
{% include prev_next.md %}
|
48
|
+
{% include prev_next.md %}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
title: ufo logs command
|
3
|
+
nav_order: 20
|
4
|
+
---
|
5
|
+
|
6
|
+
The ufo logs command will tail the logs of the ecs service if you are using the awslogs driver.
|
7
|
+
|
8
|
+
## Examples
|
9
|
+
|
10
|
+
$ ufo logs demo-web
|
11
|
+
2020-01-16 23:58:16 UTC 10.20.120.135 - - [16/Jan/2020:23:58:16 +0000] "GET / HTTP/1.1" 200 3 0.0003
|
12
|
+
2020-01-16 23:58:16 UTC 10.20.120.135 - - [16/Jan/2020:23:58:16 UTC] "GET / HTTP/1.1" 200 3
|
13
|
+
2020-01-16 23:58:16 UTC - -> /
|
14
|
+
|
15
|
+
## Current Set
|
16
|
+
|
17
|
+
If you have a current service name set.
|
18
|
+
|
19
|
+
$ ufo current --service demo-web
|
20
|
+
$ ufo logs # follow by default
|
21
|
+
2020-01-16 23:58:16 UTC 10.20.120.135 - - [16/Jan/2020:23:58:16 +0000] "GET / HTTP/1.1" 200 3 0.0003
|
22
|
+
2020-01-16 23:58:16 UTC 10.20.120.135 - - [16/Jan/2020:23:58:16 UTC] "GET / HTTP/1.1" 200 3
|
23
|
+
2020-01-16 23:58:16 UTC - -> /
|
24
|
+
|
25
|
+
## Options
|
26
|
+
|
27
|
+
By default the logs follow and use the simple format without the log stream. Here's how adjust those options:
|
28
|
+
|
29
|
+
ufo logs --no-follow
|
30
|
+
ufo logs --format detailed # to show stream too
|
31
|
+
|
32
|
+
More info: [ufo logs reference]({% link _reference/ufo-logs.md %})
|
33
|
+
|
34
|
+
## awslog driver
|
35
|
+
|
36
|
+
The generated .ufo task definition defaults to the awslogs driver. If you need it, it looks like this:
|
37
|
+
|
38
|
+
```json
|
39
|
+
"logConfiguration": {
|
40
|
+
"logDriver": "awslogs",
|
41
|
+
"options": {
|
42
|
+
"awslogs-group": "<%= @awslogs_group %>",
|
43
|
+
"awslogs-region": "<%= @awslogs_region || 'us-east-1' %>",
|
44
|
+
"awslogs-stream-prefix": "<%= @awslogs_stream_prefix %>"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
```
|
48
|
+
|
49
|
+
|
50
|
+
{% include prev_next.md %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Ufo Task Params
|
3
|
-
nav_order:
|
3
|
+
nav_order: 24
|
4
4
|
---
|
5
5
|
|
6
6
|
You can run one off task with the [ufo task](https://ufoships.com/reference/ufo-task/) command.
|
@@ -40,4 +40,4 @@ ERB and [shared variables]({% link _docs/variables.md %}) are available in the p
|
|
40
40
|
|
41
41
|
Note, the params.yml file does not have access to the `task_definition_name` helper method. That is only available in the `task_definitions.rb` template_definition code blocks.
|
42
42
|
|
43
|
-
{% include prev_next.md %}
|
43
|
+
{% include prev_next.md %}
|
data/docs/_docs/upgrading.md
CHANGED
@@ -3,7 +3,7 @@ title: Upgrading to Version 4.5
|
|
3
3
|
short_title: Version 4.5
|
4
4
|
order: 1
|
5
5
|
categories: upgrading
|
6
|
-
nav_order:
|
6
|
+
nav_order: 35
|
7
7
|
---
|
8
8
|
|
9
9
|
In ufo version 4.4 and 4.5, the default cloudformation stack names used by ufo were changed.
|
@@ -49,4 +49,4 @@ Version | Setting
|
|
49
49
|
|
50
50
|
CloudFormation names the resources it creates with the beginning portion of the stack name. When the stack name prepends the environment then resources like ELBs a little bit harder to identify since they might be named something like this `product-Elb-K0LFFQ9LK50W`. It makes it harder to distinguish ELBs from different apps created by ufo.
|
51
51
|
|
52
|
-
{% include prev_next.md %}
|
52
|
+
{% include prev_next.md %}
|
@@ -3,7 +3,7 @@ title: Upgrading to Version 4.0
|
|
3
3
|
short_title: Version 4.0
|
4
4
|
order: 2
|
5
5
|
categories: upgrading
|
6
|
-
nav_order:
|
6
|
+
nav_order: 36
|
7
7
|
---
|
8
8
|
|
9
9
|
A major change in ufo from version 3 to 4 is that the ECS service is now created by CloudFormation. If you have an existing ECS service deployed by ufo version 3, when you deploy your app again with ufo version 4, there will be a new additional ECS service created. Here is the recommended upgrade path.
|
@@ -45,4 +45,4 @@ File | Changes
|
|
45
45
|
.ufo/settings/cfn/default.yml | Starter cfn settings file.
|
46
46
|
.ufo/settings/network/default.yml | This generated file will have the vpc and subnets that you specified above. You can change them directly in this file to control what network settings ufo uses.
|
47
47
|
|
48
|
-
{% include prev_next.md %}
|
48
|
+
{% include prev_next.md %}
|
data/docs/_docs/variables.md
CHANGED
data/docs/_includes/subnav.html
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
<li><a href="{% link _docs/variables.md %}">Shared Variables</a></li>
|
27
27
|
<li><a href="{% link _docs/helpers.md %}">Helpers</a></li>
|
28
28
|
<li><a href="{% link _docs/conventions.md %}">Conventions</a></li>
|
29
|
+
<li><a href="{% link _docs/ufo-logs.md %}">Ufo Logs</a></li>
|
29
30
|
<li><a href="{% link _docs/ufo-env.md %}">Ufo Env</a></li>
|
30
31
|
<li><a href="{% link _docs/ufo-env-extra.md %}">Ufo Env Extra</a></li>
|
31
32
|
<li><a href="{% link _docs/ufo-current.md %}">Ufo Current</a></li>
|
@@ -58,7 +59,7 @@
|
|
58
59
|
<li><a href="{% link _docs/more/why-cloudformation.md %}">Why CloudFormation</a></li>
|
59
60
|
<li><a href="{% link _docs/more/customize-cloudformation.md %}">Customize CloudFormation</a></li>
|
60
61
|
<li><a href="{% link _docs/more/stuck-cloudformation.md %}">Stuck CloudFormation</a></li>
|
61
|
-
<li><a href="{% link _docs/more/run-in-pieces.md %}">Run In
|
62
|
+
<li><a href="{% link _docs/more/run-in-pieces.md %}">Run In Steps</a></li>
|
62
63
|
<li><a href="{% link _docs/more/single-task.md %}">Run Single Task</a></li>
|
63
64
|
<li><a href="{% link _docs/more/migrations.md %}">Database Migrations</a></li>
|
64
65
|
<li><a href="{% link _docs/more/automated-cleanup.md %}">Automated Cleanup</a></li>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
title: ufo logs
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo logs
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Prints out logs
|
13
|
+
|
14
|
+
## Examples
|
15
|
+
|
16
|
+
ufo logs demo-web
|
17
|
+
|
18
|
+
If you have a current service name set.
|
19
|
+
|
20
|
+
ufo current --service demo-web
|
21
|
+
ufo logs # follow by default
|
22
|
+
ufo logs --no-follow
|
23
|
+
ufo logs --format detailed # to show stream too
|
24
|
+
|
25
|
+
|
26
|
+
## Options
|
27
|
+
|
28
|
+
```
|
29
|
+
[--follow], [--no-follow] # Whether to continuously poll for new logs. To exit from this mode, use Control-C.
|
30
|
+
# Default: true
|
31
|
+
[--since=SINCE] # From what time to begin displaying logs. By default, logs will be displayed starting from 1 minutes in the past. The value provided can be an ISO 8601 timestamp or a relative time.
|
32
|
+
[--format=FORMAT] # The format to display the logs. IE: detailed or short. With detailed, the log stream name is also shown.
|
33
|
+
# Default: simple
|
34
|
+
[--verbose], [--no-verbose]
|
35
|
+
[--mute], [--no-mute]
|
36
|
+
[--noop], [--no-noop]
|
37
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
38
|
+
```
|
39
|
+
|
data/docs/articles.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Articles
|
3
|
-
nav_order:
|
3
|
+
nav_order: 46
|
4
4
|
---
|
5
5
|
|
6
6
|
* [How to Create Unlimited Extra Environments
|
@@ -11,4 +11,4 @@ nav_order: 45
|
|
11
11
|
* [Heroku vs ECS Fargate vs EC2 On-Demand vs EC2 Spot Pricing Comparison](https://blog.boltops.com/2018/04/22/heroku-vs-ecs-fargate-vs-ec2-on-demand-vs-ec2-spot-pricing-comparison)
|
12
12
|
* [Ufo Ship on AWS ECS Presentation](http://www.slideshare.net/tongueroo/ufo-ship-for-aws-ecs-70885296)
|
13
13
|
|
14
|
-
{% include prev_next.md %}
|
14
|
+
{% include prev_next.md %}
|
data/docs/docs.md
CHANGED
data/docs/quick-start.md
CHANGED
data/docs/reference.md
CHANGED
@@ -12,6 +12,7 @@ title: CLI Reference
|
|
12
12
|
* [ufo destroy]({% link _reference/ufo-destroy.md %})
|
13
13
|
* [ufo docker]({% link _reference/ufo-docker.md %})
|
14
14
|
* [ufo init]({% link _reference/ufo-init.md %})
|
15
|
+
* [ufo logs]({% link _reference/ufo-logs.md %})
|
15
16
|
* [ufo network]({% link _reference/ufo-network.md %})
|
16
17
|
* [ufo ps]({% link _reference/ufo-ps.md %})
|
17
18
|
* [ufo releases]({% link _reference/ufo-releases.md %})
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# Usage: ruby doctor.rb [HOST=status.github.com[:PORT=443]]
|
2
|
+
# see: https://github.com/mislav/ssl-tools
|
3
|
+
require 'rbconfig'
|
4
|
+
require 'net/https'
|
5
|
+
|
6
|
+
if ARGV[0] =~ /^[^-]/
|
7
|
+
host, port = ARGV[0].split(':', 2)
|
8
|
+
else
|
9
|
+
host = 'status.github.com'
|
10
|
+
end
|
11
|
+
port ||= 443
|
12
|
+
|
13
|
+
ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
|
14
|
+
ruby_version = RUBY_VERSION
|
15
|
+
if patch = RbConfig::CONFIG['PATCHLEVEL']
|
16
|
+
ruby_version += "-p#{patch}"
|
17
|
+
end
|
18
|
+
puts "%s (%s)" % [ruby, ruby_version]
|
19
|
+
|
20
|
+
openssl_dir = OpenSSL::X509::DEFAULT_CERT_AREA
|
21
|
+
mac_openssl = '/System/Library/OpenSSL' == openssl_dir
|
22
|
+
puts "%s: %s" % [OpenSSL::OPENSSL_VERSION, openssl_dir]
|
23
|
+
[OpenSSL::X509::DEFAULT_CERT_DIR_ENV, OpenSSL::X509::DEFAULT_CERT_FILE_ENV].each do |key|
|
24
|
+
puts "%s=%s" % [key, ENV[key].to_s.inspect]
|
25
|
+
end
|
26
|
+
|
27
|
+
ca_file = ENV[OpenSSL::X509::DEFAULT_CERT_FILE_ENV] || OpenSSL::X509::DEFAULT_CERT_FILE
|
28
|
+
ca_path = (ENV[OpenSSL::X509::DEFAULT_CERT_DIR_ENV] || OpenSSL::X509::DEFAULT_CERT_DIR).chomp('/')
|
29
|
+
|
30
|
+
puts "\nHEAD https://#{host}:#{port}"
|
31
|
+
http = Net::HTTP.new(host, port)
|
32
|
+
http.use_ssl = true
|
33
|
+
|
34
|
+
# Explicitly setting cert_store like this is not needed in most cases but it
|
35
|
+
# seems necessary in edge cases such as when using `verify_callback` in some
|
36
|
+
# combination of Ruby + OpenSSL versions.
|
37
|
+
http.cert_store = OpenSSL::X509::Store.new
|
38
|
+
http.cert_store.set_default_paths
|
39
|
+
|
40
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
41
|
+
failed_cert = failed_cert_reason = nil
|
42
|
+
|
43
|
+
if mac_openssl
|
44
|
+
warn "warning: will not be able show failed certificate info on OS X's OpenSSL"
|
45
|
+
# This drives me absolutely nuts. It seems that on Rubies compiled against OS X's
|
46
|
+
# system OpenSSL, the mere fact of defining a `verify_callback` makes the
|
47
|
+
# cert verification fail for requests that would otherwise be successful.
|
48
|
+
else
|
49
|
+
http.verify_callback = lambda { |verify_ok, store_context|
|
50
|
+
if !verify_ok
|
51
|
+
failed_cert = store_context.current_cert
|
52
|
+
failed_cert_reason = "%d: %s" % [ store_context.error, store_context.error_string ]
|
53
|
+
end
|
54
|
+
verify_ok
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
user_agent = "net/http #{ruby_version}"
|
59
|
+
req = Net::HTTP::Head.new('/', 'user-agent' => user_agent)
|
60
|
+
|
61
|
+
begin
|
62
|
+
res = http.start { http.request(req) }
|
63
|
+
abort res.inspect if res.code.to_i >= 500
|
64
|
+
puts "OK"
|
65
|
+
rescue Errno::ECONNREFUSED
|
66
|
+
puts "Error: connection refused"
|
67
|
+
exit 1
|
68
|
+
rescue OpenSSL::SSL::SSLError => e
|
69
|
+
puts "#{e.class}: #{e.message}"
|
70
|
+
|
71
|
+
if failed_cert
|
72
|
+
puts "\nThe server presented a certificate that could not be verified:"
|
73
|
+
puts " subject: #{failed_cert.subject}"
|
74
|
+
puts " issuer: #{failed_cert.issuer}"
|
75
|
+
puts " error code %s" % failed_cert_reason
|
76
|
+
end
|
77
|
+
|
78
|
+
ca_file_missing = !File.exist?(ca_file) && !mac_openssl
|
79
|
+
ca_path_empty = Dir["#{ca_path}/*"].empty?
|
80
|
+
|
81
|
+
if ca_file_missing || ca_path_empty
|
82
|
+
puts "\nPossible causes:"
|
83
|
+
puts " `%s' does not exist" % ca_file if ca_file_missing
|
84
|
+
puts " `%s/' is empty" % ca_path if ca_path_empty
|
85
|
+
end
|
86
|
+
|
87
|
+
exit 1
|
88
|
+
end
|
89
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# usage 'ruby s3-cert-chain-test.rb'
|
2
|
+
# see: https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/quick-start-guide.html
|
3
|
+
|
4
|
+
require 'aws-sdk-s3' # v2: require 'aws-sdk'
|
5
|
+
#Aws.use_bundled_cert!
|
6
|
+
|
7
|
+
s3 = Aws::S3::Resource.new(region: 'us-east-1')
|
8
|
+
|
9
|
+
s3.buckets.limit(50).each do |b|
|
10
|
+
puts "#{b.name}"
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
cert_file=$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE' 2>/dev/null)
|
4
|
+
echo 'What is the uri to your organizations root certificate chain?'
|
5
|
+
read -p 'org_root_chain: ' org_root_chain
|
6
|
+
echo "$org_root_chain"
|
7
|
+
curl "$org_root_chain" -o org_chain.txt
|
8
|
+
cat org_chain.txt >> "$cert_file"
|
9
|
+
mkdir -p "${cert_file%/*}"
|
10
|
+
security find-certificate -a -p /Library/Keychains/System.keychain > "$cert_file"
|
11
|
+
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$cert_file"
|
@@ -18,7 +18,7 @@ target_group:
|
|
18
18
|
# network elb: TCP
|
19
19
|
# so we can keep this commented out, unless we need HTTPS at the app level
|
20
20
|
# Health check settings are supported by application load balancer only:
|
21
|
-
# health_check_path: /
|
21
|
+
# health_check_path: /up # health check
|
22
22
|
health_check_interval_seconds: 10 # default: 30. Network ELB can only take 10 or 30
|
23
23
|
healthy_threshold_count: 2
|
24
24
|
unhealthy_threshold_count: 2 # default: 10
|
data/lib/ufo/aws_service.rb
CHANGED
data/lib/ufo/cancel.rb
CHANGED
@@ -12,7 +12,7 @@ module Ufo
|
|
12
12
|
if stack.stack_status == "CREATE_IN_PROGRESS"
|
13
13
|
cloudformation.delete_stack(stack_name: @stack_name)
|
14
14
|
puts "Canceling stack creation."
|
15
|
-
elsif stack.stack_status
|
15
|
+
elsif stack.stack_status == "UPDATE_IN_PROGRESS"
|
16
16
|
cloudformation.cancel_update_stack(stack_name: @stack_name)
|
17
17
|
puts "Canceling stack update."
|
18
18
|
else
|
data/lib/ufo/cli.rb
CHANGED
@@ -187,6 +187,15 @@ module Ufo
|
|
187
187
|
Status.new(service, options).run
|
188
188
|
end
|
189
189
|
|
190
|
+
desc "logs", "Prints out logs"
|
191
|
+
long_desc Help.text(:logs)
|
192
|
+
option :follow, default: true, type: :boolean, desc: " Whether to continuously poll for new logs. To exit from this mode, use Control-C."
|
193
|
+
option :since, desc: "From what time to begin displaying logs. By default, logs will be displayed starting from 1 minutes in the past. The value provided can be an ISO 8601 timestamp or a relative time."
|
194
|
+
option :format, default: "simple", desc: "The format to display the logs. IE: detailed or short. With detailed, the log stream name is also shown."
|
195
|
+
def logs(service=:current)
|
196
|
+
Logs.new(service, options).run
|
197
|
+
end
|
198
|
+
|
190
199
|
desc "completion *PARAMS", "Prints words for auto-completion."
|
191
200
|
long_desc Help.text("completion")
|
192
201
|
def completion(*params)
|
data/lib/ufo/core.rb
CHANGED
@@ -9,7 +9,7 @@ module Ufo
|
|
9
9
|
task_definition_path = "#{Ufo.root}/.ufo/output/#{task_definition}.json"
|
10
10
|
unless File.exist?(task_definition_path)
|
11
11
|
puts "ERROR: Unable to find the task definition at #{task_definition_path}.".color(:red)
|
12
|
-
puts "Are you sure you have defined it in ufo/
|
12
|
+
puts "Are you sure you have defined it in .ufo/task_definitions.rb and it has been generated correctly in .ufo/output?".color(:red)
|
13
13
|
puts "If you are calling `ufo deploy` directly, you might want to generate the task definition first with `ufo tasks build`."
|
14
14
|
exit 1
|
15
15
|
end
|
@@ -42,10 +42,10 @@ module Ufo
|
|
42
42
|
return if ENV['TEST']
|
43
43
|
return unless File.exist?("#{Ufo.root}/.ufo/settings.yml") # for rake docs
|
44
44
|
return unless settings # Only load if within Ufo project and there's a settings.yml
|
45
|
-
data = settings
|
46
|
-
if data[
|
47
|
-
puts "Using AWS_PROFILE=#{data[
|
48
|
-
ENV['AWS_PROFILE'] = data[
|
45
|
+
data = settings || {}
|
46
|
+
if data[:aws_profile]
|
47
|
+
puts "Using AWS_PROFILE=#{data[:aws_profile]} from UFO_ENV=#{Ufo.env} in config/settings.yml"
|
48
|
+
ENV['AWS_PROFILE'] = data[:aws_profile]
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|