ufo 3.1.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/bin/commit_docs.sh +26 -0
  3. data/.circleci/config.yml +13 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile.lock +6 -4
  6. data/Rakefile +7 -0
  7. data/docs/_config.yml +3 -0
  8. data/docs/_docs/conventions.md +3 -3
  9. data/docs/_docs/install.md +5 -5
  10. data/docs/_docs/settings.md +3 -3
  11. data/docs/_docs/structure.md +2 -2
  12. data/docs/_docs/tutorial-ufo-docker-build.md +1 -1
  13. data/docs/_docs/tutorial-ufo-init.md +1 -1
  14. data/docs/_docs/tutorial-ufo-ship.md +3 -7
  15. data/docs/_docs/tutorial-ufo-ships.md +2 -2
  16. data/docs/_docs/tutorial-ufo-tasks-build.md +7 -7
  17. data/docs/_docs/tutorial.md +1 -1
  18. data/docs/_docs/ufo-env.md +5 -5
  19. data/docs/_docs/ufo-tasks-register.md +0 -4
  20. data/docs/_docs/variables.md +6 -7
  21. data/docs/_includes/content.html +5 -0
  22. data/docs/_includes/css/main.css +23 -4
  23. data/docs/_includes/css/ufo.css +9 -9
  24. data/docs/_includes/reference.md +5 -0
  25. data/docs/_includes/subnav.html +16 -33
  26. data/docs/_reference/ufo-completion.md +46 -0
  27. data/docs/_reference/ufo-completion_script.md +27 -0
  28. data/docs/_reference/ufo-deploy.md +51 -0
  29. data/docs/_reference/ufo-destroy.md +34 -0
  30. data/docs/{_docs → _reference}/ufo-docker-base.md +36 -17
  31. data/docs/_reference/ufo-docker-build.md +81 -0
  32. data/docs/_reference/ufo-docker-clean.md +44 -0
  33. data/docs/_reference/ufo-docker-help.md +15 -0
  34. data/docs/_reference/ufo-docker-name.md +37 -0
  35. data/docs/_reference/ufo-docker-push.md +49 -0
  36. data/docs/_reference/ufo-docker.md +35 -0
  37. data/docs/_reference/ufo-init.md +74 -0
  38. data/docs/_reference/ufo-scale.md +30 -0
  39. data/docs/_reference/ufo-ship.md +100 -0
  40. data/docs/_reference/ufo-ships.md +77 -0
  41. data/docs/_reference/ufo-task.md +37 -0
  42. data/docs/_reference/ufo-tasks-build.md +179 -0
  43. data/docs/_reference/ufo-tasks-help.md +15 -0
  44. data/docs/_reference/ufo-tasks-register.md +29 -0
  45. data/docs/_reference/ufo-tasks.md +35 -0
  46. data/docs/_reference/ufo-upgrade3.md +23 -0
  47. data/docs/_reference/ufo-version.md +23 -0
  48. data/docs/articles.md +2 -0
  49. data/docs/docs.md +3 -3
  50. data/docs/quick-start.md +2 -2
  51. data/docs/reference.md +18 -0
  52. data/lib/ufo/cli.rb +13 -13
  53. data/lib/ufo/docker.rb +5 -5
  54. data/lib/ufo/ecr/auth.rb +6 -1
  55. data/lib/ufo/ecr/cleaner.rb +1 -1
  56. data/lib/ufo/help/completion.md +1 -1
  57. data/lib/ufo/help/completions.md +1 -1
  58. data/lib/ufo/help/deploy.md +5 -1
  59. data/lib/ufo/help/destroy.md +7 -3
  60. data/lib/ufo/help/docker.md +1 -1
  61. data/lib/ufo/help/docker/base.md +34 -4
  62. data/lib/ufo/help/docker/build.md +59 -4
  63. data/lib/ufo/help/docker/clean.md +12 -6
  64. data/lib/ufo/help/docker/name.md +10 -10
  65. data/lib/ufo/help/docker/push.md +23 -6
  66. data/lib/ufo/help/hello.md +1 -1
  67. data/lib/ufo/help/init.md +43 -5
  68. data/lib/ufo/help/scale.md +4 -3
  69. data/lib/ufo/help/ship.md +59 -8
  70. data/lib/ufo/help/ships.md +35 -9
  71. data/lib/ufo/help/task.md +1 -1
  72. data/lib/ufo/help/tasks.md +1 -1
  73. data/lib/ufo/help/tasks/build.md +155 -4
  74. data/lib/ufo/help/tasks/register.md +12 -3
  75. data/lib/ufo/ship.rb +2 -4
  76. data/lib/ufo/tasks.rb +2 -2
  77. data/lib/ufo/version.rb +1 -1
  78. data/spec/lib/ship_spec.rb +2 -1
  79. data/ufo.gemspec +3 -3
  80. metadata +44 -21
  81. data/docs/_docs/commands.md +0 -10
  82. data/docs/_docs/ufo-deploy.md +0 -30
  83. data/docs/_docs/ufo-destroy.md +0 -19
  84. data/docs/_docs/ufo-docker-build.md +0 -79
  85. data/docs/_docs/ufo-docker-clean.md +0 -27
  86. data/docs/_docs/ufo-docker-name.md +0 -15
  87. data/docs/_docs/ufo-docker-push.md +0 -43
  88. data/docs/_docs/ufo-help.md +0 -22
  89. data/docs/_docs/ufo-init.md +0 -54
  90. data/docs/_docs/ufo-scale.md +0 -21
  91. data/docs/_docs/ufo-ship.md +0 -75
  92. data/docs/_docs/ufo-ships.md +0 -52
  93. data/docs/_docs/ufo-tasks-build.md +0 -166
  94. data/lib/ufo/completion.rb +0 -15
  95. data/lib/ufo/sub.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82ae766d7898605cd34a3c649d78b9b09167032da7671f2b96c2d48a9f399869
