ufo 4.6.3 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) 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/secrets.md +135 -0
  28. data/docs/_docs/settings.md +10 -9
  29. data/docs/_docs/settings/cluster.md +7 -13
  30. data/docs/_docs/settings/manage-security-groups.md +24 -0
  31. data/docs/_docs/settings/network.md +11 -1
  32. data/docs/_docs/structure.md +10 -9
  33. data/docs/_docs/tutorial-ufo-init.md +1 -7
  34. data/docs/_docs/ufo-current.md +1 -1
  35. data/docs/_docs/ufo-env-extra.md +1 -1
  36. data/docs/_docs/ufo-env.md +3 -5
  37. data/docs/_docs/ufo-logs.md +1 -2
  38. data/docs/_docs/ufo-task-params.md +1 -1
  39. data/docs/_docs/upgrading.md +1 -1
  40. data/docs/_docs/upgrading/upgrade4.5.md +2 -2
  41. data/docs/_docs/upgrading/upgrade4.md +2 -2
  42. data/docs/_docs/upgrading/upgrade5.md +19 -0
  43. data/docs/_docs/variables.md +1 -1
  44. data/docs/_includes/cfn-customize.md +18 -4
  45. data/docs/_includes/footer.html +6 -5
  46. data/docs/_includes/subnav.html +3 -0
  47. data/docs/_reference/ufo-deploy.md +1 -2
  48. data/docs/_reference/ufo-init.md +14 -15
  49. data/docs/_reference/ufo-logs.md +1 -1
  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/lib/template/.secrets +5 -0
  56. data/lib/template/.ufo/iam_roles/execution_role.rb +7 -0
  57. data/lib/template/.ufo/iam_roles/task_role.rb +21 -0
  58. data/lib/template/.ufo/settings.yml.tt +1 -0
  59. data/lib/template/.ufo/settings/cfn/default.yml.tt +27 -27
  60. data/lib/template/.ufo/settings/network/default.yml.tt +9 -0
  61. data/lib/template/.ufo/templates/fargate.json.erb +3 -1
  62. data/lib/template/.ufo/templates/main.json.erb +3 -0
  63. data/lib/template/.ufo/variables/base.rb.tt +1 -0
  64. data/lib/ufo.rb +2 -1
  65. data/lib/ufo/autoloader.rb +9 -0
  66. data/lib/ufo/cli.rb +3 -2
  67. data/lib/ufo/core.rb +1 -9
  68. data/lib/ufo/docker/cleaner.rb +1 -1
  69. data/lib/ufo/dsl.rb +6 -1
  70. data/lib/ufo/dsl/helper.rb +19 -37
  71. data/lib/ufo/dsl/helper/vars.rb +97 -0
  72. data/lib/ufo/dsl/outputter.rb +12 -9
  73. data/lib/ufo/ecr/auth.rb +10 -21
  74. data/lib/ufo/init.rb +0 -2
  75. data/lib/ufo/log_group.rb +1 -0
  76. data/lib/ufo/role/builder.rb +66 -0
  77. data/lib/ufo/role/dsl.rb +21 -0
  78. data/lib/ufo/role/registry.rb +24 -0
  79. data/lib/ufo/rollback.rb +2 -1
  80. data/lib/ufo/sequence.rb +0 -16
  81. data/lib/ufo/setting/profile.rb +22 -8
  82. data/lib/ufo/setting/security_groups.rb +22 -0
  83. data/lib/ufo/settings.rb +20 -0
  84. data/lib/ufo/stack.rb +24 -24
  85. data/lib/ufo/stack/builder.rb +26 -0
  86. data/lib/ufo/stack/builder/base.rb +54 -0
  87. data/lib/ufo/stack/builder/conditions.rb +23 -0
  88. data/lib/ufo/stack/builder/outputs.rb +24 -0
  89. data/lib/ufo/stack/builder/parameters.rb +45 -0
  90. data/lib/ufo/stack/builder/resources.rb +20 -0
  91. data/lib/ufo/stack/builder/resources/base.rb +4 -0
  92. data/lib/ufo/stack/builder/resources/dns.rb +17 -0
  93. data/lib/ufo/stack/builder/resources/ecs.rb +71 -0
  94. data/lib/ufo/stack/builder/resources/elb.rb +45 -0
  95. data/lib/ufo/stack/builder/resources/listener.rb +42 -0
  96. data/lib/ufo/stack/builder/resources/listener_ssl.rb +16 -0
  97. data/lib/ufo/stack/builder/resources/roles/base.rb +22 -0
  98. data/lib/ufo/stack/builder/resources/roles/execution_role.rb +4 -0
  99. data/lib/ufo/stack/builder/resources/roles/task_role.rb +4 -0
  100. data/lib/ufo/stack/builder/resources/security_group/base.rb +4 -0
  101. data/lib/ufo/stack/builder/resources/security_group/ecs.rb +44 -0
  102. data/lib/ufo/stack/builder/resources/security_group/ecs_rule.rb +25 -0
  103. data/lib/ufo/stack/builder/resources/security_group/elb.rb +57 -0
  104. data/lib/ufo/stack/builder/resources/target_group.rb +39 -0
  105. data/lib/ufo/stack/builder/resources/task_definition.rb +24 -0
  106. data/lib/ufo/stack/builder/resources/task_definition/reconstructor.rb +49 -0
  107. data/lib/ufo/stack/context.rb +41 -48
  108. data/lib/ufo/stack/custom_properties.rb +59 -0
  109. data/lib/ufo/stack/helper.rb +2 -5
  110. data/lib/ufo/stack/template_body.rb +13 -0
  111. data/lib/ufo/task.rb +2 -7
  112. data/lib/ufo/tasks.rb +1 -1
  113. data/lib/ufo/tasks/builder.rb +0 -1
  114. data/lib/ufo/template_scope.rb +1 -66
  115. data/lib/ufo/utils/squeezer.rb +24 -0
  116. data/lib/ufo/version.rb +1 -1
  117. data/spec/fixtures/iam_roles/task_role.rb +17 -0
  118. data/spec/lib/ecr_auth_spec.rb +32 -20
  119. data/spec/lib/role/builder_spec.rb +67 -0
  120. data/spec/lib/role/dsl_spec.rb +12 -0
  121. data/ufo.gemspec +2 -1
  122. metadata +66 -8
  123. data/lib/cfn/stack.yml +0 -283
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d21bb7586b951ad481495696dc9c1e9422544dca617a499d732572eb771f980
4
- data.tar.gz: e4bb2a216b12b683267700525e5bc91e0d1232c1ce0e2b9a8b770a73a11da6a9
3
+ metadata.gz: 320bf4465ea909e6aad615ffe8c99402a8e552745e202e54bfb1fa9161f8a06a
4
+ data.tar.gz: 5fa11f5e7c963e195910423bdb2114c1c9feee76c4951836a51bb7b4ff848851
5
5
  SHA512:
