ufo 4.6.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/docs/_docs/conventions.md +1 -1
  4. data/docs/_docs/extras/codebuild-iam-role.md +1 -1
  5. data/docs/_docs/extras/dockerfile-erb.md +1 -1
  6. data/docs/_docs/extras/ecs-network-mode.md +1 -1
  7. data/docs/_docs/extras/load-balancer.md +1 -1
  8. data/docs/_docs/extras/minimal-deploy-iam.md +1 -1
  9. data/docs/_docs/extras/notification-arns.md +21 -0
  10. data/docs/_docs/extras/redirection-support.md +9 -9
  11. data/docs/_docs/extras/route53-support.md +4 -4
  12. data/docs/_docs/extras/security-groups.md +1 -1
  13. data/docs/_docs/extras/ssl-support.md +5 -5
  14. data/docs/_docs/faq.md +1 -1
  15. data/docs/_docs/helpers.md +7 -5
  16. data/docs/_docs/iam-roles.md +112 -0
  17. data/docs/_docs/install.md +0 -10
  18. data/docs/_docs/more/auto-completion.md +1 -1
  19. data/docs/_docs/more/automated-cleanup.md +1 -1
  20. data/docs/_docs/more/customize-cloudformation.md +1 -1
  21. data/docs/_docs/more/migrations.md +1 -1
  22. data/docs/_docs/more/run-in-pieces.md +1 -1
  23. data/docs/_docs/more/single-task.md +1 -1
  24. data/docs/_docs/more/stuck-cloudformation.md +1 -1
  25. data/docs/_docs/more/why-cloudformation.md +1 -1
  26. data/docs/_docs/next-steps.md +1 -1
  27. data/docs/_docs/quick-start-ec2.md +1 -0
  28. data/docs/_docs/secrets.md +135 -0
  29. data/docs/_docs/settings.md +10 -9
  30. data/docs/_docs/settings/cluster.md +7 -13
  31. data/docs/_docs/settings/manage-security-groups.md +24 -0
  32. data/docs/_docs/settings/network.md +11 -1
  33. data/docs/_docs/structure.md +10 -9
  34. data/docs/_docs/tutorial-ufo-init.md +1 -7
  35. data/docs/_docs/ufo-current.md +1 -1
  36. data/docs/_docs/ufo-env-extra.md +1 -1
  37. data/docs/_docs/ufo-env.md +3 -5
  38. data/docs/_docs/ufo-logs.md +1 -2
  39. data/docs/_docs/ufo-task-params.md +1 -1
  40. data/docs/_docs/upgrading.md +1 -1
  41. data/docs/_docs/upgrading/upgrade4.5.md +2 -2
  42. data/docs/_docs/upgrading/upgrade4.md +2 -2
  43. data/docs/_docs/upgrading/upgrade5.md +19 -0
  44. data/docs/_docs/variables.md +1 -1
  45. data/docs/_includes/cfn-customize.md +4 -4
  46. data/docs/_includes/subnav.html +3 -0
  47. data/docs/_reference/ufo-deploy.md +1 -2
  48. data/docs/_reference/ufo-init.md +15 -16
  49. data/docs/_reference/ufo-logs.md +10 -9
  50. data/docs/_reference/ufo-rollback.md +2 -0
  51. data/docs/_reference/ufo-ship.md +1 -2
  52. data/docs/_reference/ufo-ships.md +1 -2
  53. data/docs/_reference/ufo-tasks-build.md +1 -2
  54. data/docs/articles.md +1 -1
  55. data/docs/quick-start.md +1 -0
  56. data/lib/template/.secrets +5 -0
  57. data/lib/template/.ufo/iam_roles/execution_role.rb +7 -0
  58. data/lib/template/.ufo/iam_roles/task_role.rb +21 -0
  59. data/lib/template/.ufo/settings.yml.tt +1 -0
  60. data/lib/template/.ufo/settings/cfn/default.yml.tt +27 -27
  61. data/lib/template/.ufo/settings/network/default.yml.tt +9 -0
  62. data/lib/template/.ufo/templates/fargate.json.erb +3 -1
  63. data/lib/template/.ufo/templates/main.json.erb +3 -0
  64. data/lib/template/.ufo/variables/base.rb.tt +1 -0
  65. data/lib/ufo.rb +2 -1
  66. data/lib/ufo/autoloader.rb +9 -0
  67. data/lib/ufo/cli.rb +4 -2
  68. data/lib/ufo/command.rb +7 -0
  69. data/lib/ufo/core.rb +1 -9
  70. data/lib/ufo/docker/cleaner.rb +1 -1
  71. data/lib/ufo/dsl.rb +6 -1
  72. data/lib/ufo/dsl/helper.rb +21 -27
  73. data/lib/ufo/dsl/helper/vars.rb +97 -0
  74. data/lib/ufo/dsl/outputter.rb +12 -9
  75. data/lib/ufo/help/init.md +1 -1
  76. data/lib/ufo/init.rb +0 -2
  77. data/lib/ufo/log_group.rb +1 -0
  78. data/lib/ufo/logs.rb +5 -4
  79. data/lib/ufo/role/builder.rb +66 -0
  80. data/lib/ufo/role/dsl.rb +21 -0
  81. data/lib/ufo/role/registry.rb +24 -0
  82. data/lib/ufo/rollback.rb +2 -1
  83. data/lib/ufo/sequence.rb +0 -16
  84. data/lib/ufo/setting/profile.rb +11 -7
  85. data/lib/ufo/setting/security_groups.rb +22 -0
  86. data/lib/ufo/settings.rb +20 -0
  87. data/lib/ufo/stack.rb +24 -24
  88. data/lib/ufo/stack/builder.rb +26 -0
  89. data/lib/ufo/stack/builder/base.rb +54 -0
  90. data/lib/ufo/stack/builder/conditions.rb +23 -0
  91. data/lib/ufo/stack/builder/outputs.rb +24 -0
  92. data/lib/ufo/stack/builder/parameters.rb +45 -0
  93. data/lib/ufo/stack/builder/resources.rb +20 -0
  94. data/lib/ufo/stack/builder/resources/base.rb +4 -0
  95. data/lib/ufo/stack/builder/resources/dns.rb +17 -0
  96. data/lib/ufo/stack/builder/resources/ecs.rb +67 -0
  97. data/lib/ufo/stack/builder/resources/elb.rb +45 -0
  98. data/lib/ufo/stack/builder/resources/listener.rb +42 -0
  99. data/lib/ufo/stack/builder/resources/listener_ssl.rb +16 -0
  100. data/lib/ufo/stack/builder/resources/roles/base.rb +22 -0
  101. data/lib/ufo/stack/builder/resources/roles/execution_role.rb +4 -0
  102. data/lib/ufo/stack/builder/resources/roles/task_role.rb +4 -0
  103. data/lib/ufo/stack/builder/resources/security_group/base.rb +4 -0
  104. data/lib/ufo/stack/builder/resources/security_group/ecs.rb +44 -0
  105. data/lib/ufo/stack/builder/resources/security_group/ecs_rule.rb +25 -0
  106. data/lib/ufo/stack/builder/resources/security_group/elb.rb +57 -0
  107. data/lib/ufo/stack/builder/resources/target_group.rb +39 -0
  108. data/lib/ufo/stack/builder/resources/task_definition.rb +24 -0
  109. data/lib/ufo/stack/builder/resources/task_definition/reconstructor.rb +49 -0
  110. data/lib/ufo/stack/context.rb +41 -48
  111. data/lib/ufo/stack/custom_properties.rb +59 -0
  112. data/lib/ufo/stack/helper.rb +2 -5
  113. data/lib/ufo/stack/template_body.rb +13 -0
  114. data/lib/ufo/task.rb +2 -7
  115. data/lib/ufo/tasks.rb +1 -1
  116. data/lib/ufo/tasks/builder.rb +0 -1
  117. data/lib/ufo/tasks/register.rb +11 -8
  118. data/lib/ufo/template_scope.rb +1 -66
  119. data/lib/ufo/utils/squeezer.rb +24 -0
  120. data/lib/ufo/version.rb +1 -1
  121. data/spec/fixtures/iam_roles/task_role.rb +17 -0
  122. data/spec/lib/role/builder_spec.rb +67 -0
  123. data/spec/lib/role/dsl_spec.rb +12 -0
  124. data/ufo.gemspec +1 -0
  125. metadata +61 -3
  126. data/lib/cfn/stack.yml +0 -283
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e191dff1d9d879e6c78eb6062dbdf8440efcc3a1178125af01aaf807e6632e2c
4
- data.tar.gz: 9656eee37d6155be650e7292692db31fe54797c1cf6ea5d9b8f75917ffb0dc7f
3
+ metadata.gz: 653b01be727b4764ac9c022606359059e6102fe30b202461ffb1ee1665c3d4b6
4
+ data.tar.gz: 97a8fd6af8b07ea9c213e339dd70c23f98a74186c7ba6cd906ea38e7aba39f10
5
5
  SHA512:
