ufo 4.5.8 → 4.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +2 -0
  4. data/docs/_docs/conventions.md +1 -1
  5. data/docs/_docs/extras/codebuild-iam-role.md +2 -2
  6. data/docs/_docs/extras/dockerfile-erb.md +2 -2
  7. data/docs/_docs/extras/ecs-network-mode.md +2 -2
  8. data/docs/_docs/extras/load-balancer.md +2 -2
  9. data/docs/_docs/extras/minimal-deploy-iam.md +2 -2
  10. data/docs/_docs/extras/redirection-support.md +2 -2
  11. data/docs/_docs/extras/route53-support.md +2 -2
  12. data/docs/_docs/extras/security-groups.md +2 -2
  13. data/docs/_docs/extras/ssl-support.md +2 -2
  14. data/docs/_docs/faq.md +2 -2
  15. data/docs/_docs/helpers.md +1 -1
  16. data/docs/_docs/install.md +1 -1
  17. data/docs/_docs/more/auto-completion.md +2 -2
  18. data/docs/_docs/more/automated-cleanup.md +2 -2
  19. data/docs/_docs/more/customize-cloudformation.md +2 -2
  20. data/docs/_docs/more/migrations.md +2 -2
  21. data/docs/_docs/more/run-in-pieces.md +2 -2
  22. data/docs/_docs/more/single-task.md +2 -2
  23. data/docs/_docs/more/stuck-cloudformation.md +2 -2
  24. data/docs/_docs/more/why-cloudformation.md +2 -2
  25. data/docs/_docs/next-steps.md +2 -2
  26. data/docs/_docs/quick-start-ec2.md +1 -1
  27. data/docs/_docs/settings.md +1 -1
  28. data/docs/_docs/settings/aws_profile.md +1 -1
  29. data/docs/_docs/settings/cfn.md +1 -1
  30. data/docs/_docs/settings/cluster.md +1 -1
  31. data/docs/_docs/settings/network.md +1 -1
  32. data/docs/_docs/ssl_errors.md +1 -2
  33. data/docs/_docs/structure.md +1 -1
  34. data/docs/_docs/tutorial-ufo-docker-build.md +1 -1
  35. data/docs/_docs/tutorial-ufo-init.md +1 -1
  36. data/docs/_docs/tutorial-ufo-ship.md +1 -1
  37. data/docs/_docs/tutorial-ufo-ships.md +1 -1
  38. data/docs/_docs/tutorial-ufo-tasks-build.md +1 -1
  39. data/docs/_docs/tutorial.md +1 -1
  40. data/docs/_docs/ufo-current.md +2 -2
  41. data/docs/_docs/ufo-env-extra.md +2 -2
  42. data/docs/_docs/ufo-env.md +2 -2
  43. data/docs/_docs/ufo-logs.md +50 -0
  44. data/docs/_docs/ufo-task-params.md +2 -2
  45. data/docs/_docs/upgrading.md +2 -2
  46. data/docs/_docs/upgrading/upgrade4.5.md +2 -2
  47. data/docs/_docs/upgrading/upgrade4.md +2 -2
  48. data/docs/_docs/variables.md +1 -1
  49. data/docs/_includes/subnav.html +1 -0
  50. data/docs/_reference/ufo-logs.md +40 -0
  51. data/docs/articles.md +2 -2
  52. data/docs/docs.md +1 -1
  53. data/docs/quick-start.md +1 -1
  54. data/docs/reference.md +1 -0
  55. data/lib/ufo/aws_service.rb +2 -0
  56. data/lib/ufo/cli.rb +10 -0
  57. data/lib/ufo/core.rb +5 -5
  58. data/lib/ufo/dsl/helper.rb +13 -1
  59. data/lib/ufo/help/logs.md +10 -0
  60. data/lib/ufo/logs.rb +56 -0
  61. data/lib/ufo/tasks/register.rb +11 -8
  62. data/lib/ufo/version.rb +1 -1
  63. data/spec/fixtures/mocks/logs/awslogs.json +70 -0
  64. data/spec/fixtures/mocks/logs/no-awslogs.json +70 -0
  65. data/spec/lib/logs_spec.rb +55 -0
  66. data/ufo.gemspec +2 -0
  67. metadata +41 -4
@@ -11,4 +11,4 @@ In the next sections, we'll walk through using ufo in detail. We will ufo-ify a
11
11
 
12
12
  Let's start!
13
13
 
14
- {% include prev_next.md %}
14
+ {% include prev_next.md %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Ufo Current
3
- nav_order: 22
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 %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: UFO_ENV_EXTRA
3
- nav_order: 21
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 %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: UFO_ENV
3
- nav_order: 20
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: 23
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 %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Upgrading
3
- nav_order: 33
3
+ nav_order: 34
4
4
  ---
5
5
 
6
6
  <ul>
@@ -10,4 +10,4 @@ nav_order: 33
10
10
  {% endfor %}
11
11
  </ul>
12
12
 
13
- {% include prev_next.md %}
13
+ {% include prev_next.md %}
@@ -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: 34
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: 35
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 %}
@@ -52,4 +52,4 @@ When `ufo ship` is ran with `UFO_ENV=development` the `variables/development.rb`
52
52
  ])
