ufo 4.3.1 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +8 -0
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile.lock +26 -26
  5. data/README.md +1 -1
  6. data/docs/.ruby-version +1 -0
  7. data/docs/_docs/auto-completion.md +2 -3
  8. data/docs/_docs/automated-cleanup.md +2 -3
  9. data/docs/_docs/conventions.md +2 -3
  10. data/docs/_docs/customize-cloudformation.md +2 -3
  11. data/docs/_docs/ecs-network-mode.md +2 -3
  12. data/docs/_docs/faq.md +2 -3
  13. data/docs/_docs/fargate.md +1 -5
  14. data/docs/_docs/helpers.md +2 -3
  15. data/docs/_docs/install.md +2 -4
  16. data/docs/_docs/load-balancer.md +2 -3
  17. data/docs/_docs/migrations.md +2 -3
  18. data/docs/_docs/next-steps.md +2 -4
  19. data/docs/_docs/params.md +2 -4
  20. data/docs/_docs/quick-start-ec2.md +3 -4
  21. data/docs/_docs/redirection-support.md +2 -3
  22. data/docs/_docs/route53-support.md +2 -3
  23. data/docs/_docs/run-in-pieces.md +2 -3
  24. data/docs/_docs/security-groups.md +2 -3
  25. data/docs/_docs/settings-cfn.md +2 -3
  26. data/docs/_docs/settings-network.md +2 -3
  27. data/docs/_docs/settings.md +21 -24
  28. data/docs/_docs/single-task.md +2 -3
  29. data/docs/_docs/ssl-support.md +2 -3
  30. data/docs/_docs/structure.md +2 -4
  31. data/docs/_docs/stuck-cloudformation.md +2 -3
  32. data/docs/_docs/tutorial-ufo-docker-build.md +2 -4
  33. data/docs/_docs/tutorial-ufo-init.md +2 -4
  34. data/docs/_docs/tutorial-ufo-ship.md +2 -3
  35. data/docs/_docs/tutorial-ufo-ships.md +2 -3
  36. data/docs/_docs/tutorial-ufo-tasks-build.md +2 -3
  37. data/docs/_docs/tutorial.md +2 -3
  38. data/docs/_docs/ufo-current.md +2 -3
  39. data/docs/_docs/ufo-env-extra.md +2 -3
  40. data/docs/_docs/ufo-env.md +2 -3
  41. data/docs/_docs/ufo-tasks-register.md +1 -2
  42. data/docs/_docs/upgrading.md +13 -0
  43. data/docs/_docs/upgrading/upgrade4.4.md +39 -0
  44. data/docs/_docs/{upgrade4.md → upgrading/upgrade4.md} +6 -4
  45. data/docs/_docs/variables.md +2 -3
  46. data/docs/_docs/why-cloudformation.md +2 -3
  47. data/docs/_includes/prev_next.md +19 -0
  48. data/docs/_includes/subnav.html +8 -1
  49. data/docs/_reference/{ufo-upgrade-v3_3to3_4.md → ufo-upgrade-v33to34.md} +2 -2
  50. data/docs/_reference/ufo-upgrade-v43to44.md +15 -0
  51. data/docs/_reference/ufo-upgrade.md +2 -1
  52. data/docs/articles.md +2 -3
  53. data/docs/docs.md +2 -4
  54. data/docs/quick-start.md +3 -3
  55. data/lib/cfn/stack.yml +8 -8
  56. data/lib/template/.ufo/settings.yml.tt +5 -8
  57. data/lib/ufo.rb +2 -0
  58. data/lib/ufo/apps/service.rb +4 -4
  59. data/lib/ufo/base.rb +1 -2
  60. data/lib/ufo/cancel.rb +2 -2
  61. data/lib/ufo/core.rb +16 -14
  62. data/lib/ufo/destroy.rb +2 -2
  63. data/lib/ufo/ps.rb +1 -1
  64. data/lib/ufo/scale.rb +2 -2
  65. data/lib/ufo/setting.rb +16 -1
  66. data/lib/ufo/stack/context.rb +0 -1
  67. data/lib/ufo/stack/helper.rb +18 -1
  68. data/lib/ufo/upgrade.rb +8 -2
  69. data/lib/ufo/upgrade/upgrade33to34.rb +1 -0
  70. data/lib/ufo/upgrade/upgrade43to44.rb +25 -0
  71. data/lib/ufo/version.rb +1 -1
  72. data/spec/fixtures/settings.yml +3 -5
  73. data/spec/lib/setting_spec.rb +5 -0
  74. data/ufo.gemspec +1 -1
  75. metadata +13 -8
  76. data/spec/lib/core_spec.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: e4dfad82bcb8f29c81c11bec2298b540885b11337abf57b25371f4068a474b02