4
- data.tar.gz: 071b075649fad43445e648212f5f0757b9f3fb8dbf26a8ffd66edb636f6cdcc6
3
+ metadata.gz: c1894588cde21064b0558cbe90861eddc03879b7ff874906f39a6375998d5667
4
+ data.tar.gz: b613a20c65a8d7c8e9bb7b436c923fcf19f3a0514d054dc5e5a4919d03c4890d
5
5
  SHA512:
6
- metadata.gz: 342dc28256785eaf52a64e86dbf1a3f8287e5297697ab69dbf864ca61846089491a87d77cec1e4998708a2a26a6e05c2f17973cb2f93499355fc56e28e1582e8
7
- data.tar.gz: 71f1508d882070f67a7b10b3088cd98a522f37897891beeec2202943eee55826856c3189541a6db1cb31c92d4a9eade3abbbe4b1e1c00397f55012fcbcf07d1a
6
+ metadata.gz: 36c17e42e5a9f317058565338bde9e0c5cfd249152df58271554e8303378fd559687f348c1a5134e027d29842d9473489e7b45db937950f23a5e455578637c3c
7
+ data.tar.gz: 9e57675fbf2129208255cefeecc94849968d56aa1c868a30837fc813a710d7a0d2c7c0d7f5d85bf8e067662fd6c03e90e2cc9729ee70717ba5d47a227e079fe6
@@ -0,0 +1,26 @@
1
+ #!/bin/bash -eux
2
+
3
+ # Even though specs also generate docs, lets run again to ensure clean slate
4
+ rake docs
5
+
6
+ out=$(git status docs)
7
+ if [[ "$out" = *"nothing to commit"* ]]; then
8
+ exit
9
+ fi
10
+
11
+ COMMIT_MESSAGE="docs updated by circleci"
12
+
13
+ # If the last commit already updated the docs, then exit.
14
+ # Preventable measure to avoid infinite loop.
15
+ if git log -1 --pretty=oneline | grep "$COMMIT_MESSAGE" ; then
16
+ exit
17
+ fi
18
+
19
+ # If reach here, we have some changes on docs that we should commit.
20
+ # Even though s
21
+ git add docs
22
+ git commit -m "$COMMIT_MESSAGE"
23
+
24
+ # https://makandracards.com/makandra/12107-git-show-current-branch-name-only
25
+ current_branch=$(git rev-parse --abbrev-ref HEAD)
26
+ git push origin "$current_branch"
@@ -42,6 +42,13 @@ jobs:
42
42
  - ./vendor/bundle
43
43
  key: v1-dependencies-{{ checksum "Gemfile" }}
44
44
 