53
53
  ```
54
54
 
55
- {% include prev_next.md %}
55
+ {% include prev_next.md %}
@@ -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>
@@ -0,0 +1,40 @@
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
+ [--filter-pattern=FILTER_PATTERN] # The filter pattern to use. If not provided, all the events are matched
35
+ [--verbose], [--no-verbose]
36
+ [--mute], [--no-mute]
37
+ [--noop], [--no-noop]
38
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
39
+ ```
40
+
data/docs/articles.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Articles
3
- nav_order: 45
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
@@ -26,4 +26,4 @@ You might like these articles:
26
26
 
27
27
  Also, the [UFO Tutorial Docs]({% link _docs/tutorial.md %}) provide a detail walkthrough on how each UFO step works.
28
28
 
29
- {% include prev_next.md %}
29
+ {% include prev_next.md %}
data/docs/quick-start.md CHANGED
@@ -129,4 +129,4 @@ Here's an article that compares the cost of ECS Fargate: [Heroku vs ECS Fargate
129
129
 
130
130
  {% include repo_push_access.md %}
131
131
 
132
- {% include prev_next.md %}
132
+ {% include prev_next.md %}
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 %})
@@ -5,6 +5,8 @@ require "aws-sdk-ecr"
5
5
  require "aws-sdk-ecs"
6
6
  require "aws-sdk-elasticloadbalancingv2"
7
7
 
8
+ require "aws_mfa_secure/ext/aws" # add MFA support
9
+
8
10
  module Ufo
9
11
  module AwsService
10
12
  def cloudformation
data/lib/ufo/cli.rb CHANGED
@@ -187,6 +187,16 @@ 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
+ option :filter_pattern, desc: "The filter pattern to use. If not provided, all the events are matched"
196
+ def logs(service=:current)
197
+ Logs.new(service, options).run
198
+ end
199
+
190
200
  desc "completion *PARAMS", "Prints words for auto-completion."
191
201
  long_desc Help.text("completion")
192
202
  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/template_definitions.rb and it has been generated correctly in .ufo/output?".color(:red)
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[Ufo.env] || {}
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"]
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
 
@@ -30,7 +30,9 @@ module Ufo
30
30
  def env_vars(text)
31
31
  lines = filtered_lines(text)
32
32
  lines.map do |line|
33
- key,*value = line.strip.split("=").map {|x| x.strip}
33
+ key,*value = line.strip.split("=").map do |x|
34
+ remove_surrounding_quotes(x.strip)
35
+ end
34
36
  value = value.join('=')
