ufo 3.5.7 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/Gemfile.lock +16 -10
  4. data/README.md +12 -13
  5. data/docs/_config.yml +1 -1
  6. data/docs/_docs/auto-completion.md +4 -4
  7. data/docs/_docs/automated-cleanup.md +1 -1
  8. data/docs/_docs/conventions.md +7 -7
  9. data/docs/_docs/customize-cloudformation.md +36 -0
  10. data/docs/_docs/faq.md +9 -7
  11. data/docs/_docs/fargate.md +102 -0
  12. data/docs/_docs/helpers.md +3 -3
  13. data/docs/_docs/load-balancer.md +72 -0
  14. data/docs/_docs/migrations.md +2 -2
  15. data/docs/_docs/next-steps.md +2 -2
  16. data/docs/_docs/params.md +12 -41
  17. data/docs/_docs/route53-support.md +28 -0
  18. data/docs/_docs/run-in-pieces.md +2 -2
  19. data/docs/_docs/security-groups.md +54 -0
  20. data/docs/_docs/settings-cfn.md +11 -0
  21. data/docs/_docs/settings-network.md +34 -0
  22. data/docs/_docs/settings.md +18 -15
  23. data/docs/_docs/single-task.md +3 -3
  24. data/docs/_docs/ssl-support.md +42 -0
  25. data/docs/_docs/structure.md +5 -1
  26. data/docs/_docs/stuck-cloudformation.md +30 -0
  27. data/docs/_docs/tutorial-ufo-docker-build.md +19 -31
  28. data/docs/_docs/tutorial-ufo-init.md +16 -12
  29. data/docs/_docs/tutorial-ufo-ship.md +50 -54
  30. data/docs/_docs/tutorial-ufo-ships.md +9 -7
  31. data/docs/_docs/tutorial-ufo-tasks-build.md +26 -17
  32. data/docs/_docs/ufo-current.md +50 -0
  33. data/docs/_docs/ufo-env-extra.md +21 -0
  34. data/docs/_docs/ufo-env.md +6 -13
  35. data/docs/_docs/ufo-tasks-register.md +3 -3
  36. data/docs/_docs/upgrade4.md +49 -0
  37. data/docs/_docs/variables.md +5 -5
  38. data/docs/_docs/why-cloudformation.md +22 -0
  39. data/docs/_includes/about.html +1 -1
  40. data/docs/_includes/cfn-customize.md +39 -0
  41. data/docs/_includes/commands.html +6 -6
  42. data/docs/_includes/css/ufo.css +1 -0
  43. data/docs/_includes/example.html +13 -13
  44. data/docs/_includes/reference.md +1 -1
  45. data/docs/_includes/subnav.html +22 -5
  46. data/docs/_includes/ufo-ship-options.md +7 -6
  47. data/docs/_reference/ufo-apps.md +36 -0
  48. data/docs/_reference/ufo-cancel.md +24 -0
  49. data/docs/_reference/ufo-completion.md +1 -1
  50. data/docs/_reference/ufo-completion_script.md +1 -1
  51. data/docs/_reference/ufo-current.md +93 -0
  52. data/docs/_reference/ufo-deploy.md +18 -17
  53. data/docs/_reference/ufo-destroy.md +6 -4
  54. data/docs/_reference/ufo-docker-base.md +7 -7
  55. data/docs/_reference/ufo-docker-build.md +9 -9
  56. data/docs/_reference/ufo-docker-clean.md +8 -8
  57. data/docs/_reference/ufo-docker-name.md +4 -4
  58. data/docs/_reference/ufo-docker.md +4 -2
  59. data/docs/_reference/ufo-init.md +31 -20
  60. data/docs/_reference/ufo-network-help.md +15 -0
  61. data/docs/_reference/ufo-network-init.md +38 -0
  62. data/docs/_reference/ufo-network.md +26 -0
  63. data/docs/_reference/ufo-ps.md +53 -0
  64. data/docs/_reference/ufo-releases.md +40 -0
  65. data/docs/_reference/ufo-resources.md +44 -0
  66. data/docs/_reference/ufo-rollback.md +59 -0
  67. data/docs/_reference/ufo-scale.md +23 -3
  68. data/docs/_reference/ufo-ship.md +54 -27
  69. data/docs/_reference/ufo-ships.md +17 -26
  70. data/docs/_reference/ufo-stop.md +31 -0
  71. data/docs/_reference/ufo-task.md +15 -16
  72. data/docs/_reference/ufo-tasks-build.md +10 -10
  73. data/docs/_reference/ufo-tasks-register.md +3 -3
  74. data/docs/_reference/ufo-tasks.md +1 -1
  75. data/docs/_reference/ufo-upgrade-help.md +15 -0
  76. data/docs/_reference/ufo-upgrade-v2to3.md +15 -0
  77. data/docs/_reference/ufo-upgrade-v3_3to3_4.md +15 -0
  78. data/docs/_reference/ufo-upgrade-v3to4.md +27 -0
  79. data/docs/_reference/ufo-upgrade.md +28 -0
  80. data/docs/_reference/ufo-version.md +1 -1
  81. data/docs/articles.md +2 -2
  82. data/docs/docs.md +1 -1
  83. data/docs/img/docs/cloudformation-resources.png +0 -0
  84. data/docs/img/tutorials/ecs-console-task-definitions.png +0 -0
  85. data/docs/img/tutorials/ecs-console-ufo-ship.png +0 -0
  86. data/docs/img/tutorials/ecs-console-ufo-ships.png +0 -0
  87. data/docs/quick-start.md +21 -9
  88. data/docs/reference.md +10 -2
  89. data/exe/ufo +1 -1
  90. data/lib/cfn/stack.yml +259 -0
  91. data/lib/template/.ufo/params.yml.tt +21 -60
  92. data/lib/template/.ufo/settings.yml.tt +6 -1
  93. data/lib/template/.ufo/settings/cfn/default.yml.tt +55 -0
  94. data/lib/template/.ufo/settings/network/default.yml.tt +18 -0
  95. data/lib/template/.ufo/task_definitions.rb.tt +7 -6
  96. data/lib/template/.ufo/templates/fargate.json.erb +1 -1
  97. data/lib/template/.ufo/templates/main.json.erb +1 -0
  98. data/lib/template/.ufo/variables/base.rb.tt +5 -2
  99. data/lib/template/Dockerfile +10 -15
  100. data/lib/template/bin/deploy.tt +2 -2
  101. data/lib/ufo.rb +29 -20
  102. data/lib/ufo/apps.rb +49 -0
  103. data/lib/ufo/apps/cfn_map.rb +70 -0
  104. data/lib/ufo/apps/service.rb +56 -0
  105. data/lib/ufo/aws_service.rb +15 -6
  106. data/lib/ufo/base.rb +32 -0
  107. data/lib/ufo/cancel.rb +23 -0
  108. data/lib/ufo/cli.rb +91 -27
  109. data/lib/ufo/core.rb +35 -3
  110. data/lib/ufo/current.rb +104 -0
  111. data/lib/ufo/destroy.rb +10 -41
  112. data/lib/ufo/docker/builder.rb +5 -4
  113. data/lib/ufo/docker/cleaner.rb +1 -1
  114. data/lib/ufo/docker/pusher.rb +2 -2
  115. data/lib/ufo/ecr/cleaner.rb +1 -1
  116. data/lib/ufo/help/apps.md +12 -0
  117. data/lib/ufo/help/balancer.md +3 -0
  118. data/lib/ufo/help/current.md +65 -0
  119. data/lib/ufo/help/deploy.md +4 -4
  120. data/lib/ufo/help/destroy.md +3 -3
  121. data/lib/ufo/help/docker.md +3 -1
  122. data/lib/ufo/help/docker/base.md +7 -7
  123. data/lib/ufo/help/docker/build.md +9 -9
  124. data/lib/ufo/help/docker/clean.md +8 -8
  125. data/lib/ufo/help/docker/name.md +4 -4
  126. data/lib/ufo/help/help.md +5 -0
  127. data/lib/ufo/help/init.md +24 -16
  128. data/lib/ufo/help/network/init.md +13 -0
  129. data/lib/ufo/help/ps.md +27 -0
  130. data/lib/ufo/help/releases.md +16 -0
  131. data/lib/ufo/help/resources.md +20 -0
  132. data/lib/ufo/help/rollback.md +35 -0
  133. data/lib/ufo/help/scale.md +22 -2
  134. data/lib/ufo/help/ship.md +40 -14
  135. data/lib/ufo/help/ships.md +4 -13
  136. data/lib/ufo/help/stop.md +7 -0
  137. data/lib/ufo/help/task.md +9 -9
  138. data/lib/ufo/help/tasks/build.md +10 -10
  139. data/lib/ufo/help/tasks/register.md +3 -3
  140. data/lib/ufo/help/upgrade/v3to4.md +3 -0
  141. data/lib/ufo/info.rb +62 -0
  142. data/lib/ufo/init.rb +36 -23
  143. data/lib/ufo/log_group.rb +2 -1
  144. data/lib/ufo/network.rb +24 -0
  145. data/lib/ufo/network/fetch.rb +41 -0
  146. data/lib/ufo/network/helper.rb +23 -0
  147. data/lib/ufo/network/init.rb +26 -0
  148. data/lib/ufo/param.rb +5 -5
  149. data/lib/ufo/ps.rb +102 -0
  150. data/lib/ufo/ps/task.rb +78 -0
  151. data/lib/ufo/releases.rb +14 -0
  152. data/lib/ufo/rollback.rb +53 -0
  153. data/lib/ufo/scale.rb +6 -12
  154. data/lib/ufo/sequence.rb +7 -0
  155. data/lib/ufo/setting.rb +7 -6
  156. data/lib/ufo/setting/profile.rb +24 -0
  157. data/lib/ufo/ship.rb +35 -326
  158. data/lib/ufo/stack.rb +203 -0
  159. data/lib/ufo/stack/context.rb +242 -0
  160. data/lib/ufo/stack/helper.rb +28 -0
  161. data/lib/ufo/stack/status.rb +195 -0
  162. data/lib/ufo/stop.rb +47 -0
  163. data/lib/ufo/task.rb +96 -15
  164. data/lib/ufo/tasks/register.rb +1 -1
  165. data/lib/ufo/template_scope.rb +81 -7
  166. data/lib/ufo/upgrade.rb +32 -0
  167. data/lib/ufo/{upgrade3.rb → upgrade/upgrade3.rb} +1 -1
  168. data/lib/ufo/{upgrade33_to_34.rb → upgrade/upgrade33to34.rb} +2 -2
  169. data/lib/ufo/upgrade/upgrade4.rb +161 -0
  170. data/lib/ufo/util.rb +19 -6
  171. data/lib/ufo/version.rb +1 -1
  172. data/spec/fixtures/apps/describe_services.json +96 -0
  173. data/spec/fixtures/cfn/stack-events-complete.json +1080 -0
  174. data/spec/fixtures/cfn/stack-events-in-progress.json +1080 -0
  175. data/spec/fixtures/cfn/stack-events-update-rollback-complete.json +1086 -0
  176. data/spec/fixtures/deployments.json +50 -0
  177. data/spec/fixtures/ps/describe_tasks.json +58 -0
  178. data/spec/fixtures/settings.yml +2 -0
  179. data/spec/lib/apps_spec.rb +20 -0
  180. data/spec/lib/cli_spec.rb +4 -4
  181. data/spec/lib/ps_spec.rb +14 -0
  182. data/spec/lib/setting_spec.rb +2 -1
  183. data/spec/lib/ship_spec.rb +6 -30
  184. data/spec/lib/stack/status_spec.rb +76 -0
  185. data/spec/lib/stop_spec.rb +13 -0
  186. data/spec/lib/task_spec.rb +5 -2
  187. data/spec/spec_helper.rb +1 -1
  188. data/ufo.gemspec +2 -0
  189. metadata +120 -6
  190. data/docs/_reference/ufo-upgrade3.md +0 -23
  191. data/docs/_reference/ufo-upgrade3_3_to_3_4.md +0 -23