45
+ # specs need git configured ad commit_docs.sh required it also
46
+ - run:
47
+ name: configure git
48
+ command: |
49
+ git config --global user.email "tongueroo@gmail.com"
50
+ git config --global user.name "Tung Nguyen"
51
+
45
52
  # run tests!
46
53
  - run:
47
54
  name: run tests
@@ -49,6 +56,12 @@ jobs:
49
56
  mkdir /tmp/test-results
50
57
  bundle exec rspec
51
58
 
59
+ - run:
60
+ name: commit cli reference docs
61
+ command: |
62
+ chmod a+x -R .circleci/bin
63
+ .circleci/bin/commit_docs.sh
64
+
52
65
  # collect reports
53
66
  - store_test_results:
54
67
  path: /tmp/test-results
@@ -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
+ ## [3.2.0]
7
+ - pr #23 from tongueroo/cli_markdown: http://ufoships.com/reference/ section now available
8
+ - pr #24 from tongueroo/circleci
9
+ - pr #25 from tongueroo/ecr-auth-legacy-docker-fix: ecr auth: also write legacy_entry to .docker/config.json
10
+ - fix ensure_cluster_exist for inactive cluster bug fix
11
+
6
12
  ## [3.1.2]
7
13
  - upgrade3 updates .gitignore also
8
14
 
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ufo (3.1.0)
4
+ ufo (3.1.2)
5
5
  aws-sdk-cloudwatchlogs
6
6
  aws-sdk-ec2
7
7
  aws-sdk-ecr
8
8
  aws-sdk-ecs
9
9
  aws-sdk-elasticloadbalancingv2
10
+ cli_markdown
10
11
  colorize
11
12
  deep_merge
12
13
  plissken
@@ -21,7 +22,7 @@ GEM
21
22
  i18n (~> 0.7)
22
23
  minitest (~> 5.1)
23
24
  tzinfo (~> 1.1)
24
- aws-partitions (1.65.0)
25
+ aws-partitions (1.67.0)
25
26
  aws-sdk-cloudwatchlogs (1.2.0)
26
27
  aws-sdk-core (~> 3)
27
28
  aws-sigv4 (~> 1.0)
@@ -38,11 +39,12 @@ GEM
38
39
  aws-sdk-ecs (1.8.0)
39
40
  aws-sdk-core (~> 3)
40
41
  aws-sigv4 (~> 1.0)
41
- aws-sdk-elasticloadbalancingv2 (1.7.0)
42
+ aws-sdk-elasticloadbalancingv2 (1.8.0)
42
43
  aws-sdk-core (~> 3)
43
44
  aws-sigv4 (~> 1.0)
44
45
  aws-sigv4 (1.0.2)
45
46
  byebug (10.0.0)
47
+ cli_markdown (0.1.0)
46
48
  codeclimate-test-reporter (1.0.8)
47
49
  simplecov (<= 0.13)
48
50
  colorize (0.8.1)
@@ -57,7 +59,7 @@ GEM
57
59
  minitest (5.11.3)
58
60
  plissken (1.2.0)
59
61
  rake (12.3.0)
60
- render_me_pretty (0.7.0)
62
+ render_me_pretty (0.7.1)
61
63
  activesupport
62
64
  colorize
63
65
  tilt
data/Rakefile CHANGED
@@ -4,3 +4,10 @@ require "rspec/core/rake_task"
4
4
  task :default => :spec
5
5
 
6
6
  RSpec::Core::RakeTask.new
7
+
8
+ require_relative "lib/ufo"
9
+ require "cli_markdown"
10
+ desc "Generates cli reference docs as markdown"
11
+ task :docs do
12
+ CliMarkdown::Creator.create_all(cli_class: Ufo::CLI, cli_name: "ufo")
13
+ end
@@ -61,6 +61,9 @@ collections:
61
61
  docs:
62
62
  name: "Documentation"
63
63
  output: true
64
+ reference:
65
+ name: "Reference"
66
+ output: true
64
67
 
65
68
  defaults:
66
69
  - values:
@@ -4,11 +4,11 @@ title: Conventions
4
4
 
5
5
  Ufo uses a set of naming conventions. This helps enforce some best practices and also allows the ufo commands to be concise. Ufo allows you to easily override or bypass the conventions if you need it.
6
6
 