35
37
  {
36
38
  name: key,
@@ -39,6 +41,16 @@ module Ufo
39
41
  end
40
42
  end
41
43
 
44
+ def remove_surrounding_quotes(s)
45
+ if s =~ /^"/ && s =~ /"$/
46
+ s.sub(/^["]/, '').gsub(/["]$/,'') # remove surrounding double quotes
47
+ elsif s =~ /^'/ && s =~ /'$/
48
+ s.sub(/^[']/, '').gsub(/[']$/,'') # remove surrounding single quotes
49
+ else
50
+ s
51
+ end
52
+ end
53
+
42
54
  def filtered_lines(text)
43
55
  lines = text.split("\n")
44
56
  # remove comment at the end of the line
@@ -0,0 +1,10 @@
1
+ ## Examples
2
+
3
+ ufo logs demo-web
4
+
5
+ If you have a current service name set.
6
+
7
+ ufo current --service demo-web
8
+ ufo logs # follow by default
9
+ ufo logs --no-follow
10
+ ufo logs --format detailed # to show stream too
data/lib/ufo/logs.rb ADDED
@@ -0,0 +1,56 @@
1
+ require "aws-logs"
2
+
3
+ module Ufo
4
+ class Logs < Base
5
+ include AwsService
6
+
7
+ delegate :service, to: :info
8
+
9
+ def run
10
+ log = find_log_group_name
11
+ puts "Showing logs for log group: #{log["awslogs-group"]} and stream prefix #{log["awslogs-stream-prefix"]}"
12
+ if log
13
+ cloudwatch_tail(log)
14
+ else
15
+ puts "Unable to find log group for service: #{service.service_name}"
16
+ end
17
+ end
18
+
19
+ def find_log_group_name
20
+ resp = ecs.describe_task_definition(task_definition: info.service.task_definition)
21
+
22
+ container_definitions = resp.task_definition.container_definitions
23
+
24
+ unless container_definitions.size == 1
25
+ puts "ERROR: ufo logs command only supports 1 container definition in the ECS task definition".color(:red)
26
+ return
27
+ end
28
+
29
+ definition = container_definitions.first
30
+ log_conf = definition.log_configuration
31
+
32
+ if log_conf && log_conf.log_driver == "awslogs"
33
+ # options["awslogs-group"]
34
+ # options["awslogs-region"]
35
+ # options["awslogs-stream-prefix"]
36
+ log_conf.options
37
+ else
38
+ puts "Only supports awslogs driver. Detected log_driver: #{log_conf.log_driver}"
39
+ return
40
+ end
41
+ end
42
+
43
+ def cloudwatch_tail(log={})
44
+ o = {
45
+ log_group_name: log["awslogs-group"],
46
+ log_stream_name_prefix: log["awslogs-stream-prefix"],
47
+ since: @options[:since] || "10m", # by default, search only 10 mins in the past
48
+ follow: @options[:follow],
49
+ format: @options[:format],
50
+ }
51
+ o[:filter_pattern] = @options[:filter_pattern] if @options[:filter_pattern]
52
+ cw_tail = AwsLogs::Tail.new(o)
53
+ cw_tail.run
54
+ end
55
+ end
56
+ end
@@ -70,15 +70,18 @@ module Ufo
70
70
 
71
71
  definitions = data[:container_definitions]
72
72
  definitions.each_with_index do |definition, i|
73
- next unless definition[:log_configuration]
74
- options = definition[:log_configuration][:options]
75
- next unless options
73
+ next unless definition[:log_configuration] || definition[:firelens_configuration]
74
+ { log_configuration: 'logConfiguration',
75
+ firelens_configuration: 'firelensConfiguration' }.each_pair do |key, value|
76
76
 
77
- # LogConfiguration options do not get transformed and keep their original
78
- # structure:
79
- # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Types/ContainerDefinition.html
80
- original_definition = original_data["containerDefinitions"][i]
81
- definition[:log_configuration][:options] = original_definition["logConfiguration"]["options"]
77
+ next unless definition.dig(key, :options)
78
+
79
+ # LogConfiguration and firelensConfiguration options do not get transformed and
80
+ # keep their original structure:
81
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Types/ContainerDefinition.html
82
+ original_definition = original_data["containerDefinitions"][i]
83
+ definition[key][:options] = original_definition[value]["options"]
84
+ end
82
85
  end
83
86
 
84
87
  data
data/lib/ufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "4.5.8"
2
+ VERSION = "4.6.1"
3
3
  end
@@ -0,0 +1,70 @@
1
+ {
2
+ "task_definition": {
3
+ "task_definition_arn": "arn:aws:ecs:us-west-2:112233445566:task-definition/demo-web:1",
4
+ "container_definitions": [
5
+ {
6
+ "name": "web",
7
+ "image": "112233445566.dkr.ecr.us-west-2.amazonaws.com/demo/sinatra:ufo-2020-01-16T22-56-26-a28378e80",
8
+ "cpu": 256,
9
+ "memory": 1024,
10
+ "memory_reservation": 1024,
11
+ "port_mappings": [
12
+ {
13
+ "container_port": 4567,
14
+ "host_port": 4567,
15
+ "protocol": "tcp"
16
+ }
17
+ ],
18
+ "essential": true,
19
+ "command": [
20
+ "bin/web"
21
+ ],
22
+ "environment": [],
23
+ "log_configuration": {
24
+ "log_driver": "awslogs",
25
+ "options": {
26
+ "awslogs-group": "ecs/demo-web",
27
+ "awslogs-region": "us-west-2",
28
+ "awslogs-stream-prefix": "demo"
29
+ }
30
+ }
31
+ }
32
+ ],
33
+ "family": "demo-web",
34
+ "task_role_arn": "arn:aws:iam::112233445566:role/demo",
35
+ "network_mode": "awsvpc",
36
+ "revision": 1,
37
+ "volumes": [
38
+ ],
39
+ "status": "ACTIVE",
40
+ "requires_attributes": [
41
+ {
42
+ "name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
43
+ },
44
+ {
45
+ "name": "com.amazonaws.ecs.capability.ecr-auth"
46
+ },
47
+ {
48
+ "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
49
+ },
50
+ {
51
+ "name": "com.amazonaws.ecs.capability.docker-remote-api.1.21"
52
+ },
53
+ {
54
+ "name": "com.amazonaws.ecs.capability.task-iam-role"
55
+ },
56
+ {
57
+ "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
58
+ },
59
+ {
60
+ "name": "ecs.capability.task-eni"
61
+ }
62
+ ],
63
+ "placement_constraints": [
64
+
65
+ ],
66
+ "compatibilities": [
67
+ "EC2"
68
+ ]
69
+ }
70
+ }