@@ -11,9 +11,9 @@ ufo tasks register
11
11
  You should see something similiar to this:
12
12
 
13
13
  ```sh
14
- hi-clock task definition registered.
15
- hi-web task definition registered.
16
- hi-worker task definition registered.
14
+ demo-clock task definition registered.
15
+ demo-web task definition registered.
16
+ demo-worker task definition registered.
17
17
  ```
18
18
 
19
19
  You can verify that the task definitions have been registered properly by viewing the AWS ECS Console Task Definitions page. You should see something similar to this:
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Upgrading to Version 4
3
+ ---
4
+
5
+ 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.
6
+
7
+ ## Upgrade Steps Summary
8
+
9
+ The upgrade path recommended here should result in zero downtime. It is effectively a blue/green deployment with a DNS switchover.
10
+
11
+ 1. Run `ufo upgrade v3to4`
12
+ 2. Check the changed files.
13
+ 3. Run `ufo ship SERVICE`.
14
+ 4. Confirm your new service is working. `ufo ps` and `ufo apps` is useful.
15
+ 5. Switch the DNS to the new service's endpoint.
16
+ 6. Confirm everything on the new service works.
17
+ 7. Destroy the old ECS service with the ECS console. Do not destroy it with `ufo destroy` as the `ufo destroy` command will destroy the newly created service.
18
+
19
+ Note, with ufo version 4, load balancers are supported and automatically created for web services. If you want to use the existing load balancer, you can do so by specifying `--elb existing-target-group-arn`.
20
+
21
+ ### ufo upgrade v3to4
22
+
23
+ It is recommended that you run the `ufo upgrade v3to4` command with the network options specified. Please substitute the command with the vpc id and subnets for your setup. Example:
24
+
25
+ $ ufo upgrade v3to4 --vpc-id vpc-111 --ecs-subnets subnet-111 subnet-222 --elb-subnets subnet-333 subnet-444 --force
26
+ Upgrading structure of your current project to the new ufo version 4 project structure
27
+ append .dockerignore
28
+ append .gitignore
29
+ force .ufo/params.yml
30
+ conflict .ufo/settings.yml
31
+ force .ufo/settings.yml
32
+ create .ufo/settings/cfn/default.yml
33
+ create .ufo/settings/network/default.yml
34
+ Upgrade complete.
35
+
36
+ If you run the upgrade command without specified options, then ufo will detect and use the default vpc and subnets, which might not be what you want. Inspect the files and verify that they are what you desired.
37
+
38
+ ### Verify changed files
39
+
40
+ File | Changes
41
+ --- | ---
42
+ .ufo/params.yml | The create_service and update_service sections have been removed. The options handed by CloudFormation and can be customized with `.ufo/settings/cfn/default.yml`. If you have used these options for Fargate support, you no longer need to worry about them. The generated CloudFormation template detects if the task definition uses Fargate and handles it for you.
43
+ .ufo/settings.yml | A network_profile and cfn_profile option have been added with default settings.
44
+ .ufo/settings/cfn/default.yml | Starter cfn settings file.
45
+ .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.
46
+
47
+ <a id="prev" class="btn btn-basic" href="{% link _docs/stuck-cloudformation.md %}">Back</a>
48
+ <a id="next" class="btn btn-primary" href="{% link _docs/run-in-pieces.md %}">Next Step</a>
49
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -2,18 +2,18 @@
2
2
  title: Shared Variables