7
- ### UFO_ENV to ECS Cluster Convention
7
+ ## UFO_ENV to ECS Cluster Convention
8
8
 
9
9
  By default, the ECS cluster value is the same as UFO_ENV's value. So if `UFO_ENV=production` then the ECS Cluster is `production` and if `UFO_ENV=development` then the ECS Cluster is `development`. You can easily override this convention by specifying the `--cluster` CLI option. You can also override this behavior with [settings.yml]({% link _docs/settings.md %}) to spare you from having to type `--cluster` over and over.
10
10
 
11
- ### Service and Task Names Convention
11
+ ## Service and Task Names Convention
12
12
 
13
13
  Ufo assumes a convention that service\_name and the task\_name are the same. If you would like to override this convention then you can specify the task name.
14
14
 
@@ -29,7 +29,7 @@ end
29
29
 
30
30
  ```
31
31
 
32
- ### Web Role Convention
32
+ ## Web Role Convention
33
33
 
34
34
  By convention, if the service has a container name web, you'll get prompted to create an ELB and specify a target group arn. If you would like to name a service with the word "web" in it without having to use an ELB target group then you can use the `--no-target-group-prompt`. Example:
35
35
 
@@ -2,7 +2,7 @@
2
2
  title: Installation
3
3
  ---
4
4
 
5
- ### Install with RubyGems
5
+ ## Install with RubyGems
6
6
 
7
7
  You can install ufo with RubyGems:
8
8
 
@@ -16,7 +16,7 @@ Or you can add ufo to your Gemfile in your project if you are working with a rub
16
16
  gem "ufo"
17
17
  {% endhighlight %}
18
18
 
19
- ### Install with Bolts Toolbelt
19
+ ## Install with Bolts Toolbelt
20
20
 
21
21
  If you want to quickly install ufo without having to worry about ufo's dependencies you can simply install the Bolts Toolbelt which has ufo included.
22
22
 
@@ -26,12 +26,12 @@ brew cask install boltopslabs/software/bolts
26
26
 
27
27
  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)
28
28
 
29
- ### Dependencies
29
+ ## Dependencies
30
30
 
31
31
  * 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
32
  * 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
33
 
34
- <a id="prev" class="btn btn-basic" href="/docs/">Back</a>
35
- <a id="next" class="btn btn-primary" href="{% link _docs/structure.md %}">Next Step</a>
34
+ <a id="prev" class="btn btn-basic" href="{% link quick-start.md %}">Back</a>
35
+ <a id="next" class="btn btn-primary" href="{% link _docs/tutorial.md %}">Next Step</a>
36
36
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
37
37
 
@@ -48,7 +48,7 @@ Setting | Description
48
48
  `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.
49
49
  `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
50
50
 
51
- ### ECS Cluster Convention
51
+ ## ECS Cluster Convention
52
52
 
53
53
  Normally, the ECS cluster defaults to whatever UFO_ENV is set to by [convention]({% link _docs/conventions.md %}). For example, when `UFO_ENV=production` the ECS Cluster is `production` and when `UFO_ENV=development` the ECS Cluster is `development`. There are several ways to override this behavior. Let's go through an example:
54
54
 
@@ -85,7 +85,7 @@ production:
85
85
  ```
86
86
 
87
87
 
88
- ### AWS_PROFILE support
88
+ ## AWS_PROFILE support
89
89
 
90
90
  An interesting option is `aws_profiles`. Here's an example:
91
91
 
@@ -110,7 +110,7 @@ AWS_PROFILE=prod-profile => UFO_ENV=production
110
110
 
111
111
  This behavior prevents you from switching `AWS_PROFILE`s and then accidentally deploying a production based docker image to development and vice versas because you forgot to also switch `UFO_ENV` to its respective environment.
112
112
 
113
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-help.md %}">Back</a>
113
+ <a id="prev" class="btn btn-basic" href="{% link _docs/structure.md %}">Back</a>
114
114
  <a id="next" class="btn btn-primary" href="{% link _docs/ufo-env.md %}">Next Step</a>
115
115
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
116
116
 
@@ -30,7 +30,7 @@ File / Directory | Description
30
30
 
31
31
  Now that you know where the ufo configurations are located and what they look like. Let use ufo!
32
32
 