6
- metadata.gz: 12ec77a43798cc2689e0a73a8403c4b2e5a283b8f91a8fd7201b5a5d5d1811ec392aa345d5f0b23a01a7ad65df51ff726506e8a7d403a0574aedc0f23cb3ec75
7
- data.tar.gz: 8ad9032a96b45cf5c79757eb4df295cc4acbb38b51687faa4abde46290bc8eaa901a38de1fd0049284671fddeaa1558b1915c53bf7977d5000dfc8187f519f4f
6
+ metadata.gz: 76e02045c71f002b9a9adeea046470d03a6b3466fafb9733db71da1a34b73b2565f1a5259e0fa82417965367b4ada63f4b967c92f976d96ef863ce4542053411
7
+ data.tar.gz: f1761830ab51ee8279fc9ad83bba0e91d9a6cb25499d14af0dcba3b14cf039a3bac2b450b8c2741e6626beae6719abb591bd2e9746abfaa3adaa89792ad59a7b
@@ -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.4] - 2021-01-23
7
+ - [#119](https://github.com/tongueroo/ufo/pull/119) layer base profiles with env-specific or default profile
8
+
9
+ ## [5.0.3] - 2020-12-10
10
+ - [#118](https://github.com/tongueroo/ufo/pull/118) update aws-mfa-secure with require singleton fix
11
+
12
+ ## [5.0.2]
13
+ - #111 Add support of credsStore
14
+ - #112 Add support for bridge network mode
15
+ - #113 Allow custom container name when you try to attach an existing ELB to a service
16
+
17
+ ## [5.0.1]
18
+ - #109 fix fargate
19
+ - #110 adjust and document `managed_security_groups` setting
20
+
21
+ ## [5.0.0]
22
+ - #104 adjust logs default format to detailed
23
+ - #105 major rework: build cfn template with Ruby instead of ERB for new features
24
+ - #106 secrets support
25
+ - 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.
26
+ - Allow per service security groups
27
+ - Conventional .ufo/settings cfn and network files based on ufo env
28
+ - Managed_security_groups_enabled=false setting.yml
29
+ - Project custom helper methods support
30
+ - Add image-override option for ufo ship
31
+ - Notification ARN stack cloudformation support for compliance reasons
32
+ - update cfn/default to use CamelCase. maintain backward compatibility with underscore. through encourage users to upgrade to CamelCase. There's less mental translation overhead.
33
+ - remove pretty option: always pretty
34
+
6
35
  ## [4.6.3]
7
36
  - #101 improve ufo init help
8
37
 
@@ -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.