4
- data.tar.gz: 352909476cc73ddab7f16a88bc5878b3be7a7f8bfdff85d22856570a0d7be5e4
2
+ SHA1:
3
+ metadata.gz: 4e71aeb95d96170c7faa58087450a774e3358e63
4
+ data.tar.gz: 3fb85bfcfef7f0861652dcec20088b204ed8a5c8
5
5
  SHA512:
6
- metadata.gz: 4d3cbfbd3ea2ce9622995c61e862188d5f0f7f67afe4bca7c9261f056d7f4b33edec6ba4e389198220007c376fab155dfc6c8d02fe8d1dc7c39df0a8fb4b5fc6
7
- data.tar.gz: '09a4f4fc612c3f4ebcb782bc6fe146ebfb88b75bb5cfab5e55f712158fef225b18c11fd759c649a4bb7bf361655ccf750152d5e626fede67331a0c9d6dc23443'
6
+ metadata.gz: 95a679a60fbae5e1cd2a54e244e46622b59ef28835c9bfd105730caa5fc31c5deab8f9eb030fd6eb8f3f5028698ee425a2539c38c9434533abaf4668ee7fc870
7
+ data.tar.gz: f6613d13f0d3c633e21a89faf6ad6bd2c302dfe24a95d925dcc588814e8c099cfb6200e8220a4667e388caa16bc2453b80858a52426584c9a5cdb29d225179e2
@@ -32,6 +32,14 @@ jobs:
32
32
  # fallback to using the latest cache if no exact match is found
33
33
  - v1-dependencies-
34
34
 
35
+ # Thanks: https://discuss.circleci.com/t/using-bundler-2-0-during-ci-fails/27411/3
36
+ - run:
37
+ name: configure bundler
38
+ command: |
39
+ echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
40
+ source $BASH_ENV
41
+ gem install bundler
42
+
35
43
  - run:
36
44
  name: install dependencies
37
45
  command: |
@@ -3,6 +3,12 @@
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
+ ## [4.4.0]
7
+ - #71 from gurpreetatwal/patch-1 remove extra slash from URL
8
+ - #73 organize docs better into subfolders
9
+ - #74 appending ufo_env to stack name
10
+ - change setting aws_profile to tightly bind to ufo_env, simpler to understand
11
+
6
12
  ## [4.3.1]
7
13
  - #70 ps --status filter and fix list_tasks 100 limit issue
8
14
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ufo (4.3.1)
4
+ ufo (4.4.0)
5
5
  aws-sdk-cloudformation
6
6
  aws-sdk-cloudwatchlogs
7
7
  aws-sdk-ec2
@@ -19,39 +19,39 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- activesupport (5.2.2.1)
22
+ activesupport (5.2.3)
23
23
  concurrent-ruby (~> 1.0, >= 1.0.2)
24
24
  i18n (>= 0.7, < 2)
25
25
  minitest (~> 5.1)
26
26
  tzinfo (~> 1.1)
27
27
  aws-eventstream (1.0.2)
28
- aws-partitions (1.144.0)
29
- aws-sdk-cloudformation (1.14.0)
30
- aws-sdk-core (~> 3, >= 3.39.0)
31
- aws-sigv4 (~> 1.0)
32
- aws-sdk-cloudwatchlogs (1.14.0)
33
- aws-sdk-core (~> 3, >= 3.39.0)
34
- aws-sigv4 (~> 1.0)
35
- aws-sdk-core (3.46.2)
36
- aws-eventstream (~> 1.0)
28
+ aws-partitions (1.149.0)
29
+ aws-sdk-cloudformation (1.18.0)
30
+ aws-sdk-core (~> 3, >= 3.48.2)
31
+ aws-sigv4 (~> 1.1)
32
+ aws-sdk-cloudwatchlogs (1.17.0)
33
+ aws-sdk-core (~> 3, >= 3.48.2)
34
+ aws-sigv4 (~> 1.1)
35
+ aws-sdk-core (3.48.3)
36
+ aws-eventstream (~> 1.0, >= 1.0.2)
37
37
  aws-partitions (~> 1.0)