33
- <a id="prev" class="btn btn-basic" href="{% link _docs/install.md %}">Back</a>
34
- <a id="next" class="btn btn-primary" href="{% link _docs/tutorial.md %}">Next Step</a>
33
+ <a id="prev" class="btn btn-basic" href="{% link docs.md %}">Back</a>
34
+ <a id="next" class="btn btn-primary" href="{% link _docs/settings.md %}">Next Step</a>
35
35
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
36
36
 
@@ -2,7 +2,7 @@
2
2
  title: Build Docker
3
3
  ---
4
4
 
5
- ### Build the Docker Image
5
+ ## Build the Docker Image
6
6
 
7
7
  Let's use the `ufo docker build` command to build the docker image. The command uses the `Dockerfile` in the current project to build the docker image. You use your own Dockerfile so you have fully control over how you would like the image to be built. For this tutorial we will continue to use the [tongueroo/hi](https://github.com/tongueroo/hi) app and it's Dockerfile. Let's run the command:
8
8
 
@@ -52,7 +52,7 @@ The `ufo init` command generated a few starter ufo files for you. The standard d
52
52
 
53
53
  The explanation of the folders and files were covered in detailed earlier at [Structure]({% link _docs/structure.md %}).
54
54
 
55
- ### Settings
55
+ ## Settings
56
56
 
57
57
  Take a look at the `settings.yml` file and notice that it contains some default configuration settings so you do not have to type out these options repeatedly for some of the ufo commands.
58
58
 
@@ -2,7 +2,7 @@
2
2
  title: Deploy One App
3
3
  ---
4
4
 
5
- ### Step 3 - Ship the Code to ECS
5
+ ## Step 3 - Ship the Code to ECS
6
6
 
7
7
  In this guide we have walked through what ufo does step by step. First ufo builds the Docker image with `ufo docker build`. Then it will build and register the ECS task definitions with the `ufo tasks` commands. Now we'll deploy the code to ECS.
8
8
 
@@ -68,11 +68,11 @@ Checking the ECS console you should see something like this:
68
68
 
69
69
  You have successfully shipped a docker image to ECS! 🍾🥂
70
70
 
71
- ### Skipping Previous Steps Method
71
+ ## Skipping Previous Steps Method
72
72
 
73
73
  You should notice that `ufo ship` re-built the docker image and re-registered the task definitions. The `ufo ship` command is designed to run everything in one simple command, so we do not have to manually call the commands in the previous pages: `ufo build` and `ufo tasks`.
74
74
 
75
- If you would like to skip the first 2 steps, then you can use the [ufo deploy]({% link _docs/ufo-deploy.md %}) instead. The `ufo deploy` command will:
75
+ If you would like to skip the first 2 steps, then you can use the [ufo deploy]({% link _reference/ufo-deploy.md %}) instead. The `ufo deploy` command will:
76
76
 
77
77
  1. register the task definition in `.ufo/output/hi-web.json` unmodified
78
78
  2. update the ECS service
@@ -95,7 +95,3 @@ Normally you run everything together in one `ufo ship` command though. Ufo take
95
95
 
96
96
  Congratulations 🎊 You have successfully built a Docker image, register it and deployed it to AWS ECS.
97
97
 
98
- <a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-tasks-build.md %}">Back</a>
99
- <a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-ships.md %}">Next Step</a>
100
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
101
-
@@ -16,7 +16,7 @@ ufo ship hi-clock
16
16
 
17
17
  This would build a new Docker image for each process. We actually want have the same docker image running on all of these roles. In this case where we want to use the *same* Docker image for all 3 roles, ufo provides a `ufo ships` command.
18
18
 
19
- ### ufo ships
19
+ ## ufo ships
20
20
 
21
21
  ```sh
22
22
  ufo ships hi-web hi-worker hi-clock
@@ -33,5 +33,5 @@ ufo ships hi-{web,worker,clock}
33
33
  ```
34
34
 
35
35
  <a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-ship.md %}">Back</a>
36
- <a id="next" class="btn btn-primary" href="{% link _docs/commands.md %}">Next Step</a>
36
+ <a id="next" class="btn btn-primary" href="{% link docs.md %}">Next Step</a>
37
37
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -2,7 +2,7 @@
2
2
  title: Task Definitions
3
3
  ---
4
4
 
5
- ### Build the ECS Task Definitions
5
+ ## Build the ECS Task Definitions
6
6
 