3
3
  ---
4
4
 
5
- Often times, you end up using the set of common variables across your task definitions for a project. Ufo supports a shared variables concept to help with this. You specify variables files in the `.ufo/variables` folder and they are made availale to your `.ufo/task_definitions.rb` as well as your `.ufo/templates` files.
5
+ Often, you end up using the set of common variables across your task definitions for a project. Ufo supports a shared variables concept to support this. You specify variables files in the `.ufo/variables` folder and they are made available to your `.ufo/task_definitions.rb` as well as your `.ufo/templates` files.
6
6
 
7
7
  For example, given `variables/base.rb`:
8
8
 
9
9
  ```
10
- @image = helper.full_image_name # includes the git sha tongueroo/hi:ufo-[sha].
10
+ @image = helper.full_image_name # includes the git sha tongueroo/demo-ufo:ufo-[sha].
11
11
  @cpu = 128
12
12
  @memory_reservation = 256
13
13
  @environment = helper.env_file(".env")
14
14
  ```
15
15
 
16
- You can now use `@image` in your `.ufo/templates/main.json.erb` without having to explicitly declare them in the `.ufo/task_definitions.rb` file. Variables are automatically made available to all templates and the `task_definition.rb` file also.
16
+ You can now use `@image` in your `.ufo/templates/main.json.erb` without having to declare them in the `.ufo/task_definitions.rb` file explicitly. Variables are automatically made available to all templates and the `task_definition.rb` file.
17
17
 