6
- metadata.gz: 3769a6dedd2cb9100c4531a820dd9c1b848acb84a58186d546a7825c4d96765b2a1a8239d6883bfa7e346e2577ed4a0b4d95da29375a266bb13637dbcafd6428
7
- data.tar.gz: b5a48692922794b70328f73153c80f09475c91468e1432f4103d56b80bc5e40f10ef92301e711ee1806e41a1be0987b21b5f1c979371a31ae9b72cc1dbf437e6
6
+ metadata.gz: d040994ee8a6b73c151d91a90847dc91ef8c3233b4b9ff65aaf731f9c585ee8093dfb0c2448ce0eddd1b5e823bbafeab5e69495319c3959ac4281b804b404ecf
7
+ data.tar.gz: 2e64ef5b51b100708154b160a089e118e5e06346dbf68a5a69bdc1c0894ce1762d58f4ceb073c0ec6d1c38947662edb9901cbce16ef15df1255faca06e7c7eeb
@@ -3,6 +3,35 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [5.0.1]
7
+ - #109 fix fargate
8
+ - #110 adjust and document `managed_security_groups` setting
9
+
10
+ ## [5.0.0]
11
+ - #104 adjust logs default format to detailed
12
+ - #105 major rework: build cfn template with Ruby instead of ERB for new features
13
+ - #106 secrets support
14
+ - Codified iam_role support with .ufo/iam_roles files: custom and managed policy support. The ECS Task definition was moved into CloudFormation to support this.
15
+ - Allow per service security groups
16
+ - Conventional .ufo/settings cfn and network files based on ufo env
17
+ - Managed_security_groups_enabled=false setting.yml
18
+ - Project custom helper methods support
19
+ - Add image-override option for ufo ship
20
+ - Notification ARN stack cloudformation support for compliance reasons
21
+ - update cfn/default to use CamelCase. maintain backward compatibility with underscore. through encourage users to upgrade to CamelCase. There's less mental translation overhead.
22
+ - remove pretty option: always pretty
23
+
24
+ ## [4.6.3]
25
+ - #101 improve ufo init help
26
+
27
+ ## [4.6.2]
28
+ - define texit_on_failure to remove Thor deprecation warning
29
+
30
+ ## [4.6.1]
31
+ - #93 Fix firelens functionality
32
+ - #97 ufo logs --filter-pattern option
33
+ - #98 fix env vars helper to allow surrounding quotes
34
+
6
35
  ## [4.6.0]
