ufo 3.5.5 → 3.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +3 -0
- data/Rakefile +1 -1
- data/docs/_docs/faq.md +4 -4
- data/docs/_docs/structure.md +2 -0
- data/docs/_docs/tutorial-ufo-tasks-build.md +5 -6
- data/lib/ufo/command.rb +35 -0
- data/lib/ufo/help/completion_script.md +2 -2
- data/lib/ufo/version.rb +1 -1
- metadata +3 -4
- data/lib/ufo/help/hello.md +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bd34e1498279908085f391c5496c1aa8081447be4e00df457aa44ad12ad0b3a
|
4
|
+
data.tar.gz: b607ce6631b39b7db8a92f5457bace98ad8efed5df552c3aa7bbf496b351d1a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 654a0b5f161aaf4e31c13f3737d3b4aeb1592935235149f222f7019862f6b7d72fb412a8fc5eb8bfd692b06619a0db48b2c647fc4565b986e95f5e9f7818cb4e
|
7
|
+
data.tar.gz: 5d166cd32cc455b49ebc919415d945efde71198b00028509120c95bbe49d2eb79fb7e271148db2ddc9dcc99b9c194f45727eb10fdd12a26637f6ab514fdd937f
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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.5.6]
|
7
|
+
- upgrade ufo with cli-template, link cli help to website reference help
|
8
|
+
|
6
9
|
## [3.5.5]
|
7
10
|
- Merge pull request #39 from hnatt/fix-docs
|
8
11
|
- Merge pull request #41 from tongueroo/params-template-scope
|
data/Rakefile
CHANGED
data/docs/_docs/faq.md
CHANGED
@@ -4,12 +4,12 @@ title: FAQ
|
|
4
4
|
|
5
5
|
**Q: Is AWS ECS Fargate supported?**
|
6
6
|
|
7
|
-
Yes, Fargate is supported. To use ufo with Fargate, you will need to adjust the template in `.ufo/templates` to
|
7
|
+
Yes, Fargate is supported. To use ufo with Fargate, you will need to adjust the template in `.ufo/templates` to a structure supported by Fargate. There are 2 key items to adjust:
|
8
8
|
|
9
|
-
1. The task definition
|
10
|
-
2. The params that get sent to the `create_service` or `run_task`
|
9
|
+
1. The task definition JSON. Notably, the JSON structure has the `requiresCompatibilities`, `networkMode`, and `executionRoleArn` attributes. The `cpu` and `memory` attributes also move outside of the `containerDefinitions` level to the top-level attributes. For details on how to adjust the task definition refer to [Task Definitions]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
10
|
+
2. The params that get sent to the `create_service` or `run_task` API methods. For details on how to adjust the params refer to [Params]({% link _docs/params.md %})
|
11
11
|
|
12
|
-
If it's a brand new project, you can use `ufo init` with the `--launch-type fargate` option and it will generate a starter JSON file that has the right Fargate structure. More info is available at [ufo init reference](/reference/ufo-init/#fargate-support).
|
12
|
+
If it's a brand new project, you can use `ufo init` with the `--launch-type fargate` option and it will generate a starter task definition JSON file that has the right Fargate structure. More info is available at [ufo init reference](/reference/ufo-init/#fargate-support).
|
13
13
|
|
14
14
|
**Q: Can I tell ufo to use specific docker build options?**
|
15
15
|
|
data/docs/_docs/structure.md
CHANGED
@@ -7,6 +7,7 @@ Ufo creates a `.ufo` folder within your project which contains the required file
|
|
7
7
|
```sh
|
8
8
|
.ufo
|
9
9
|
├── output
|
10
|
+
├── params.yml
|
10
11
|
├── settings.yml
|
11
12
|
├── task_definitions.rb
|
12
13
|
├── templates
|
@@ -22,6 +23,7 @@ The table below covers the purpose of each folder and file.
|
|
22
23
|
File / Directory | Description
|
23
24
|
------------- | -------------
|
24
25
|
<code>output/</code> | The folder where the generated task definitions are written to. The way the task definitions are generated is covered in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
26
|
+
<code>params</code> | This is where you can adjust the params that get send to the aws-sdk api calls. More info at [Params]({% link _docs/params.md %}).
|
25
27
|
<code>settings.yml</code> | Ufo's settings file, where you adjust the default [settings]({% link _docs/settings.md %}).
|
26
28
|
<code>task_definitions.rb</code> | This is where you define the task definitions and specify the variables to be used by the ERB templates.
|
27
29
|
<code>templates/</code> | The ERB templates with the task definition json code. The templates are covered in more detail in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
@@ -4,14 +4,14 @@ title: Task Definitions
|
|
4
4
|
|
5
5
|
## Build the ECS Task Definitions
|
6
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 is
|
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 powerful. Ufo gives you the power to build and control your ECS task definition directly.
|
8
8
|
|
9
9
|
Let's take a look at the 2 files that are used by ufo to build the ECS task definition. These files were generated by the `ufo init` command at the beginning.
|
10
10
|
|
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
|
14
|
+
Ufo task definitions are written as an ERB template that makes it directly accessible. You can configure to your requirements. Here is an example of an ERB template `.ufo/templates/main.json.erb` that shows how to modify the task definition you want ufo to upload:
|
15
15
|
|
16
16
|
**.ufo/templates/main.json.erb**:
|
17
17
|
|
@@ -61,7 +61,7 @@ end
|
|
61
61
|
|
62
62
|
## Shared Variables
|
63
63
|
|
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
|
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 throughout your templates:
|
65
65
|
|
66
66
|
**.ufo/variables/base.rb**:
|
67
67
|
|
@@ -83,7 +83,7 @@ Ufo has a concept of shared variables, covered in [Shared Variables]({% link _do
|
|
83
83
|
|
84
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
|
-
If you need to modify the task definition template to
|
86
|
+
If you need to modify the task definition template to suit your own needs it is simple, just edit `main.json.erb`. You do not have to dive deep into internal code somewhere. It is all there for you to control fully.
|
87
87
|
|
88
88
|
The `task_definition.rb` has access to some useful helper methods detailed in [Helpers]({% link _docs/helpers.md %}).
|
89
89
|
|
@@ -156,7 +156,7 @@ You have built the ECS task definitions locally on your machine. To register the
|
|
156
156
|
ufo tasks register
|
157
157
|
```
|
158
158
|
|
159
|
-
You should see something
|
159
|
+
You should see something similar to this:
|
160
160
|
|
161
161
|
```sh
|
162
162
|
hi-clock task definition registered.
|
@@ -167,4 +167,3 @@ hi-worker task definition registered.
|
|
167
167
|
<a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-docker-build.md %}">Back</a>
|
168
168
|
<a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-ship.md %}">Next Step</a>
|
169
169
|
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
170
|
-
|
data/lib/ufo/command.rb
CHANGED
@@ -42,6 +42,41 @@ module Ufo
|
|
42
42
|
|
43
43
|
super
|
44
44
|
end
|
45
|
+
|
46
|
+
# Override command_help to include the description at the top of the
|
47
|
+
# long_description.
|
48
|
+
def command_help(shell, command_name)
|
49
|
+
meth = normalize_command_name(command_name)
|
50
|
+
command = all_commands[meth]
|
51
|
+
alter_command_description(command)
|
52
|
+
super
|
53
|
+
end
|
54
|
+
|
55
|
+
def alter_command_description(command)
|
56
|
+
return unless command
|
57
|
+
|
58
|
+
# Add description to beginning of long_description
|
59
|
+
long_desc = if command.long_description
|
60
|
+
"#{command.description}\n\n#{command.long_description}"
|
61
|
+
else
|
62
|
+
command.description
|
63
|
+
end
|
64
|
+
|
65
|
+
# add reference url to end of the long_description
|
66
|
+
unless website.empty?
|
67
|
+
full_command = [command.ancestor_name, command.name].compact.join('-')
|
68
|
+
url = "#{website}/reference/ufo-#{full_command}"
|
69
|
+
long_desc += "\n\nHelp also available at: #{url}"
|
70
|
+
end
|
71
|
+
|
72
|
+
command.long_description = long_desc
|
73
|
+
end
|
74
|
+
private :alter_command_description
|
75
|
+
|
76
|
+
# meant to be overriden
|
77
|
+
def website
|
78
|
+
"http://ufoships.com"
|
79
|
+
end
|
45
80
|
end
|
46
81
|
end
|
47
82
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
To use, add the following to your
|
1
|
+
To use, add the following to your `~/.bashrc` or `~/.profile`
|
2
2
|
|
3
|
-
|
3
|
+
eval $(ufo completion_script)
|
data/lib/ufo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ufo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudwatchlogs
|
@@ -421,7 +421,6 @@ files:
|
|
421
421
|
- lib/ufo/help/docker/clean.md
|
422
422
|
- lib/ufo/help/docker/name.md
|
423
423
|
- lib/ufo/help/docker/push.md
|
424
|
-
- lib/ufo/help/hello.md
|
425
424
|
- lib/ufo/help/init.md
|
426
425
|
- lib/ufo/help/scale.md
|
427
426
|
- lib/ufo/help/ship.md
|
@@ -484,7 +483,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
484
483
|
version: '0'
|
485
484
|
requirements: []
|
486
485
|
rubyforge_project:
|
487
|
-
rubygems_version: 2.7.
|
486
|
+
rubygems_version: 2.7.6
|
488
487
|
signing_key:
|
489
488
|
specification_version: 4
|
490
489
|
summary: Build Docker Containers and Ship Them to AWS ECS
|