18
18
  ## Layering
19
19
 
@@ -22,7 +22,7 @@ Shared variables also support a concept called layering. The `variables/base.rb
22
22
  `.ufo/variables/base.rb`:
23
23
 
24
24
  ```ruby
25
- @image = helper.full_image_name # includes the git sha tongueroo/hi:ufo-[sha].
25
+ @image = helper.full_image_name # includes the git sha tongueroo/demo-ufo:ufo-[sha].
26
26
  @cpu = 128
27
27
  @memory_reservation = 256
28
28
  @environment = helper.env_file(".env")
@@ -51,6 +51,6 @@ When `ufo ship` is ran with `UFO_ENV=development` the `variables/development.rb`
51
51
  ])
52
52
  ```
53
53
 
54
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-env.md %}">Back</a>
54
+ <a id="prev" class="btn btn-basic" href="{% link _docs/params.md %}">Back</a>
55
55
  <a id="next" class="btn btn-primary" href="{% link _docs/helpers.md %}">Next Step</a>
56
56
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Why CloudFormation
3
+ ---
4
+
5
+ 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.
6
+
7
+ My gut was already telling me that with Load Balancer support, the "orchestration" or sequencing logic in ufo would become annoyingly complex and shifting it to CloudFormation would be worth it. Nevertheless, I took the time with quick experimental branch and added Load Balancer support using the aws-sdk directly without CloudFormation.
8
+
9
+ The pull request for that code is here [ufo/pull/42](https://github.com/tongueroo/ufo/pull/42). An additional tool was created for the non-CloudFormation approach called [balancer](https://github.com/tongueroo/balancer). Balancer is a standalone tool used to create load balancers consistently with "profile" files.
10
+
11
+ * [ufo/pull/42](https://github.com/tongueroo/ufo/pull/42) - PR for non-CloudFormation. Closed and not used.
12
+ * [ufo/pull/43](https://github.com/tongueroo/ufo/pull/43) - PR for CloudFormation. Merged and used.
13
+
14
+ The results of the exercise confirm my gut. Though the CloudFormation implementation requires more upfront investment, it ultimately pays off. For example, route53 DNS support was added to ufo easily and quickly. Sometimes the learning curve of CloudFormation can be a deterrent, so I hope that these thoughts help.
15
+
16
+ You can check the resources created with CloudFormation by clicking on the stack name of in the CloudFormation console.
17
+
18
+ <img src="/img/docs/cloudformation-resources.png" class="doc-photo" />
19
+
20
+ <a id="prev" class="btn btn-basic" href="{% link _docs/faq.md %}">Back</a>
21
+ <a id="next" class="btn btn-primary" href="{% link _docs/customize-cloudformation.md %}">Next Step</a>
22
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <div class="row">
11
11
  <div class="col-lg-4 col-lg-offset-2">
12
- <p>Ufo is a tool that makes building and shipping Docker containers to AWS ECS super easy. At a basic level, ufo builds the docker container image, registers that image to ECS as a task definition, and then deploys that task definition to ECS by updating the service. Ufo provides a <code>ufo ship</code> command that deploys your code to ECS.</p>
12
+ <p>Ufo is a tool that makes building and shipping Docker containers to AWS ECS easy. At a basic level, ufo builds the docker container image, registers that image to ECS as a task definition, and then deploys that task definition to ECS by updating the service. Ufo provides a <code>ufo ship</code> command that deploys your code to ECS.</p>
13
13
  </div>
14
14
  <div class="col-lg-4">
15
15
  <p>Ufo was built directly from real life production use cases after seeing the same patterns repeated over and over. Ufo allows you to write the AWS task definition json format file in ERB, an easy templating language. This allows you to reuse the ufo tool with multiple applications and only put the truly application specific business logic in each app code base.</p>
@@ -0,0 +1,39 @@
1
+ The properties in the file `.ufo/settings/cfn/default.yml` map directly to ufo's CloudFormation resources. It allows you to customize the resources. The keys get transform to CamelCase keys to work with the CloudFormation template.
2
+
3
+ ### Example of Customization
4
+
5
+ Let's customize the `AWS::ElasticLoadBalancingV2::TargetGroup` resource created by CloudFormation. We'll adjust the `deregistration_delay.timeout_seconds` to `8`. Here's the relevant section of the `.ufo/settings/cfn/default.yml`
6
+
7
+ ```
8
+ target_group:
9
+ ...
10
+ target_group_attributes:
11
+ - key: deregistration_delay.timeout_seconds
12
+ value: 8
13
+ ```
14
+
15
+ The value will be injected to the generated CloudFormation template under the corresponding "TargetGroup Properties". The generated template looks something like this:
16
+
17
+ ```
18
+ TargetGroup:
19
+ Properties:
20
+ ...
21
+ TargetGroupAttributes:
22
+ - Key: deregistration_delay.timeout_seconds
23
+ Value: 8
24
+ ...
25
+ ```
26
+
27
+ In this way, you can customize and override any property associated with any resource created the ufo CloudFormation stack.
28
+
29
+ Here's a list of the resources in the [cfn/stack.yml](https://github.com/tongueroo/ufo/blob/master/lib/cfn/stack.yml) that you can customize:
30
+
31
+ * Ecs
32
+ * EcsSecurityGroup
33
+ * EcsSecurityGroupRule
34
+ * Elb
35
+ * ElbSecurityGroup
36
+ * Listener
37
+ * TargetGroup
38
+
39
+ For the most up to date list check out the [cfn/stack.yml](https://github.com/tongueroo/ufo/blob/master/lib/cfn/stack.yml) source code directly.
@@ -7,13 +7,13 @@
7
7
  <div class="commands">
8
8
  {% highlight sh %}
9
9
  ufo ship
10
-
10
+ ufo ps
11
+ ufo current
12
+ ufo apps
13
+ ufo scale
11
14
  ufo docker build
12
-
13
15
  ufo tasks build
14
-
15
- ufo scale
16
-
16
+ ufo rollback
17
17
  ufo destroy
18
18
  {% endhighlight %}
19
19
  </div>
@@ -22,7 +22,7 @@ ufo destroy
22
22
  <h3>variables/base.rb</h3>
23
23
  <div class="commands">
24
24
  {% highlight ruby %}
25
- @image = helper.full_image_name # includes the git sha tongueroo/hi:ufo-[sha].
25
+ @image = helper.full_image_name # includes the git sha tongueroo/demo-ufo:ufo-[sha].
26
26
  @cpu = 128
27
27
  @memory_reservation = 256
28
28
  @environment = helper.env_vars(%Q{
@@ -72,6 +72,7 @@ section#main .intro-text .skills {
72
72
  /*background-color: green;*/
73
73
  margin-top: 40px;
74
74
  font-size: 1.2em;
75
+ color: #9acfe0;
75
76
  }
76
77
 
77
78
  .content-nav ul, .content-nav ol {
@@ -2,16 +2,16 @@
2
2
  <div class="container">
3
3
  <div class="row">
4
4
  <div class="col-lg-12 text-center">
5
- <h2>Example: ufo ship hi-web</h2>
5
+ <h2>Example: ufo ship demo-web</h2>
6
6
  <hr class="star-primary">
7
7
  </div>
8
8
  </div>
9
9
  <div class='row'>
10
10
  <div class='col-md-offset-1 col-md-10'>
11
11
  {% highlight sh %}
12
- $ ufo ship hi-web
12
+ $ ufo ship demo-web
13
13
  Building docker image with:
14
- docker build -t tongueroo/hi:ufo-2017-06-11T19-43-19-bc80e84 -f Dockerfile .
14
+ docker build -t tongueroo/demo-ufo:ufo-2017-06-11T19-43-19-bc80e84 -f Dockerfile .
15
15
  Sending build context to Docker daemon 719.4 kB
16
16
  Step 1 : FROM ruby:2.3.3
17
17
  ---> 0e1db669d557
@@ -52,26 +52,26 @@ Step 11 : CMD bin/web
52
52
  ---> 1689ba53ca03
53
53
  Removing intermediate container f56d659a2c9e
54
54
  Successfully built 1689ba53ca03
55
- Docker image tongueroo/hi:ufo-2017-06-11T19-43-19-bc80e84 built. Took 34s.
56
- The push refers to a repository [docker.io/tongueroo/hi]
55
+ Docker image tongueroo/demo-ufo:ufo-2017-06-11T19-43-19-bc80e84 built. Took 34s.
56
+ The push refers to a repository [docker.io/tongueroo/demo-ufo]
57
57
  0826214f2b9a: Pushed
58
58
  ee30634e4a5d: Pushed
59
59
  277ff31e79b4: Layer already exists
60
60
  a361a4de05df: Layer already exists
61
61
  ufo-2017-06-11T19-43-19-bc80e84: digest: sha256:6381ff8d4413edf0c13926def1d55d0f805d169d686f59cdee3abb960b52eb9a size: 3464
62
- Pushed tongueroo/hi:ufo-2017-06-11T19-43-19-bc80e84 docker image. Took 10s.
62
+ Pushed tongueroo/demo-ufo:ufo-2017-06-11T19-43-19-bc80e84 docker image. Took 10s.
63
63
  Building Task Definitions...
64
64
  Generating Task Definitions:
65
- ufo/output/hi-web.json
66
- ufo/output/hi-worker.json
67
- ufo/output/hi-clock.json
65
+ ufo/output/demo-web.json
66
+ ufo/output/demo-worker.json
67
+ ufo/output/demo-clock.json
68
68
  Task Definitions built in ufo/output.
69
- hi-web task definition registered.
70
- Shipping hi-web...
71
- hi-web service updated on stag cluster with task hi-web
69
+ demo-web task definition registered.
70
+ Shipping demo-web...
71
+ demo-web service updated on stag cluster with task demo-web
72
72
  Software shipped!
73
73
  Cleaning up docker images...
74
- Running: docker rmi tongueroo/hi:ufo-2017-06-11T11-37-00-bc80e84
74
+ Running: docker rmi tongueroo/demo-ufo:ufo-2017-06-11T11-37-00-bc80e84
75
75
  $
76
76
  {% endhighlight %}
77
77
  </div>
@@ -1,4 +1,4 @@
1
- Easy Way to Build and Ship Docker Images to AWS ECS. The main command is ufo ship. Here's summary of what it does:
1
+ Easy Way to Build and Deploy Docker Images to AWS ECS. The main command is ufo ship. Here's summary of what it does:
2
2
 
3
3
  1. Builds a docker image.
4
4
  2. Registers the ECS template definition.
@@ -15,21 +15,38 @@
15
15
  <ul>
16
16
  <li><a href="{% link _docs/structure.md %}">Structure</a></li>
17
17
  <li><a href="{% link _docs/settings.md %}">Settings</a></li>
18
+ <li><a href="{% link _docs/settings-network.md %}">Settings Network</a></li>
19
+ <li><a href="{% link _docs/settings-cfn.md %}">Settings Cfn</a></li>
18
20
  <li><a href="{% link _docs/params.md %}">Params</a></li>
19
- <li><a href="{% link _docs/ufo-env.md %}">UFO_ENV</a></li>
20
21
  <li><a href="{% link _docs/variables.md %}">Shared Variables</a></li>
21
22
  <li><a href="{% link _docs/helpers.md %}">Helpers</a></li>
22
23
  <li><a href="{% link _docs/conventions.md %}">Conventions</a></li>
23
- <li><a href="{% link _docs/auto-completion.md %}">Auto-Completion</a></li>
24
+ <li><a href="{% link _docs/fargate.md %}">Fargate</a></li>
25
+ <li><a href="{% link _docs/ufo-env.md %}">Ufo Env</a></li>
26
+ <li><a href="{% link _docs/ufo-env-extra.md %}">Ufo Env Extra</a></li>
27
+ <li><a href="{% link _docs/ufo-current.md %}">Ufo Current</a></li>
28
+ <li><a href="{% link _docs/load-balancer.md %}">Load Balancer</a></li>
29
+ <li><a href="{% link _docs/security-groups.md %}">Security Groups</a></li>
30
+ <li><a href="{% link _docs/ssl-support.md %}">SSL Support</a></li>
31
+ <li><a href="{% link _docs/route53-support.md %}">Route53 Support</a></li>
32
+ <li><a href="{% link _docs/faq.md %}">FAQ</a></li>
33
+ </ul>
34
+ <li>More
35
+ <ul>
36
+ <li><a href="{% link _docs/why-cloudformation.md %}">Why CloudFormation</a></li>
37
+ <li><a href="{% link _docs/customize-cloudformation.md %}">Customize CloudFormation</a></li>
38
+ <li><a href="{% link _docs/stuck-cloudformation.md %}">Stuck CloudFormation</a></li>
39
+ <li><a href="{% link _docs/upgrade4.md %}">Upgrade 4</a></li>
24
40
  <li><a href="{% link _docs/run-in-pieces.md %}">Run In Pieces</a></li>
25
41
  <li><a href="{% link _docs/single-task.md %}">Run Single Task</a></li>
26
42
  <li><a href="{% link _docs/migrations.md %}">Database Migrations</a></li>
27
43
  <li><a href="{% link _docs/automated-cleanup.md %}">Automated Cleanup</a></li>
28
- <li><a href="{% link _docs/next-steps.md %}">Next Steps</a></li>
29
- <li><a href="{% link _docs/faq.md %}">FAQ</a></li>
44
+ <li><a href="{% link _docs/auto-completion.md %}">Auto-Completion</a></li>
30
45
  <li><a href="{% link articles.md %}">Articles</a></li>
31
- <li><a href="{% link reference.md %}">Reference</a></li>
46
+ <li><a href="{% link _docs/next-steps.md %}">Next Steps</a></li>
47
+ <li><a href="{% link reference.md %}">CLI Reference</a></li>
32
48
  </ul>
33
49
  </li>
50
+ </li>
34
51
  </ul>
35
52
  </div>
@@ -1,11 +1,12 @@
1
1
  {:.ship-options}
2
2
  Option | Description
3
3
  ------------- | -------------
4
+ `--cluster` | This decides what cluster to use. This can also be set in ufo/settings.yml covered in [Settings]({% link _docs/settings.md %}). The cli option takes highest precedence.
5
+ `--ecr-keep` | This integer option determines how many old docker images to keep around. Ufo will automatically delete and clean up docker images at the end of this process. The default is reasonable large at 30.
6
+ `--elb-eip-ids` | EIP Allocation ids to use for network load balancer. If specified then `--elb-type` is automatically assumed to be `network`.
7
+ `--elb-type` | ELB type: application or network. Keep current deployed elb type when not specified.
8
+ `--elb` | Decides to create elb, not create elb or use existing target group.
9
+ `--pretty` | This boolean option determines ufo generates the task definitions in output in a pretty human readable format.
10
+ `--stop-old-tasks` | This boolean option determines if ufo will call ecs stop-task on the old tasks after deployment. Sometimes old tasks hang around for a little bit with ECS this forces them along a little quicker. This option forceably kills running tasks, so configuring `deregistration_delay.timeout_seconds` is recommended in the cfn settings instead. Note, it seems like deregistration_delay is currently is respected for Application ELBs but not Network ELBs.
4
11
  `--task` | By convention ufo uses the same name for both the ECS service and task definition. You can override this convention with this option. The conventions are covered on the [Conventions]({% link _docs/conventions.md %}) page.
5
- `--target-group` | The ELB target group to use for the ECS service. This is respected if the ECS service is being created the first time. If the ECS service already exists, this option gets ignored.
6
- `--target-group-prompt` | This boolean option allows you to bypass setting the ELB target group if desired.
7
12
  `--wait` | This boolean option determines if ufo blocks and waits until the service has been deployed before continuing.
8
- `--pretty` | This boolean option determines ufo generates the task definitions in output in a pretty human readable format.
9
- `--stop-old-tasks` | This boolean option determines if ufo will call ecs stop-task on the old tasks after deployment. Sometimes old tasks hang around for a little bit with ECS this forces them along a little quicker.
10
- `--ecr-keep` | This integer option determines how many old docker images to keep around. Ufo will automatically delete and clean up docker images at the end of this process. The default is reasonable large at 30.
11
- `--cluster` | This decides what cluster to use. This can also be set in ufo/settings.yml covered in [Settings]({% link _docs/settings.md %}). The cli option takes highest precedence.
@@ -0,0 +1,36 @@
1
+ ---
2
+ title: ufo apps
3
+ reference: true
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ ufo apps
9
+
10
+ ## Description
11
+
12
+ List apps.
13
+
14
+ This command lists ECS services for an ECS cluster. It includes ECS services that were not created by ufo also. A `Ufo?` column value of `yes` indicates that the ECS service was created by ufo version 4 and above. If the service was created with ufo version 3 and below then it will show up as `no`.
15
+
16
+ ## Examples
17
+
18
+ $ ufo apps
19
+ Listing ECS services in the development cluster.
20
+ +--------------------------------------------------+-----------------+---------+-------------+------+
21
+ | Service Name | Task Definition | Running | Launch type | Ufo? |
22
+ +--------------------------------------------------+-----------------+---------+-------------+------+
23
+ | development-demo-web-Ecs-7GAUAXH5F56M (demo-web) | demo-web:85 | 2 | FARGATE | yes |
24
+ +--------------------------------------------------+-----------------+---------+-------------+------+
25
+ $
26
+
27
+
28
+ ## Options
29
+
30
+ ```
31
+ [--verbose], [--no-verbose]
32
+ [--mute], [--no-mute]
33
+ [--noop], [--no-noop]
34
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
35
+ ```
36
+
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: ufo cancel
3
+ reference: true
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ ufo cancel SERVICE
9
+
10
+ ## Description
11
+
12
+ Cancel creation or update of the ECS service.
13
+
14
+
15
+ ## Options
16
+
17
+ ```
18
+ [--sure], [--no-sure] # By pass are you sure prompt.
19
+ [--verbose], [--no-verbose]
20
+ [--mute], [--no-mute]
21
+ [--noop], [--no-noop]
22
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
23
+ ```
24
+
@@ -41,6 +41,6 @@ Auto-completion example usage:
41
41
  [--verbose], [--no-verbose]
42
42
  [--mute], [--no-mute]
43
43
  [--noop], [--no-noop]
44
- [--cluster=CLUSTER] # Cluster. Overrides ufo/settings.yml.
44
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
45
45
  ```