7
36
  - #95 Introduce: ufo logs command. Tail logs.
8
37
  - #96 docs and options
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Conventions
3
- nav_order: 19
3
+ nav_order: 22
4
4
  ---
5
5
 
6
6
  Ufo uses a set of naming conventions. This helps enforce some best practices and also allows the ufo commands to be concise. You can override or bypass the conventions easily.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: CodeBuild IAM Role
3
- nav_order: 32
3
+ nav_order: 35
4
4
  ---
5
5
 
6
6
  Note, the `/tmp/ecs-deploy-policy.json` policy is available at [Minimal Deploy IAM]({% link _docs/extras/minimal-deploy-iam.md %}).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Dynamic Dockerfile.erb
3
- nav_order: 33
3
+ nav_order: 36
4
4
  ---
5
5
 
6
6
  Sometimes you may need a little more dynamic control of your Dockerfile. For these cases, ufo supports dynamically creating a Dockerfile from a Dockerfile.erb. If Dockerfile.erb exists, ufo uses it to generate a Dockerfile as a part of the build process. These means that you should update the source Dockerfile.erb instead, as the Dockerfile will be overwritten. If Dockerfile.erb does not exist, then ufo will use the Dockerfile instead.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: ECS Network Mode
3
- nav_order: 27
3
+ nav_order: 30
4
4
  ---