38
- aws-sigv4 (~> 1.0)
38
+ aws-sigv4 (~> 1.1)
39
39
  jmespath (~> 1.0)
40
- aws-sdk-ec2 (1.72.0)
41
- aws-sdk-core (~> 3, >= 3.39.0)
42
- aws-sigv4 (~> 1.0)
43
- aws-sdk-ecr (1.11.0)
44
- aws-sdk-core (~> 3, >= 3.39.0)
45
- aws-sigv4 (~> 1.0)
46
- aws-sdk-ecs (1.31.0)
47
- aws-sdk-core (~> 3, >= 3.39.0)
48
- aws-sigv4 (~> 1.0)
49
- aws-sdk-elasticloadbalancingv2 (1.21.0)
50
- aws-sdk-core (~> 3, >= 3.39.0)
51
- aws-sigv4 (~> 1.0)
40
+ aws-sdk-ec2 (1.78.0)
41
+ aws-sdk-core (~> 3, >= 3.48.2)
42
+ aws-sigv4 (~> 1.1)
43
+ aws-sdk-ecr (1.14.0)
44
+ aws-sdk-core (~> 3, >= 3.48.2)
45
+ aws-sigv4 (~> 1.1)
46
+ aws-sdk-ecs (1.36.0)
47
+ aws-sdk-core (~> 3, >= 3.48.2)
48
+ aws-sigv4 (~> 1.1)
49
+ aws-sdk-elasticloadbalancingv2 (1.26.0)
50
+ aws-sdk-core (~> 3, >= 3.48.2)
51
+ aws-sigv4 (~> 1.1)
52
52
  aws-sigv4 (1.1.0)
53
53
  aws-eventstream (~> 1.0, >= 1.0.2)
54
- byebug (11.0.0)
54
+ byebug (11.0.1)
55
55
  cli_markdown (0.1.0)
56
56
  codeclimate-test-reporter (1.0.9)
57
57
  simplecov (<= 0.13)
@@ -110,4 +110,4 @@ DEPENDENCIES
110
110
  ufo!
111
111
 
112
112
  BUNDLED WITH