7
7
  Now that we have a docker image pushed to a registry we can use that image for ECS. Ufo takes that image and adds it to an ECS task definition. This is where ufo is super powerful. Ufo gives you the power to build and control your ECS task definition easily.
8
8
 
@@ -11,7 +11,7 @@ Let's take a look at the 2 files that are used by ufo to build the ECS task defi
11
11
  1. ufo/templates/main.json.erb
12
12
  2. ufo/task_definitions.rb
13
13
 
14
- Ufo task definitions are written as an ERB template that makes it every easily accessible and configurable to your requirements. Here is is an example of an ERB template `ufo/templates/main.json.erb` that shows how easy it is to modfied the task definition you want to be uploaded by ufo:
14
+ Ufo task definitions are written as an ERB template that makes it every easily accessible and configurable to your requirements. Here is is an example of an ERB template `.ufo/templates/main.json.erb` that shows how easy it is to modfied the task definition you want to be uploaded by ufo:
15
15
 
16
16
  **ufo/templates/main.json.erb**:
17
17
 
@@ -34,7 +34,7 @@ Ufo task definitions are written as an ERB template that makes it every easily a
34
34
  }
35
35
  ```
36
36
 
37
- The instance variable values are specified in `ufo/task_definitions.rb` via a DSL. Here's the file:
37
+ The instance variable values are specified in `.ufo/task_definitions.rb` via a DSL. Here's the file:
38
38
 
39
39
  **ufo/task_definitions.rb**:
40
40
 
@@ -59,7 +59,7 @@ task_definition "hi-worker" do
59
59
  end
60
60
  ```
61
61
 
62
- ### Shared Variables
62
+ ## Shared Variables
63
63
 
64
64
  Ufo has a concept of shared variables, covered in [Shared Variables]({% link _docs/variables.md %}). The shared variables are set in the `variables` folder and essentially allow you to use a set of shared variables through your templates:
65
65
 
@@ -81,7 +81,7 @@ Ufo has a concept of shared variables, covered in [Shared Variables]({% link _do
81
81
  })
82
82
  ```
83
83
 
84
- Ufo combines the `main.json.erb` template, `task_definitions.rb` definitions, and variables in the `ufo/variables` folder. It then generates the raw AWS formatted task definition in the `output` folder.
84
+ Ufo combines the `main.json.erb` template, `task_definitions.rb` definitions, and variables in the `.ufo/variables` folder. It then generates the raw AWS formatted task definition in the `output` folder.
85
85
 
86
86
  If you need to modify the task definition template to suite your own needs it is super simple, just edit `main.json.erb`. You do not have to dive deep into internal code somewhere. It is all there for you to fully control.
87
87
 
@@ -106,7 +106,7 @@ Task Definitions built in .ufo/output
106
106
  $
107
107
  ```
108
108
 
109
- Let's take a look at one of the generated files: `ufo/output/hi-web.json`.
109
+ Let's take a look at one of the generated files: `.ufo/output/hi-web.json`.
110
110
 
111
111
  ```json
112
112
  {
@@ -148,7 +148,7 @@ Let's take a look at one of the generated files: `ufo/output/hi-web.json`.
148
148
  }
149
149
  ```
150
150
 
151
- ### Register the ECS Task Definitions
151
+ ## Register the ECS Task Definitions
152
152
 
153
153
  You have built the ecs task definitions locally on your machine. To register the task definitions in the `output` folder run:
154
154
 
@@ -10,6 +10,6 @@ In the next sections, we'll walk through using ufo in detail. We will ufo-ify a
10
10
 
11
11
  Let's start!
12
12
 
13
- <a id="prev" class="btn btn-basic" href="{% link _docs/structure.md %}">Back</a>
13
+ <a id="prev" class="btn btn-basic" href="{% link _docs/install.md %}">Back</a>
14
14
  <a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-init.md %}">Next Step</a>
15
15
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -4,7 +4,7 @@ title: UFO_ENV
4
4
 
5
5
  Ufo's behavior is controlled by the `UFO_ENV` environment variable. For example, the `UFO_ENV` variable is used to layer different ufo variable files together to make it easy to specify settings for different environments like production and development. This is covered thoroughly in the [Variables]({% link _docs/variables.md %}) section. `UFO_ENV` defaults to `development` when not set.