5
5
 
6
6
  ## Pros and Cons: bridge network mode
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Load Balancer Support
3
- nav_order: 25
3
+ nav_order: 28
4
4
  ---
5
5
 
6
6
  Ufo can automatically create a load balancer and associate it with an ECS service. The options:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Minimal Deploy IAM Policy
3
- nav_order: 31
3
+ nav_order: 34
4
4
  ---
5
5
 
6
6
  The IAM user you use to run the `ufo ship` command needs a minimal set of IAM policies in order to deploy to ECS. Here is a table of the baseline services needed:
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Notification ARNs
3
+ categories: extras
4
+ nav_order: 37
5
+ ---
6
+
7
+ You can specific notification arns for CloudFormation stack related events with [configs/settings.yml]({% link _docs/settings.md %}). This may be useful for compliance purposes.
8
+
9
+ ## Example
10
+
11
+ configs/settings.yml
12
+
13
+ ```yaml
14
+ base:
15
+ notification_arns:
16
+ - arn:aws:sns:us-west-2:112233445566:my-sns-topic1
17
+ ```
18
+
19
+ This will set the `notification_arns` option as the CloudFormation stack created by `ufo ship`.
20
+
21
+ {% include prev_next.md %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Redirection Support
3
- nav_order: 30
3
+ nav_order: 33
4
4
  ---
5
5
 
6
6
  ## Application Load Balancers
@@ -8,15 +8,15 @@ nav_order: 30
8
8
  If you are using an Application Load Balancer you can configure redirection by editing the default actions of the regular listener that is set up by ufo. This assumes you have set up [SSL Support]({% link _docs/extras/ssl-support.md %}). Here's an example that redirects http to https with a 302 http status code:
9
9
 
10
10
  ```
11
- listener:
12
- port: 80
11
+ Listener:
12
+ Port: 80
13
13
  # ...
14
- default_actions:
15
- - type: redirect
16
- redirect_config:
17
- protocol: HTTPS
18
- status_code: HTTP_302 # HTTP_301 and HTTP_302 are valid
19
- port: 443
14
+ DefaultActions:
15
+ - Type: redirect
16
+ RedirectConfig:
17
+ Protocol: HTTPS
18
+ StatusCode: HTTP_302 # HTTP_301 and HTTP_302 are valid
19
+ Port: 443
20
20
  ```
21
21
 
22
22
 
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  title: Route53 Support
3
- nav_order: 29
3
+ nav_order: 32
4
4
  ---
5
5
 
6
6
  Ufo can create a "pretty" route53 record and set it's value to the created ELB DNS name. This is done by configuring the `.ufo/settings/cfn/default.yml` file. Example:
7
7
 
8
8
  ```yaml
9
- dns:
10
- name: "{stack_name}.mydomain.com."
11
- hosted_zone_name: mydomain.com. # dont forget the trailing period
9
+ Dns:
10
+ Name: "{stack_name}.mydomain.com."
11
+ HostedZoneName: mydomain.com. # dont forget the trailing period
12
12
  ```
13
13
 
14
14
  The `{stack_name}` variable gets substituted with the CloudFormation stack name launched by ufo. So for example:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Security Groups
3
- nav_order: 26
3
+ nav_order: 29
4
4
  ---
5
5
 
6
6
  Ufo creates and manages two security groups. One for the ELB and one for the ECS tasks.
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  title: SSL Support
3
- nav_order: 28
3
+ nav_order: 31
4
4
  ---
5
5
 
6
6
  You can configure SSL support by uncomment the `listener_ssl` option in `.ufo/settings/cfn/default.yml`. Here's an example:
7
7
 
8
8
  ```
9
- listener_ssl:
10
- port: 443
11
- certificates:
12
- - certificate_arn: arn:aws:acm:us-east-1:111111111111:certificate/11111111-2222-3333-4444-555555555555
9
+ ListenerSsl:
10
+ Port: 443
11
+ Certificates:
12
+ - CertificateArn: arn:aws:acm:us-east-1:111111111111:certificate/11111111-2222-3333-4444-555555555555
13
13
  ```
14
14
 
15
15
  For the certificate arn, you will need to create a certificate with AWS ACM. To do so, you can follow these instructions: [Request a Public Certificate
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: FAQ
3
- nav_order: 45
3
+ nav_order: 50
4
4
  ---
5
5
 
6
6
  **Q: Is AWS ECS Fargate supported?**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Helpers
3
- nav_order: 18
3
+ nav_order: 19
4
4
  ---
5
5
 
6
6
  The `task_definitions.rb` file has access to helper methods. These helper methods provide useful contextual information about the project.
@@ -9,10 +9,12 @@ For example, one of the helper methods provides the exposed port in the Dockerfi
9
9
 
10
10
  Helper | Description
11
11
  ------------- | -------------
12
- full\_image\_name| The full docker image name that ufo builds. The "base" portion of the docker image name is defined in `settings.yml`. For example, the base portion is `tongueroo/demo-ufo` and the full image name is `tongueroo/demo-ufo:ufo-[timestamp]-[sha]`. The base name does not include the generated Docker tag, which contains a timestamp and git sha of the project.
13
- dockerfile\_port| Exposed port extracted from the Dockerfile of the project. 
14
- env_vars(text)| This method takes a block of text that contains the env values in `key=value` format and converts that block of text to the proper task definition JSON format.
15
- env_file(path)| This method takes a `.env` file which contains a simple key-value list of environment variables and converts the list to the proper task definition JSON format.
12
+ full\_image\_name | The full docker image name that ufo builds. The "base" portion of the docker image name is defined in `settings.yml`. For example, the base portion is `tongueroo/demo-ufo` and the full image name is `tongueroo/demo-ufo:ufo-[timestamp]-[sha]`. The base name does not include the generated Docker tag, which contains a timestamp and git sha of the project.
13
+ dockerfile\_port | Exposed port extracted from the Dockerfile of the project.
14
+ env_vars(text) | This method takes a block of text that contains the env values in `key=value` format and converts that block of text to the proper task definition JSON format.
15
+ env_file(path) | This method takes a `.env` file which contains a simple key-value list of environment variables and converts the list to the proper task definition JSON format.
16
+ secrets_vars(text) | This method takes a block of text that contains the secrets values in `key=value` format and converts that block of text to the proper task definition JSON format.
17
+ secrets_file(path) | This method takes a `.secrets` file which contains a simple key-value list of environment variables and converts the list to the proper task definition JSON format.
16
18
  task_definition_name | The name of the task_definition. So if the code looks like this `task_definition "demo-web" do`, the task_definition_name is "demo-web".
17
19
 
18
20
  To call the helper in task_definitions.rb you must add `helper.` in front. So `full_image_name` is called via `helper.full_image_name`.
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Task Definition IAM Roles
3
+ nav_order: 21
4
+ ---
5
+
6
+ ## What are ECS IAM Roles?
7
+
8
+ For ECS Task Definitions, you can assign it 2 IAM roles: 1) taskRoleArn and 2) executionRoleArn. It's usually defined in the JSON structure like so:
9
+
10
+ ```json
11
+ {
12
+ "family": "..",
13
+ "taskRoleArn": "...",
14
+ "executionRoleArn": "...",
15
+ "containerDefinitions": [
16
+ ...
17
+ ]
18
+ }
19
+ ```
20
+
21
+ Here's a table that explains the difference between the 2 IAM roles.
22
+
23
+ Name | Purpose
24
+ --- | ---
25
+ taskRoleArn | This is the role that the ECS task itself uses. So this is what IAM permissions your application has access to. Think about it as the "container role".
26
+ executionRoleArn | This is the role that the EC2 instance host uses. This allows the EC2 instance to pull from the ECR registry. Think about it as the "host role".
27
+
28
+ ## How to Assign IAM Roles with UFO
29
+
30
+ You can assign an IAM role to the ECS Task definition in ways:
31
+
32
+ 1. IAM Role with Code (UFO Managed)
33
+ 2. Precreated IAM Role
34
+
35
+ ## IAM Role with Code (UFO Managed)
36
+
37
+ UFO can automatically create the IAM and assign it to the task definition. You create these files so UFO will know to create and manage the IAM roles.
38
+
39
+ .ufo/iam_roles/execution_role.rb
40
+ .ufo/iam_roles/task_role.rb
41
+
42
+ ### Example 1
43
+
44
+ You then use a DSL to create the IAM roles. Here are examples:
45
+
46
+ .ufo/iam_roles/execution_role.rb
47
+
48
+ ```ruby
49
+ managed_iam_policy("AmazonSSMReadOnlyAccess")
50
+ managed_iam_policy("SecretsManagerReadWrite")
51
+ managed_iam_policy("service-role/AmazonECSTaskExecutionRolePolicy")
52
+ ```
53
+
54
+ .ufo/iam_roles/task_role.rb
55
+
56
+ ```ruby
57
+ iam_policy("AmazonS3ReadOnlyAccess",
58
+ Action: [
59
+ "s3:Get*",
60
+ "s3:List*"
61
+ ],
62
+ Effect: "Allow",
63
+ Resource: "*"
64
+ )
65
+ iam_policy("CloudwatchWrite",
66
+ Action: [
67
+ "cloudwatch:PutMetricData",
68
+ ],
69
+ Effect: "Allow",
70
+ Resource: "*"
71
+ )
72
+ ```
73
+
74
+ ### Example 2
75
+
76
+ You can use the `managed_iam_policy` and `iam_policy` together. You can also group multiple statements in the `iam_policy` declaration.
77
+
78
+ .ufo/iam_roles/task_role.rb
79
+
80
+ ```ruby
81
+ managed_iam_policy("AmazonSSMManagedInstanceCore")
82
+
83
+ iam_policy("custom-policy", [
84
+ {
85
+ Action: "ecs:UpdateContainerInstancesState",
86
+ Resource: "*",
87
+ Effect: "Allow"
88
+ },
89
+ {
90
+ Action: "sns:Publish",
91
+ Resource: "*",
92
+ Effect: "Allow"
93
+ }
94
+ ])
95
+ ```
96
+
97
+ ## Pre-Created IAM Role
98
+
99
+ You can also assign the task definition `executionRoleArn` with pre-created IAM roles. It looks something like this in the `.ufo/templates/main.json.erb` file:
100
+
101
+ ```json
102
+ {
103
+ "family": "<%= @family %>",
104
+ "taskRoleArn": "arn:aws:iam::112233445566:role/pre-created-iam-role",
105
+ "executionRoleArn": "arn:aws:iam::112233445566:role/pre-created-iam-role",
106
+ "containerDefinitions": [
107
+ ...
108
+ ]
109
+ }
110
+ ```
111
+
112
+ {% include prev_next.md %}
@@ -17,16 +17,6 @@ Or you can add ufo to your Gemfile in your project if you are working with a rub
17
17
  gem "ufo"