113
- 1.17.3
113
+ 2.0.1
data/README.md CHANGED
@@ -33,7 +33,7 @@ Full installation instructions are at [Install Ufo](http://ufoships.com/docs/ins
33
33
  To quickly demonstrate how simple it is to use ufo we will use an example app from [tongueroo/demo-ufo](https://github.com/tongueroo/demo-ufo). The app is a barebones sinatra app. Here are the steps:
34
34
 
35
35
  gem install ufo
36
- git clone https:///github.com/tongueroo/demo-ufo.git demo
36
+ git clone https://github.com/tongueroo/demo-ufo.git demo
37
37
  cd demo
38
38
  ufo init --image=tongueroo/demo-ufo
39
39
  ufo ship demo-web
@@ -0,0 +1 @@
1
+ 2.5.3
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Auto Completion
3
+ nav_order: 39
3
4
  ---
4
5
 
5
6
  Ufo supports bash auto-completion. To set it up add the following to your `~/.profile` or `.bashrc`:
@@ -24,6 +25,4 @@ ufo tasks [TAB]
24
25
  ufo tasks build [TAB]
25
26
  ```
26
27
 
27
- <a id="prev" class="btn btn-basic" href="{% link _docs/automated-cleanup.md %}">Back</a>
28
- <a id="next" class="btn btn-primary" href="{% link articles.md %}">Next Step</a>
29
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
28
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Automated Clean Up
3
+ nav_order: 38
3
4
  ---
4
5
 
5
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:
@@ -10,6 +11,4 @@ ecr_keep: 30
10
11
 
11
12
  Automated Docker images clean up only works if you are using ECR registry.
12
13
 
13
- <a id="prev" class="btn btn-basic" href="{% link _docs/migrations.md %}">Back</a>
14
- <a id="next" class="btn btn-primary" href="{% link _docs/auto-completion.md %}">Next Step</a>
15
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
14
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Conventions
3
+ nav_order: 18
3
4
  ---
4
5
 
5
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.
@@ -43,6 +44,4 @@ You can also use an existing ELB by specifying the target group arn as the value
43
44
  ufo ship demo-web --elb arn:aws:elasticloadbalancing:us-east-1:12345689:targetgroup/demo-web/12345
44
45
  ```
45
46
 
46
- <a id="prev" class="btn btn-basic" href="{% link _docs/helpers.md %}">Back</a>
47
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-env.md %}">Next Step</a>
48
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
47
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Customize CloudFormation
3
+ nav_order: 33
3
4
  ---
4
5
 
5
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.
@@ -31,6 +32,4 @@ UFO_ENV_EXTRA=2 ufo ship demo-web -\-cluster dev | development-demo-web-2
31
32
 
32
33
  The CloudFormation stack is currently generated from a template. The source code for this template is located at [cfn/stack.yml](https://github.com/tongueroo/ufo/blob/master/lib/cfn/stack.yml). This implementation might change in the future.
33
34
 
34
- <a id="prev" class="btn btn-basic" href="{% link _docs/why-cloudformation.md %}">Back</a>
35
- <a id="next" class="btn btn-primary" href="{% link _docs/stuck-cloudformation.md %}">Next Step</a>
36
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
35
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: ECS Network Mode
3
+ nav_order: 24
3
4
  ---
4
5
 
5
6
  ## Pros and Cons: awsvpc vs bridge network mode
@@ -19,6 +20,4 @@ Network mode | Pros | Cons
19
20
  bridge | The numbers of containers you can run will not be limited due to EC2 instance network cards limits. | Less fine grain security control over security group permissions with multiple ECS services.
20
21
  awsvpc | Fine grain security group permissions for each ECS service. | The number of containers can be limited by the number of network cards the EC2 instance type supports.
21
22
 
22
- <a id="prev" class="btn btn-basic" href="{% link _docs/security-groups.md %}">Back</a>
23
- <a id="next" class="btn btn-primary" href="{% link _docs/ssl-support.md %}">Next Step</a>
24
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
23
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: FAQ
3
+ nav_order: 28
3
4
  ---
4
5
 
5
6
  **Q: Is AWS ECS Fargate supported?**
@@ -96,6 +97,4 @@ Also, you might have to enable the log driver by adding the ECS_AVAILABLE_LOGGIN
96
97
 
97
98
  Hope that helps.
98
99
 
99
- <a id="prev" class="btn btn-basic" href="{% link _docs/redirection-support.md %}">Back</a>
100
- <a id="next" class="btn btn-primary" href="{% link _docs/why-cloudformation.md %}">Next Step</a>
101
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
100
+ {% include prev_next.md %}
@@ -2,8 +2,4 @@
2
2
  title: Fargate
3
3
  ---
4
4
 
5
- This doc has been moved to [Quick Start: Fargate]({% link quick-start.md %}).
6
-
7
- <a id="prev" class="btn btn-basic" href="{% link _docs/conventions.md %}">Back</a>
8
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-env.md %}">Next Step</a>
9
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
5
+ This doc has been moved to [Quick Start: Fargate]({% link quick-start.md %}).
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Helpers
3
+ nav_order: 17
3
4
  ---
4
5
 
5
6
  The `task_definitions.rb` file has access to helper methods. These helper methods provide useful contextual information about the project.
@@ -18,6 +19,4 @@ To call the helper in task_definitions.rb you must add `helper.` in front. So `
18
19
 
19
20
  The 2 classes which provide these special helper methods are in [ufo/dsl.rb](https://github.com/tongueroo/ufo/blob/master/lib/ufo/dsl.rb) and [ufo/dsl/helper.rb](https://github.com/tongueroo/ufo/blob/master/lib/ufo/dsl/helper.rb). Refer to these classes for the full list of the helper methods.
20
21
 
21
- <a id="prev" class="btn btn-basic" href="{% link _docs/variables.md %}">Back</a>
22
- <a id="next" class="btn btn-primary" href="{% link _docs/conventions.md %}">Next Step</a>
23
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
22
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Installation
3
+ nav_order: 3
3
4
  ---
4
5
 
5
6
  ## Install with RubyGems
@@ -31,7 +32,4 @@ For more information about the Bolts Toolbelt or to get an installer for another
31
32
  * 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.
32
33
  * AWS: Set up your AWS credentials at `~/.aws/credentials` and `~/.aws/config`. This is the [AWS standard way of setting up credentials](https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/).
33
34
 
34
- <a id="prev" class="btn btn-basic" href="{% link _docs/quick-start-ec2.md %}">Back</a>
35
- <a id="next" class="btn btn-primary" href="{% link _docs/tutorial.md %}">Next Step</a>
36
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
37
-
35
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Load Balancer Support
3
+ nav_order: 22
3
4
  ---
4
5
 
5
6
  Ufo can automatically create a load balancer and associate it with an ECS service. The options:
@@ -79,6 +80,4 @@ Under the hood, ufo implements load balancer support with CloudFormation. You ca
79
80
 
80
81
  <img src="/img/docs/cloudformation-resources.png" class="doc-photo" />
81
82
 
82
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-current.md %}">Back</a>
83
- <a id="next" class="btn btn-primary" href="{% link _docs/security-groups.md %}">Next Step</a>
84
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
83
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Database Migrations
3
+ nav_order: 37
3
4
  ---
4
5
 
5
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:
@@ -27,6 +28,4 @@ The `ufo task` command is generalized so you can run any one-off task. It is not
27
28
  2. Registers the ECS Task definition
28
29
  3. Runs a one-off ECS Task
29
30
 
30
- <a id="prev" class="btn btn-basic" href="{% link _docs/single-task.md %}">Back</a>
31
- <a id="next" class="btn btn-primary" href="{% link _docs/automated-cleanup.md %}">Next Step</a>
32
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
31
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Next Steps
3
+ nav_order: 41
3
4
  ---
4
5
 
5
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.
@@ -12,7 +13,4 @@ From here, there are a few resources that can help you continue along:
12
13
 
13
14
  Everyone can contribute to make ufo better, including the documentation. These docs are of the same ufo repo in the [docs folder](https://github.com/tongueroo/ufo/tree/master/docs). Please fork the project and open a pull request! We love your pull requests. Contributions are encouraged and welcomed!
14
15
 
15
- <a id="prev" class="btn btn-basic" href="{% link articles.md %}">Back</a>
16
- <a id="next" class="btn btn-primary" href="{% link reference.md %}">Next Step</a>
17
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
18
-
16
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Params
3
+ nav_order: 15
3
4
  ---
4
5
 
5
6
  Additionally, the params that ufo sends to the [ruby aws-sdk](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Client.html#run_task-instance_method) methods to create resources can be customized with a `params.yml` file. This allows you to customize the tool using the full power of the aws-sdk.
@@ -32,7 +33,4 @@ ERB and [shared variables]({% link _docs/variables.md %}) are available in the p
32
33
 
33
34
  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.
34
35
 
35
- <a id="prev" class="btn btn-basic" href="{% link _docs/settings-cfn.md %}">Back</a>
36
- <a id="next" class="btn btn-primary" href="{% link _docs/variables.md %}">Next Step</a>
37
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
38
-
36
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
- title: "Quick Start: EC2"
2
+ title: 'Quick Start: EC2'
3
+ nav_order: 2
3
4
  ---
4
5
 
5
6
  ## What is ECS EC2?
@@ -79,6 +80,4 @@ If you would like not to manage the EC2 server fleet, you are looking for ECS Fa
79
80
 
80
81
  Learn more in the next sections.
81
82
 
82
- <a id="prev" class="btn btn-basic" href="{% link quick-start.md %}">Back</a>
83
- <a id="next" class="btn btn-primary" href="{% link _docs/install.md %}">Next Step</a>
84
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
83
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Redirection Support
3
+ nav_order: 27
3
4
  ---
4
5
 
5
6
  ## Application Load Balancers
@@ -23,6 +24,4 @@ listener:
23
24
 
24
25
  Network Load Balancers work at layer 4, so they do not support redirection. Instead you need to handle redirection within your app.
25
26
 
26
- <a id="prev" class="btn btn-basic" href="{% link _docs/route53-support.md %}">Back</a>
27
- <a id="next" class="btn btn-primary" href="{% link _docs/faq.md %}">Next Step</a>
28
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
27
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Route53 Support
3
+ nav_order: 26
3
4
  ---
4
5
 
5
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:
@@ -23,6 +24,4 @@ Results in:
23
24
  aws route53 create-hosted-zone --name mydomain.com --caller-reference $(date +%s)
24
25
  aws route53 list-hosted-zones
25
26
 
26
- <a id="prev" class="btn btn-basic" href="{% link _docs/ssl-support.md %}">Back</a>
27
- <a id="next" class="btn btn-primary" href="{% link _docs/redirection-support.md %}">Next Step</a>
28
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
27
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Run in Pieces
3
+ nav_order: 35
3
4
  ---
4
5
 
5
6
  The `ufo ship` command goes through a few stages:
@@ -32,6 +33,4 @@ ufo deploy demo-web
32
33
 
33
34
  Note if you use the `ufo deploy` you should ensure that you have already pushed the docker image to your docker registry. Or else the task will not be able to spin up because the docker image does not exist. This is one of the reasons it is recommended that you use `ufo ship`.
34
35
 
35
- <a id="prev" class="btn btn-basic" href="{% link _docs/upgrade4.md %}">Back</a>
36
- <a id="next" class="btn btn-primary" href="{% link _docs/single-task.md %}">Next Step</a>
37
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
36
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Security Groups
3
+ nav_order: 23
3
4
  ---
4
5
 
5
6
  Ufo creates and manages two security groups. One for the ELB and one for the ECS tasks.
@@ -32,6 +33,4 @@ In general, ports below 32768 are outside of the ephemeral port range. So an eas
32
33
 
33
34
  If you are using a network load balancer and are running bridge network mode, then you need to whitelist ports 32768 to 65535 to `0.0.0.0/0`. This is because network load balancers operate at layer 4 of the OSI model and cannot be assigned security groups, so they use the security group of the instance. If you feel this is too loose of permissions, you can use awsvpc mode. There are some considerations for awsvpc mode though which is discussed next.
34
35
 
35
- <a id="prev" class="btn btn-basic" href="{% link _docs/load-balancer.md %}">Back</a>
36
- <a id="next" class="btn btn-primary" href="{% link _docs/ecs-network-mode.md %}">Next Step</a>
37
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
36
+ {% include prev_next.md %}
@@ -1,11 +1,10 @@
1
1
  ---
2
2
  title: Settings Cfn
3
+ nav_order: 14
3
4
  ---
4
5
 
5
6
  ## Customizing Resources
6
7
 
7
8
  {% include cfn-customize.md %}
8
9
 
9
- <a id="prev" class="btn btn-basic" href="{% link _docs/settings-network.md %}">Back</a>
10
- <a id="next" class="btn btn-primary" href="{% link _docs/params.md %}">Next Step</a>
11
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
10
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Settings Network
3
+ nav_order: 13
3
4
  ---
4
5
 
5
6
  The settings.yml file references a network settings file with the `network_profile` option. This file has configurations that are related to the network. The source code for the starter template file is at [network/default.yml.tt](https://github.com/tongueroo/ufo/blob/master/lib/template/.ufo/settings/network/default.yml.tt) Here's an example network settings file.
@@ -29,6 +30,4 @@ elb_subnets | Used to create elb load balancer. Defaults to same subnets as ecs
29
30
  ecs_security_groups | Additional security groups to associate with the ECS tasks.
30
31
  elb_security_groups | Additional security groups to associate with the ELB.
31
32
 
32
- <a id="prev" class="btn btn-basic" href="{% link _docs/settings.md %}">Back</a>
33
- <a id="next" class="btn btn-primary" href="{% link _docs/settings-cfn.md %}">Next Step</a>
34
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
33
+ {% include prev_next.md %}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Settings
3
+ nav_order: 12
3
4
  ---
4
5
 
5
6
  The behavior of ufo can be configured with a `settings.yml` file. A starter project `.ufo/settings.yml` file is generated as part of the `ufo init` command. There are can be multiple settings files. The options from the files get merged and respected in the following precedence:
@@ -22,24 +23,19 @@ development:
22
23
  # cluster: dev # uncomment if you want the cluster name be other than the default
23
24
  # the default is to match UFO_ENV. So UFO_ENV=development means the ECS
24
25
  # cluster will be name development
25
- # When you have AWS_PROFILE set to one of these values, ufo will switch to the desired
26
- # environment. This prevents you from switching AWS_PROFILE, forgetting to
27
- # also switch UFO_ENV, and accidentally deploying to production vs development.
28
- # aws_profiles:
29
- # - dev_profile1
30
- # - dev_profile2
26
+ # The aws_profile tightly binds UFO_ENV to AWS_PROFILE and vice-versa.
27
+ # aws_profile: dev_profile
31
28
 
32
29
  production:
33
30
  # cluster: prod
34
- # aws_profiles:
35
- # - prod_profile
31
+ # aws_profile: prod_profile
36
32
  ```
37
33
 
38
34
  The table below covers each setting:
39
35
 
40
36
  Setting | Description
41
37
  ------------- | -------------
42
- `aws_profiles` | If you have the `AWS_PROFILE` environment variable set, this will ensure that you are deploying the right `UFO_ENV` to the right AWS environment. It is explained below.
38
+ `aws_profile` | If you have the `AWS_PROFILE` environment variable set, this will ensure that you are deploying the right `UFO_ENV` to the right AWS environment. It is explained below.
43
39
  `cfn_profile` | The name of the cfn profile settings file to use. Maps to .ufo/settings/cfn/NAME.yml file
44
40
  `clean_keep` | Docker images generated from ufo are cleaned up automatically for you at the end of `ufo ship`. This controls how many docker images to keep around. The default is 3.
45
41
  `cluster` | By convention, the ECS cluster that ufo deploys to matches the `UFO_ENV`. If `UFO=development`, then `ufo ship` deploys to the `development` ECS cluster. This is option overrides this convention.
@@ -86,29 +82,30 @@ production:
86
82
 
87
83
  ## AWS_PROFILE support
88
84
 
89
- An interesting option is `aws_profiles`. Here's an example:
85
+ An interesting option is `aws_profile`. Here's an example:
90
86
 
91
87
  ```yaml
92
88
  development:
93
- aws_profiles:
94
- - dev-profile1
95
- - dev-profile2
89
+ aws_profile: dev_profile
96
90
 
97
91
  production:
98
- aws_profiles:
99
- - prod-profile
92
+ aws_profile: prod_profile
100
93
  ```
101
94
 
102
- In this case, when you set the environment variable `AWS_PROFILE` to switch AWS profiles in your shell, ufo picks this up and maps the `AWS_PROFILE` value to the specified `UFO_ENV` using the `aws_profiles` option. Example:
95
+ This provides a way to tightly bind `UFO_ENV` to `AWS_PROFILE`. This prevents you from forgetting to switch your `UFO_ENV` when switching your `AWS_PROFILE` thereby accidentally launching a stack in the wrong environment.
103
96
 
104
- ```sh
105
- AWS_PROFILE=dev-profile1 => UFO_ENV=development
106
- AWS_PROFILE=dev-profile2 => UFO_ENV=development
107
- AWS_PROFILE=prod-profile => UFO_ENV=production
108
- ```
97
+
98
+ AWS_PROFILE | UFO_ENV | Notes
99
+ --- | --- | ---
100
+ dev_profile | development
101
+ prod_profile | production
102
+ whatever | development | default since whatever is not found in settings.yml
103
+
104
+ The binding is two-way. So:
105
+
106
+ UFO_ENV=production ufo ship # will deploy to the AWS_PROFILE=prod_profile
107
+ AWS_PROFILE=prod_profile ufo ship # will deploy to the UFO_ENV=production
109
108
 
110
109
  This behavior prevents you from switching `AWS_PROFILE`s, forgetting to switch `UFO_ENV` and then accidentally deploying a production based docker image to development and vice versa because you forgot to also switch `UFO_ENV` to its respective environment.
111
110
 
112
- <a id="prev" class="btn btn-basic" href="{% link _docs/structure.md %}">Back</a>
113
- <a id="next" class="btn btn-primary" href="{% link _docs/settings-network.md %}">Next Step</a>
114
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
111
+ {% include prev_next.md %}