6
6
 
7
- ### Setting UFO_ENV
7
+ ## Setting UFO_ENV
8
8
 
9
9
  The `UFO_ENV` can be set in several ways:
10
10
 
@@ -12,13 +12,13 @@ The `UFO_ENV` can be set in several ways:
12
12
  2. Exported as an environment variable to your shell - This takes the second highest precedence.
13
13
  3. From the `aws_profiles` setting in your `settings.yml` file - This takes the lowest precedence.
14
14
 
15
- ### At the CLI Command
15
+ ## At the CLI Command
16
16
 
17
17
  ```sh
18
18
  ufo ship hi-web --cluster production
19
19
  ```
20
20
 
21
- ### As an environment variable
21
+ ## As an environment variable
22
22
 
23
23
  ```sh
24
24
  export UFO_ENV=production
@@ -27,9 +27,9 @@ ufo ship hi-web
27
27
 
28
28
  Most people will set `UFO_ENV` in their `~/.profile`.
29
29
 
30
- ### In ufo/settings.yml
30
+ ## In ufo/settings.yml
31
31
 
32
- The most interesting way to set `UFO_ENV` is with the `aws_profiles` setting in `ufo/settings.yml`. Let's say you have a `~/.ufo/settings.yml` with the following:
32
+ The most interesting way to set `UFO_ENV` is with the `aws_profiles` setting in `.ufo/settings.yml`. Let's say you have a `~/.ufo/settings.yml` with the following:
33
33
 
34
34
  ```yaml
35
35
  development:
@@ -20,7 +20,3 @@ You can verify that the task definitions have been registered properly by viewin
20
20
 
21
21
  <img src="/img/tutorials/ecs-console-task-definitions.png" class="doc-photo" />
22
22
 
23
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-tasks-build.md %}">Back</a>
24
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-help.md %}">Next Step</a>
25
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
26
-
@@ -2,7 +2,7 @@
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 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.
6
6
 
7
7
  For example, given `variables/base.rb`:
8
8
 
@@ -13,13 +13,13 @@ For example, given `variables/base.rb`:
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 declaring 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 explicitly declaring them in the `.ufo/task_definitions.rb` file. Variables are automatically made available to all templates and the `task_definition.rb` file also.
17
17
 
18
- ### Layering
18
+ ## Layering
19
19
 
20
20
  Shared variables also support a concept called layering. The `variables/base.rb` file is treated specially and will always be evaluated. Additionally, ufo will also evaluate the `variables/[UFO_ENV].rb` according to what UFO_ENV's value is. Thanks to layering, you can easily override variables to suit different environments like `production` or `development`. For example:
21
21
 
22
- `ufo/variables/base.rb`:
22
+ `.ufo/variables/base.rb`:
23
23
 
24
24
  ```ruby
25
25
  @image = helper.full_image_name # includes the git sha tongueroo/hi:ufo-[sha].
@@ -30,7 +30,7 @@ Shared variables also support a concept called layering. The `variables/base.rb
30
30
 
31
31
  When `ufo ship` is ran with `UFO_ENV=production` he `variables/production.rb` will be evaluated and layered on top of the variables defined in `base.rb:
32
32
 
33
- `ufo/variables/production.rb`:
33
+ `.ufo/variables/production.rb`:
34
34
 
35
35
  ```ruby
36
36
  @environment = helper.env_vars(%Q[
@@ -42,7 +42,7 @@ When `ufo ship` is ran with `UFO_ENV=production` he `variables/production.rb` wi
42
42
  When `ufo ship` is ran with `UFO_ENV=development` the `variables/development.rb` will be evaluated and layered on top of the variables defined in `base.rb:
43
43
 
44
44
 
45
- `ufo/variables/development.rb`:
45
+ `.ufo/variables/development.rb`:
46
46
 
47
47
  ```ruby
48
48
  @environment = helper.env_vars(%Q[
@@ -51,7 +51,6 @@ When `ufo ship` is ran with `UFO_ENV=development` the `variables/development.rb`
51
51
  ])
52
52
  ```
53
53
 
54
-
55
54
  <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-env.md %}">Back</a>
56
55
  <a id="next" class="btn btn-primary" href="{% link _docs/helpers.md %}">Next Step</a>
57
56
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>