18
18
  {% endhighlight %}
19
19
 
20
- ## Install with Bolts Toolbelt
21
-
22
- If you want to quickly install ufo without having to worry about ufo's dependencies you can install the Bolts Toolbelt which has ufo included.
23
-
24
- ```sh
25
- brew cask install boltopslabs/software/bolts
26
- ```
27
-
28
- For more information about the Bolts Toolbelt or to get an installer for another operating system visit: [https://boltops.com/toolbelt](https://boltops.com/toolbelt)
29
-
30
20
  ## Dependencies
31
21
 
32
22
  * Docker: You will need a working version of [Docker](https://docs.docker.com/engine/installation/) installed as ufo shells out and calls the `docker` command.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Auto Completion
3
- nav_order: 44
3
+ nav_order: 49
4
4
  ---
5
5
 
6
6
  Ufo supports bash auto-completion. To set it up add the following to your `~/.profile` or `.bashrc`:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Automated Clean Up
3
- nav_order: 43
3
+ nav_order: 48
4
4
  ---
5
5
 
6
6
  Ufo can be configured to automatically clean old images from the ECR registry after the deploy completes by configuring your [settings.yml]({% link _docs/settings.md %}) file like so:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Customize CloudFormation
3
- nav_order: 38
3
+ nav_order: 43
4
4
  ---
5
5
 
6
6
  Under the hood, ufo creates most of the required resources with a CloudFormation stack. This includes the ELB, Target Group, Listener, Security Groups, ECS Service, and Route 53 records. You might need to customize these resources. Here are the ways to customize the resources that ufo creates.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Database Migrations
3
- nav_order: 42
3
+ nav_order: 47
4
4
  ---
5
5
 
6
6
  A common task is to run database migrations with newer code before deploying the code. This is easily achieved with the `ufo task` command. Here's an example:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Run in Pieces
3
- nav_order: 40
3
+ nav_order: 45
4
4
  ---
5
5
 
6
6
  The `ufo ship` command goes through a few stages:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Run Single Task
3
- nav_order: 41
3
+ nav_order: 46
4
4
  ---
5
5
 
6
6
  Sometimes you do not want to run a long running `service` but a one time task. Running Rails migrations are an example of a one off task. Here is an example of how you would run a one time task.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Stuck CloudFormation
3
- nav_order: 39
3
+ nav_order: 44
4
4
  ---
5
5
 
6
6
  The CloudFormation stack update or creation can get stuck in a `*_IN_PROGRESS` state for a very long time, like more than an hour. This happens when you deploy an ECS service that fails to stabilize. Usually, this is an error with the Docker container failing to start up successfully.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Why CloudFormation
3
- nav_order: 37
3
+ nav_order: 42
4
4
  ---
5
5
 
6
6
  Version 3 of ufo was a simpler implementation and did not make use of CloudFormation to create the ECS service. In version 4, ufo uses CloudFormation to create the ECS Service. This is because ufo became more powerful. Notably, support for Load Balancers was added. With this power, also came added complexity. So the complexity was push onto CloudFormation. Hence, ECS service is implemented as CloudFormation resource in version 4.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Next Steps
3
- nav_order: 47
3
+ nav_order: 52
4
4
  ---
5
5
 
6
6
  This concludes the tutorial guide for ufo. Hopefully you are now more comfortable with ufo's basic usage, concepts, and have a feel for the workflow.