ufo 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +7 -7
  4. data/docs/.gitignore +4 -0
  5. data/docs/CNAME +1 -0
  6. data/docs/Gemfile +3 -0
  7. data/docs/LICENSE +21 -0
  8. data/docs/README.md +21 -0
  9. data/docs/_config.yml +69 -0
  10. data/docs/_docs/commands.md +10 -0
  11. data/docs/_docs/conventions.md +45 -0
  12. data/docs/_docs/install.md +32 -0
  13. data/docs/_docs/next-steps.md +18 -0
  14. data/docs/_docs/structure.md +31 -0
  15. data/docs/_docs/tutorial-ufo-docker-build.md +68 -0
  16. data/docs/_docs/tutorial-ufo-init.md +34 -0
  17. data/docs/_docs/tutorial-ufo-ship.md +64 -0
  18. data/docs/_docs/tutorial-ufo-ships.md +28 -0
  19. data/docs/_docs/tutorial-ufo-tasks-build.md +166 -0
  20. data/docs/_docs/tutorial.md +15 -0
  21. data/docs/_docs/ufo-destroy.md +20 -0
  22. data/docs/_docs/ufo-docker-base.md +42 -0
  23. data/docs/_docs/ufo-docker-build.md +79 -0
  24. data/docs/_docs/ufo-docker-clean.md +27 -0
  25. data/docs/_docs/ufo-docker-name.md +15 -0
  26. data/docs/_docs/ufo-help.md +22 -0
  27. data/docs/_docs/ufo-init.md +37 -0
  28. data/docs/_docs/ufo-scale.md +22 -0
  29. data/docs/_docs/ufo-settings.md +57 -0
  30. data/docs/_docs/ufo-ship.md +75 -0
  31. data/docs/_docs/ufo-ships.md +52 -0
  32. data/docs/_docs/ufo-tasks-build.md +150 -0
  33. data/docs/_docs/ufo-tasks-register.md +26 -0
  34. data/docs/_includes/about.html +19 -0
  35. data/docs/_includes/commands.html +78 -0
  36. data/docs/_includes/contact.html +17 -0
  37. data/docs/_includes/contact_disqus.html +16 -0
  38. data/docs/_includes/contact_static.html +17 -0
  39. data/docs/_includes/content.html +21 -0
  40. data/docs/_includes/css/bootstrap.min.css +7 -0
  41. data/docs/_includes/css/main.css +481 -0
  42. data/docs/_includes/css/quotes.css +102 -0
  43. data/docs/_includes/css/syntax.css +60 -0
  44. data/docs/_includes/css/table.css +53 -0
  45. data/docs/_includes/css/timeline.css +201 -0
  46. data/docs/_includes/css/ufo.css +166 -0
  47. data/docs/_includes/edit-on-github.html +11 -0
  48. data/docs/_includes/example.html +80 -0
  49. data/docs/_includes/footer.html +48 -0
  50. data/docs/_includes/head.html +32 -0
  51. data/docs/_includes/header.html +15 -0
  52. data/docs/_includes/js.html +28 -0
  53. data/docs/_includes/js_disqus.html +21 -0
  54. data/docs/_includes/modals.html +40 -0
  55. data/docs/_includes/nav.html +27 -0
  56. data/docs/_includes/quotes.html +19 -0
  57. data/docs/_includes/subnav.html +40 -0
  58. data/docs/_includes/ufo-ship-options.md +13 -0
  59. data/docs/_includes/uses.html +19 -0
  60. data/docs/_layouts/default.html +11 -0
  61. data/docs/_layouts/style.css +6 -0
  62. data/docs/articles.md +8 -0
  63. data/docs/css/font-awesome/css/font-awesome.css +1566 -0
  64. data/docs/css/font-awesome/css/font-awesome.min.css +4 -0
  65. data/docs/css/font-awesome/fonts/FontAwesome.otf +0 -0
  66. data/docs/css/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  67. data/docs/css/font-awesome/fonts/fontawesome-webfont.svg +504 -0
  68. data/docs/css/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  69. data/docs/css/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  70. data/docs/docs.md +16 -0
  71. data/docs/img/logos/boltops-logo-full.png +0 -0
  72. data/docs/img/logos/boltops-logo.png +0 -0
  73. data/docs/img/tutorials/ecs-console-task-definitions.png +0 -0
  74. data/docs/img/tutorials/ecs-console-ufo-ship.png +0 -0
  75. data/docs/img/tutorials/ecs-console-ufo-ships.png +0 -0
  76. data/docs/img/tutorials/ufo-init.png +0 -0
  77. data/docs/img/tutorials/ufo-tasks-build.png +0 -0
  78. data/docs/img/ufo.jpg +0 -0
  79. data/docs/index.html +9 -0
  80. data/docs/js/bootstrap.js +2114 -0
  81. data/docs/js/bootstrap.min.js +6 -0
  82. data/docs/js/cbpAnimatedHeader.js +44 -0
  83. data/docs/js/cbpAnimatedHeader.min.js +11 -0
  84. data/docs/js/classie.js +80 -0
  85. data/docs/js/contact_me.js +70 -0
  86. data/docs/js/contact_me_static.js +23 -0
  87. data/docs/js/freelancer.js +37 -0
  88. data/docs/js/jqBootstrapValidation.js +912 -0
  89. data/docs/js/jquery-1.11.0.js +4 -0
  90. data/docs/js/jquery.easing.min.js +44 -0
  91. data/docs/js/nav.js +53 -0
  92. data/docs/quick-start.md +27 -0
  93. data/docs/style.css +3 -0
  94. data/lib/starter_project/ufo/settings.yml +3 -0
  95. data/lib/starter_project/ufo/task_definitions.rb +3 -3
  96. data/lib/ufo/cli.rb +5 -4
  97. data/lib/ufo/cli/help.rb +4 -4
  98. data/lib/ufo/docker.rb +6 -6
  99. data/lib/ufo/docker/cleaner.rb +2 -1
  100. data/lib/ufo/docker/help.rb +4 -4
  101. data/lib/ufo/ship.rb +2 -2
  102. data/lib/ufo/version.rb +1 -1
  103. data/spec/lib/cli_spec.rb +1 -1
  104. data/spec/spec_helper.rb +1 -1
  105. metadata +92 -2
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: ufo ships
3
+ ---
4
+
5
+ You might have noticed in in the tutorial that the starter ufo folder that `ufo init` generates creates 3 task definitions for 3 services for a web, worker and clock role. We can use the same `ufo ship` command to deploy to all 3 service roles like so:
6
+
7
+ ```sh
8
+ ufo ship hi-web-stag
9
+ ufo ship hi-worker-stag
10
+ ufo ship hi-clock-stag
11
+ ```
12
+
13
+ This will build Docker image and register task definition each time the command gets run. It is a common pattern to actually want have the same code base running on all of these roles. In this case, we want to use the *same* Docker image and *same* task definition for all 3 roles. Ufo provides a `ufo ships` command for this exact situation.
14
+
15
+ ### ufo ships
16
+
17
+ ```sh
18
+ ufo ships hi-web-stag hi-worker-stag hi-clock-stag
19
+ ```
20
+
21
+ You can check on the ECS console and should see something similar to this:
22
+
23
+ <img src="/img/tutorials/ecs-console-ufo-ships.png" class="doc-photo" />
24
+
25
+ <a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-ship.md %}">Back</a>
26
+ <a id="next" class="btn btn-primary" href="{% link _docs/commands.md %}">Next Step</a>
27
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
28
+
@@ -0,0 +1,166 @@
1
+ ---
2
+ title: ufo tasks build
3
+ ---
4
+
5
+ ### Step 2a - Build the ECS Task Definitions
6
+
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 makes building and controlling your ECS task definition super powerful.
8
+
9
+ Let's take a look at the 2 files that are used by ufo to build the the ECS task definition. These files were generated by the `ufo init` command at the beginning.
10
+
11
+ 1. ufo/templates/main.json.erb
12
+ 2. ufo/task_definitions.rb
13
+
14
+ **main.json.erb**:
15
+
16
+ ```json
17
+ {
18
+ "family": "<%= @family %>",
19
+ "containerDefinitions": [
20
+ {
21
+ "name": "<%= @name %>",
22
+ "image": "<%= @image %>",
23
+ "cpu": <%= @cpu %>,
24
+ <% if @memory %>
25
+ "memory": <%= @memory %>,
26
+ <% end %>
27
+ <% if @memory_reservation %>
28
+ "memoryReservation": <%= @memory_reservation %>,
29
+ <% end %>
30
+ <% if @container_port %>
31
+ "portMappings": [
32
+ {
33
+ "containerPort": "<%= @container_port %>",
34
+ "protocol": "tcp"
35
+ }
36
+ ],
37
+ <% end %>
38
+ "command": <%= @command.to_json %>,
39
+ <% if @environment %>
40
+ "environment": <%= @environment.to_json %>,
41
+ <% end %>
42
+ <% if @awslogs_group %>
43
+ "logConfiguration": {
44
+ "logDriver": "awslogs",
45
+ "options": {
46
+ "awslogs-group": "<%= @awslogs_group %>",
47
+ "awslogs-region": "<%= @awslogs_region || 'us-east-1' %>",
48
+ "awslogs-stream-prefix": "<%= @awslogs_stream_prefix %>"
49
+ }
50
+ },
51
+ <% end %>
52
+ "essential": true
53
+ }
54
+ ]
55
+ }
56
+ ```
57
+
58
+ **task_definitions.rb**:
59
+
60
+ ```
61
+ # common variables
62
+ common = {
63
+ image: helper.full_image_name, # includes the git sha tongueroo/hi:ufo-[sha].
64
+ cpu: 128,
65
+ memory_reservation: 256,
66
+ environment: helper.env_file(".env")
67
+ # another example
68
+ # environment: helper.env_vars(%Q{
69
+ # RAILS_ENV=production
70
+ # SECRET_KEY_BASE=secret
71
+ # })
72
+ }
73
+
74
+ task_definition "hi-web-stag" do
75
+ source "main" # will use ufo/templates/main.json.erb
76
+ variables(common.dup.deep_merge(
77
+ family: task_definition_name,
78
+ name: "web",
79
+ container_port: helper.dockerfile_port,
80
+ command: ["bin/web"]
81
+ ))
82
+ end
83
+
84
+ task_definition "hi-worker-stag" do
85
+ source "main" # will use ufo/templates/main.json.erb
86
+ variables(common.dup.deep_merge(
87
+ family: task_definition_name,
88
+ name: "worker",
89
+ command: ["bin/worker"]
90
+ ))
91
+ end
92
+
93
+ task_definition "hi-clock-stag" do
94
+ source "main" # will use ufo/templates/main.json.erb
95
+ variables(common.dup.deep_merge(
96
+ family: task_definition_name,
97
+ name: "clock",
98
+ command: ["bin/clock"]
99
+ ))
100
+ end
101
+ ```
102
+
103
+ Ufo uses the ERB template in `main.json.erb` and combines it with the variables defined in the task definition declarations in `task_definitions.rb` and generates the raw AWS formatted task definition in the `output` folder. In this case there are 3 task_definitions so there will be 3 generated output files. If you need to modify the task definition template to suite your own needs it is super simple, just edit `main.json.erb`. No need to dive deep into internal code that builds up the task definition with some internal structure. It is all there for you to fully control.
104
+
105
+ Let's build the task definitions:
106
+
107
+ ```sh
108
+ ufo tasks build
109
+ ```
110
+
111
+ You should see output similar to below:
112
+
113
+ <img src="/img/tutorials/ufo-tasks-build.png" class="doc-photo" />
114
+
115
+ Let's take a look at one of the generated files: `ufo/output/hi-web-stag.json`.
116
+
117
+ ```json
118
+ {
119
+ "family": "hi-web-stag",
120
+ "containerDefinitions": [
121
+ {
122
+ "name": "web",
123
+ "image": "tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30",
124
+ "cpu": 128,
125
+ "memoryReservation": 256,
126
+ "portMappings": [
127
+ {
128
+ "containerPort": "3000",
129
+ "protocol": "tcp"
130
+ }
131
+ ],
132
+ "command": [
133
+ "bin/web"
134
+ ],
135
+ "environment": [
136
+ {
137
+ "name": "RAILS_ENV",
138
+ "value": "staging"
139
+ }
140
+ ],
141
+ "essential": true
142
+ }
143
+ ]
144
+ }
145
+ ```
146
+
147
+ ### Step 2b Register the ECS Task Definitions
148
+
149
+ You have built the ecs task definitions locally on your machine. To register the task definitions in output run this command:
150
+
151
+ ```sh
152
+ ufo ecs register
153
+ ```
154
+
155
+ You should see something similiar to this:
156
+
157
+ ```sh
158
+ hi-clock-stag task definition registered.
159
+ hi-web-stag task definition registered.
160
+ hi-worker-stag task definition registered.
161
+ ```
162
+
163
+ <a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-docker-build.md %}">Back</a>
164
+ <a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-ship.md %}">Next Step</a>
165
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
166
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Tutorial
3
+ ---
4
+
5
+ In the next sections, we'll walk through using ufo in detail. We will ufo-ify a project. Then we'll go through the step by step process that ufo automated. Normally ufo is not really used in step like fashion like in this tutorial, but going through it step by step really helps to understand how ufo works. Here are the steps we'll go through:
6
+
7
+ 1. We'll build a docker image by using `ufo docker`.
8
+ 2. We'll build and register the task definitions to ECS with the newly built docker images with `ufo tasks`
9
+ 3. Finally, we'll use `ufo ship` to run through entire process.
10
+
11
+ Let's start!
12
+
13
+ <a id="prev" class="btn btn-basic" href="{% link _docs/structure.md %}">Back</a>
14
+ <a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-init.md %}">Next Step</a>
15
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: ufo destroy
3
+ ---
4
+
5
+ Ufo provides a quick way to destroy an ECS service. In order to destroy an ECS service you must makes sure that the desired number of tasks is first set to 0. It is easy to forgot to do this and waste time. So as part of destroying the service ufo will scale the ECS service down to 0 automatically first and then destroy the service. Ufo also prompts you before destroying the service.
6
+
7
+ ```
8
+ ufo destroy hi-web-stag
9
+ ```
10
+
11
+ If you would like to bypass the prompt you can use the `--sure` option.
12
+
13
+ ```
14
+ ufo destroy hi-web-stag --sure
15
+ ```
16
+
17
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-scale.md %}">Back</a>
18
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-build.md %}">Next Step</a>
19
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
20
+
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: ufo docker base
3
+ ---
4
+
5
+ ### Concept
6
+
7
+ Docker is fantastic and has given developers more power and control over the OS their application runs on. Sometimes building Docker images can be slow though. Docker layer caching technology helps immensely to speed up the process as Docker will only rebuild layers that require rebuilding. But sometimes one little dependency changes it results in having to rebuild many layers.
8
+
9
+ The `ufo docker base` commands allows you to build an Docker image from `Dockerfile.base` to be used as a cache and in the FROM instruction in the main `Dockerfile`. This base Docker cache image technique speeds up development substantially if you have dependencies like gems in your project. Let's say you have 20 gems in your project and are actively developing your project. You are experimenting with 3 different gems, adding and removing them while you are investigating the best gem to use. Without the Docker image cache that already has all of your other gems installed each time you adjust `Gemfile` it would have to wait until all the gems from scratch again installed again.
10
+
11
+ There are pros and cons of using this approach. Remember there are 2 hard problems in computer science: 1. Naming and 2. Caching. The main con about this approach is if you forget to update the base Docker image you will have cached artifacts that will not disappear unless you rebuild the base Docker image. While some folks are completely against introducing this cache layer, some have found it being a huge win in speeding up their Docker development workflow. If you are using this technique it is recommended that you set up some automation that at the very least nightly rebuilds the base Docker image.
12
+
13
+ ### Demo
14
+
15
+ To demonstrate this command, there's a `docker-cache` branch in the [tongueroo/hi](https://github.com/tongueroo/hi/tree/docker-cache) repo.
16
+
17
+ Let's see the command in action:
18
+
19
+ ```sh
20
+ ufo docker base
21
+ Building docker image with:
22
+ docker build -t tongueroo/hi:base-2017-06-12T14-36-44-2af505e -f Dockerfile.base .
23
+ ...
24
+ Pushed tongueroo/hi:base-2017-06-12T14-36-44-2af505e docker image. Took 28s.
25
+ The Dockerfile FROM statement has been updated with the latest base image:
26
+ tongueroo/hi:base-2017-06-12T14-36-44-2af505e
27
+ ```
28
+
29
+ Some of the output has been excluded so we can focus on the important parts to point out. First notice that the commmand simply shells out to the docker command and calls:
30
+
31
+ ```sh
32
+ docker build -t tongueroo/hi:base-2017-06-12T14-36-44-2af505e -f Dockerfile.base .
33
+ ```
34
+
35
+ It is using the docker `-f Dockerfile.base` option to build the base image. It names the image with `tongueroo/hi:base-2017-06-12T14-36-44-2af505e`. The image tag contains useful information: the timestamp when the image was built and the exact git sha of the code. The image gets push to a registry immediately.
36
+
37
+ Notice at the very end, the *current* `Dockerfile`'s FROM statement has been updated with the newly built base Docker image automatically. This saves you from forgettig to copying and pasting it the `Dockerfile` yourself.
38
+
39
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-build.md %}">Back</a>
40
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-name.md %}">Next Step</a>
41
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
42
+
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: ufo docker build
3
+ ---
4
+
5
+ The `ufo docker build` builds a Docker image using the Dockerfile in the current project folder. This simply a wrapper command that shells out and calls the `docker` command. We're use the [tongueroo/hi]((https://github.com/tongueroo/hi) project and it's Dockerfile for demonstration. Example:
6
+
7
+ ```sh
8
+ ufo docker build
9
+ ```
10
+
11
+ You'll see that it calls:
12
+
13
+ ```
14
+ docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .
15
+ ```
16
+
17
+ You should see similar output (some of the output has been truncated for conciseness):
18
+
19
+ ```sh
20
+ $ ufo docker build
21
+ Building docker image with:
22
+ docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .
23
+ Sending build context to Docker daemon 734.2 kB
24
+ Step 1 : FROM ruby:2.3.3
25
+ ---> 0e1db669d557
26
+ Step 2 : RUN apt-get update && apt-get install -y build-essential nodejs && rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get purge
27
+ ---> Using cache
28
+ ---> 931ace833716
29
+ ...
30
+ Step 7 : ADD . /app
31
+ ---> fae2452e6c35
32
+ Removing intermediate container 4c93f92a7fd8
33
+ Step 8 : RUN bundle install --system
34
+ ---> Running in f851b9cb7d27
35
+ Using rake 12.0.0
36
+ Using i18n 0.8.1
37
+ ...
38
+ Using web-console 2.3.0
39
+ Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
40
+ Bundled gems are installed into /usr/local/bundle.
41
+ ---> 194830c5c1a8
42
+ ...
43
+ Removing intermediate container 67545cd4cd09
44
+ Step 11 : CMD bin/web
45
+ ---> Running in b1b26e68d957
46
+ ---> 8547bb48b21f
47
+ Removing intermediate container b1b26e68d957
48
+ Successfully built 8547bb48b21f
49
+ Docker image tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 built. Took 33s.
50
+ $
51
+ ```
52
+
53
+ The docker image tag that is generated contains a useful timestamp and the current HEAD git sha of the project that you are on.
54
+
55
+ By default when you are running `ufo docker build` directly it does not push the docker image to the registry. If you would like it to automaticaly push the built image to a registry at the end of the build use the `--push` flag.
56
+
57
+ ```sh
58
+ ufo docker build --push
59
+ ```
60
+
61
+ You should see it being pushed at the end:
62
+
63
+ ```sh
64
+ Docker image tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30 built. Took 34s.
65
+ The push refers to a repository [docker.io/tongueroo/hi]
66
+ ef375857f165: Pushed
67
+ 4d791d7cde66: Pushed
68
+ 277ff31e79b4: Layer already exists
69
+ a361a4de05df: Layer already exists
70
+ ufo-2017-06-11T22-22-32-a18aa30: digest: sha256:c5385a5084e87643bd943eb120e110321c59e8acd30736ba7b5223eb1143baa8 size: 3464
71
+ Pushed tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30 docker image. Took 9s.
72
+ ```
73
+
74
+ Note in order to push the image to a register you will need to login into the registry. If you are using DockerHub use the `docker login` command. If you are using AWS ECR then you can use the `aws ecr get-login` command.
75
+
76
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-destroy.md %}">Back</a>
77
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-base.md %}">Next Step</a>
78
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
79
+
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: ufo docker clean
3
+ ---
4
+
5
+ Ufo comes with a handy command to clean up old images that ufo generates. Ufo only deletes images from the docker daemon and does not remove any images from any registry. To use it you pass the base portion of the image name to the command. Example:
6
+
7
+ ```sh
8
+ ufo docker clean tongueroo/hi
9
+ ```
10
+
11
+ Here is some example output of the commmand:
12
+
13
+ ```sh
14
+ Cleaning up docker images...
15
+ Running: docker rmi tongueroo/hi:ufo-2017-06-12T12-14-22-a18aa30 tongueroo/hi:ufo-2017-06-12T12-12-05-a18aa30
16
+ ```
17
+
18
+ By default the clean command keeps the most 3 recent docker images. If you would like to override this setting you can use the `--keep` option. Example:
19
+
20
+ ```sh
21
+ ufo docker clean tongueroo/hi --keep 5
22
+ ```
23
+
24
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-name.md %}">Back</a>
25
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-tasks-build.md %}">Next Step</a>
26
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
27
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: ufo docker name
3
+ ---
4
+
5
+ It is sometimes handy to grab the name of the Docker image that was just generated. Let's say ou needed the image name so you can feed it into another script that you have. The command `ufo docker name` returns the image of the most recently built Docker image. Example:
6
+
7
+ ```sh
8
+ $ ufo docker image
9
+ tongueroo/hi:ufo-2017-06-12T12-34-48-a18aa30
10
+ ```
11
+
12
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-base.md %}">Back</a>
13
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-clean.md %}">Next Step</a>
14
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
15
+
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: ufo help
3
+ ---
4
+
5
+ You can run help for quick help information right at the cli. Example:
6
+
7
+ ```sh
8
+ ufo help
9
+ ```
10
+
11
+ You can append `help`, `-h` or `--help` to the end of any command to get more help information about that specific command. These all work.
12
+
13
+ ```sh
14
+ ufo docker build help
15
+ ufo ship --help
16
+ ufo ships -h
17
+ ```
18
+
19
+ <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-tasks-register.md %}">Back</a>
20
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-settings.md %}">Next Step</a>
21
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
22
+
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: ufo init
3
+ ---
4
+
5
+ The `ufo init` command provides a way to quickly setup a project to be ufo ready. It creates a ufo with all the starter supporting files in order to use ufo. This page demonstrates how to use `ufo init`. The command has a few required options `--app`, `--env`, `--cluster`, and `--image`.
6
+
7
+ For this example we will use [tongueroo/hi](https://github.com/tongueroo/hi) which is a small test sinatra app.
8
+
9
+ Let's run the command in our newly clone project.
10
+
11
+ ```sh
12
+ git clone https://github.com/tongueroo/hi.git
13
+ cd hi
14
+ ufo init --app=hi --env stag --cluster=stag --image=tongueroo/hi
15
+ ```
16
+
17
+ You should see output similiar to this:
18
+
19
+ <img src="/img/tutorials/ufo-init.png" class="doc-photo" />
20
+
21
+ The standard directory structure of the ufo folder looks like this:
22
+
23
+ ```sh
24
+ ufo
25
+ ├── output
26
+ ├── settings.yml
27
+ ├── task_definitions.rb
28
+ └── templates
29
+ └── main.json.erb
30
+ ```
31
+
32
+ The explanation of the folders and files were covered in detailed earlier at [Structure]({% link _docs/structure.md %}).
33
+
34
+ <a id="prev" class="btn btn-basic" href="{% link _docs/commands.md %}">Back</a>
35
+ <a id="next" class="btn btn-primary" href="{% link _docs/ufo-ship.md %}">Next Step</a>
36
+ <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
37
+