46
46
 
@@ -22,6 +22,6 @@ To use, add the following to your `~/.bashrc` or `~/.profile`
22
22
  [--verbose], [--no-verbose]
23
23
  [--mute], [--no-mute]
24
24
  [--noop], [--no-noop]
25
- [--cluster=CLUSTER] # Cluster. Overrides ufo/settings.yml.
25
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
26
26
  ```
27
27
 
@@ -0,0 +1,93 @@
1
+ ---
2
+ title: ufo current
3
+ reference: true
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ ufo current SERVICE
9
+
10
+ ## Description
11
+
12
+ Switch the current service. Saves to `.ufo/current`
13
+
14
+ Sets a current service to remember so you do not have to provide the service name all the time. This shortens the commands
15
+
16
+ ufo ship demo-web # before
17
+ ufo current --service demo-web
18
+ ufo ship # after
19
+
20
+ The state information is written to `.ufo/current`.
21
+
22
+ ## Examples
23
+
24
+ ### summary
25
+
26
+ ufo current --service demo-web --env-extra 1
27
+ ufo current --service demo-web --env-extra 1 --services demo-web demo-worker
28
+ ufo current --service demo-web --env-extra ''
29
+ ufo current --service demo-web
30
+ ufo current --env-extra '1'
31
+
32
+ ### service
33
+
34
+ To set current service:
35
+
36
+ ufo current --service demo-web
37
+ ufo current --service demo-worker
38
+ ufo current --service demo-web
39
+
40
+ To view current service, run `ufo current` without any arguments.
41
+
42
+ $ ufo current
43
+ Current service: demo-web
44
+
45
+ To remove current service:
46
+
47
+ ufo current --service ''
48
+
49
+ ### env-extra
50
+
51
+ To also set a current `UFO_ENV_EXTRA`.
52
+
53
+ ufo current --env-extra 1
54
+
55
+ The extra env setting will be reflected:
56
+
57
+ $ ufo current
58
+ Current service: demo-web
59
+ Current env_extra: 1
60
+
61
+ The `UFO_ENV_EXTRA` variable takes higher precedence than the current setting in the saved file.
62
+
63
+ To unset:
64
+
65
+ ufo current --env-extra ''
66
+
67
+ ### services
68
+
69
+ The ufo ships command builds one docker image and deploys it to multiple ECS services. You can also have ufo remember what services to use with the current command.
70
+
71
+ ufo current --services demo-web demo-worker
72
+ ufo ships # will depoy to both demo-web and demo-worker
73
+
74
+ ### rm all
75
+
76
+ To remove all current settings use the `--rm` option.
77
+
78
+ ufo current --rm
79
+
80
+
81
+ ## Options
82
+
83
+ ```
84
+ [--rm], [--no-rm] # Remove all current settings. Removes `.ufo/current`
85
+ [--service=SERVICE] # Sets service as a current setting.
86
+ [--services=one two three] # Sets services as a current setting. This is used for ufo ships.
87
+ [--env-extra=ENV_EXTRA] # Sets UFO_ENV_EXTRA as a current setting.
88
+ [--verbose], [--no-verbose]
89
+ [--mute], [--no-mute]
90
+ [--noop], [--no-noop]
91
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
92
+ ```
93
+