ufo 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +7 -7
- data/docs/.gitignore +4 -0
- data/docs/CNAME +1 -0
- data/docs/Gemfile +3 -0
- data/docs/LICENSE +21 -0
- data/docs/README.md +21 -0
- data/docs/_config.yml +69 -0
- data/docs/_docs/commands.md +10 -0
- data/docs/_docs/conventions.md +45 -0
- data/docs/_docs/install.md +32 -0
- data/docs/_docs/next-steps.md +18 -0
- data/docs/_docs/structure.md +31 -0
- data/docs/_docs/tutorial-ufo-docker-build.md +68 -0
- data/docs/_docs/tutorial-ufo-init.md +34 -0
- data/docs/_docs/tutorial-ufo-ship.md +64 -0
- data/docs/_docs/tutorial-ufo-ships.md +28 -0
- data/docs/_docs/tutorial-ufo-tasks-build.md +166 -0
- data/docs/_docs/tutorial.md +15 -0
- data/docs/_docs/ufo-destroy.md +20 -0
- data/docs/_docs/ufo-docker-base.md +42 -0
- data/docs/_docs/ufo-docker-build.md +79 -0
- data/docs/_docs/ufo-docker-clean.md +27 -0
- data/docs/_docs/ufo-docker-name.md +15 -0
- data/docs/_docs/ufo-help.md +22 -0
- data/docs/_docs/ufo-init.md +37 -0
- data/docs/_docs/ufo-scale.md +22 -0
- data/docs/_docs/ufo-settings.md +57 -0
- data/docs/_docs/ufo-ship.md +75 -0
- data/docs/_docs/ufo-ships.md +52 -0
- data/docs/_docs/ufo-tasks-build.md +150 -0
- data/docs/_docs/ufo-tasks-register.md +26 -0
- data/docs/_includes/about.html +19 -0
- data/docs/_includes/commands.html +78 -0
- data/docs/_includes/contact.html +17 -0
- data/docs/_includes/contact_disqus.html +16 -0
- data/docs/_includes/contact_static.html +17 -0
- data/docs/_includes/content.html +21 -0
- data/docs/_includes/css/bootstrap.min.css +7 -0
- data/docs/_includes/css/main.css +481 -0
- data/docs/_includes/css/quotes.css +102 -0
- data/docs/_includes/css/syntax.css +60 -0
- data/docs/_includes/css/table.css +53 -0
- data/docs/_includes/css/timeline.css +201 -0
- data/docs/_includes/css/ufo.css +166 -0
- data/docs/_includes/edit-on-github.html +11 -0
- data/docs/_includes/example.html +80 -0
- data/docs/_includes/footer.html +48 -0
- data/docs/_includes/head.html +32 -0
- data/docs/_includes/header.html +15 -0
- data/docs/_includes/js.html +28 -0
- data/docs/_includes/js_disqus.html +21 -0
- data/docs/_includes/modals.html +40 -0
- data/docs/_includes/nav.html +27 -0
- data/docs/_includes/quotes.html +19 -0
- data/docs/_includes/subnav.html +40 -0
- data/docs/_includes/ufo-ship-options.md +13 -0
- data/docs/_includes/uses.html +19 -0
- data/docs/_layouts/default.html +11 -0
- data/docs/_layouts/style.css +6 -0
- data/docs/articles.md +8 -0
- data/docs/css/font-awesome/css/font-awesome.css +1566 -0
- data/docs/css/font-awesome/css/font-awesome.min.css +4 -0
- data/docs/css/font-awesome/fonts/FontAwesome.otf +0 -0
- data/docs/css/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/docs/css/font-awesome/fonts/fontawesome-webfont.svg +504 -0
- data/docs/css/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/docs/css/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/docs/docs.md +16 -0
- data/docs/img/logos/boltops-logo-full.png +0 -0
- data/docs/img/logos/boltops-logo.png +0 -0
- data/docs/img/tutorials/ecs-console-task-definitions.png +0 -0
- data/docs/img/tutorials/ecs-console-ufo-ship.png +0 -0
- data/docs/img/tutorials/ecs-console-ufo-ships.png +0 -0
- data/docs/img/tutorials/ufo-init.png +0 -0
- data/docs/img/tutorials/ufo-tasks-build.png +0 -0
- data/docs/img/ufo.jpg +0 -0
- data/docs/index.html +9 -0
- data/docs/js/bootstrap.js +2114 -0
- data/docs/js/bootstrap.min.js +6 -0
- data/docs/js/cbpAnimatedHeader.js +44 -0
- data/docs/js/cbpAnimatedHeader.min.js +11 -0
- data/docs/js/classie.js +80 -0
- data/docs/js/contact_me.js +70 -0
- data/docs/js/contact_me_static.js +23 -0
- data/docs/js/freelancer.js +37 -0
- data/docs/js/jqBootstrapValidation.js +912 -0
- data/docs/js/jquery-1.11.0.js +4 -0
- data/docs/js/jquery.easing.min.js +44 -0
- data/docs/js/nav.js +53 -0
- data/docs/quick-start.md +27 -0
- data/docs/style.css +3 -0
- data/lib/starter_project/ufo/settings.yml +3 -0
- data/lib/starter_project/ufo/task_definitions.rb +3 -3
- data/lib/ufo/cli.rb +5 -4
- data/lib/ufo/cli/help.rb +4 -4
- data/lib/ufo/docker.rb +6 -6
- data/lib/ufo/docker/cleaner.rb +2 -1
- data/lib/ufo/docker/help.rb +4 -4
- data/lib/ufo/ship.rb +2 -2
- data/lib/ufo/version.rb +1 -1
- data/spec/lib/cli_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +92 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44c73f56dd916b0f96995229189e5894c0ca568d
|
4
|
+
data.tar.gz: fca744890af7669cb85f24f0d6716cf9e2a7ef73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1b47ec0a9cfe953872d7377af9920dde72bdf1da2f884848b0d86107dced93ce54f259ce0ce69b520f85966bb91fcb11d143b8c03f9898f70bbf84de92a8382
|
7
|
+
data.tar.gz: '0865f013afd5cece517fb5935650116aa4f2f1f174b8c203917fba46937710216ce6c948d3db342452411c6337dee59f96ea75f99949ece8ee4a8864e3d7759e'
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
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
|
+
## [1.6.0]
|
7
|
+
* rename ufo docker cleanup -> ufo docker clean
|
8
|
+
* rename ufo docker image_name -> ufo docker name
|
9
|
+
* add docs
|
10
|
+
|
6
11
|
## [1.5.0]
|
7
12
|
* add ufo ships command
|
8
13
|
* refactor code into modules: ecr, docker, tasks
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ufo (1.
|
4
|
+
ufo (1.5.0)
|
5
5
|
aws-sdk
|
6
6
|
colorize
|
7
7
|
deep_merge
|
@@ -20,13 +20,13 @@ GEM
|
|
20
20
|
minitest (~> 5.1)
|
21
21
|
thread_safe (~> 0.3, >= 0.3.4)
|
22
22
|
tzinfo (~> 1.1)
|
23
|
-
aws-sdk (2.9.
|
24
|
-
aws-sdk-resources (= 2.9.
|
25
|
-
aws-sdk-core (2.9.
|
23
|
+
aws-sdk (2.9.37)
|
24
|
+
aws-sdk-resources (= 2.9.37)
|
25
|
+
aws-sdk-core (2.9.37)
|
26
26
|
aws-sigv4 (~> 1.0)
|
27
27
|
jmespath (~> 1.0)
|
28
|
-
aws-sdk-resources (2.9.
|
29
|
-
aws-sdk-core (= 2.9.
|
28
|
+
aws-sdk-resources (2.9.37)
|
29
|
+
aws-sdk-core (= 2.9.37)
|
30
30
|
aws-sigv4 (1.0.0)
|
31
31
|
builder (3.2.3)
|
32
32
|
byebug (9.0.6)
|
@@ -83,4 +83,4 @@ DEPENDENCIES
|
|
83
83
|
ufo!
|
84
84
|
|
85
85
|
BUNDLED WITH
|
86
|
-
1.15.
|
86
|
+
1.15.1
|
data/docs/.gitignore
ADDED
data/docs/CNAME
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ufoships.com
|
data/docs/Gemfile
ADDED
data/docs/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 BoltOps
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/docs/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Ufo Documentation
|
2
|
+
|
3
|
+
This project powers the ufo documementation website: [ufoships.com](http://ufoships.com). It is a static website generated by [Jekyll](https://jekyllrb.com/).
|
4
|
+
|
5
|
+
## Contributing
|
6
|
+
|
7
|
+
For minor changes like typos, you can click **Suggest an edit to this page**, located at the bottom of each article. This will take you to the source file on GitHub, where you can submit a pull request for your change through the UI.
|
8
|
+
|
9
|
+
## Local Setup
|
10
|
+
|
11
|
+
For larger fixes, you can run the site locally with the following:
|
12
|
+
|
13
|
+
```
|
14
|
+
git clone https://github.com/tongueroo/ufo.git
|
15
|
+
cd ufo/docs
|
16
|
+
bundle
|
17
|
+
jekyll clean
|
18
|
+
jekyll serve
|
19
|
+
```
|
20
|
+
|
21
|
+
You'll be able to view the site on [http://localhost:4000](http://localhost:4000).
|
data/docs/_config.yml
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Site settings
|
2
|
+
title: Ufo
|
3
|
+
email: tongueroo@gmail.com
|
4
|
+
url: http://ufoships.com
|
5
|
+
description: "An Easy Way to Build and Ship Docker Images to AWS ECS"
|
6
|
+
keywords: "AWS EC2 Container Service, AWS ECS, UFO, Deploy to ECS, ufo ship"
|
7
|
+
skills: ""
|
8
|
+
meta_author: Tung Nguyen
|
9
|
+
|
10
|
+
# Google webmaster tools
|
11
|
+
google_verify:
|
12
|
+
|
13
|
+
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
|
14
|
+
bing_verify:
|
15
|
+
|
16
|
+
# Contact form:
|
17
|
+
# - static : pass through formspree.io to validate email sending
|
18
|
+
# - disqus : replace contact form by disqus thread
|
19
|
+
# - comment the line below if you want to stick with the default PHP contact form
|
20
|
+
contact: static
|
21
|
+
|
22
|
+
# If you use disqus you need disqus shortname
|
23
|
+
# https://help.disqus.com/customer/portal/articles/466208
|
24
|
+
disqus_shortname:
|
25
|
+
|
26
|
+
# Color settings (hex-codes without the leading hash-tag)
|
27
|
+
color:
|
28
|
+
primary: 3972c7
|
29
|
+
primary-rgb: "24,288,156" #"128,179,255"
|
30
|
+
secondary: 2c3e50 #FD6E8A
|
31
|
+
secondary-dark: 233140 #A2122F
|
32
|
+
links: a3c8ff
|
33
|
+
|
34
|
+
# Footer settings
|
35
|
+
footer:
|
36
|
+
copyright: BoltOps, LLC
|
37
|
+
location: San Francisco, CA
|
38
|
+
social: BoltOps
|
39
|
+
credits:
|
40
|
+
contact: contact@boltops.com
|
41
|
+
phone:
|
42
|
+
|
43
|
+
# Social networks usernames (many more available: google-plus, flickr, dribbble, pinterest, instagram, tumblr, linkedin, etc.)
|
44
|
+
social:
|
45
|
+
- title: twitter
|
46
|
+
url: http://twitter.com/boltopslabs
|
47
|
+
- title: github
|
48
|
+
url: http://github.com/boltopslabs
|
49
|
+
|
50
|
+
# Credits content
|
51
|
+
credits: 'BoltOps, LLC'
|
52
|
+
|
53
|
+
# Build settings
|
54
|
+
markdown: kramdown
|
55
|
+
permalink: pretty
|
56
|
+
|
57
|
+
gh_url: "https://github.com/tongueroo/ufo"
|
58
|
+
|
59
|
+
collections:
|
60
|
+
docs:
|
61
|
+
name: "Documentation"
|
62
|
+
output: true
|
63
|
+
|
64
|
+
defaults:
|
65
|
+
- values:
|
66
|
+
layout: default
|
67
|
+
|
68
|
+
plugins_dir:
|
69
|
+
- jekyll-coffeescript
|
@@ -0,0 +1,10 @@
|
|
1
|
+
---
|
2
|
+
title: Commands
|
3
|
+
---
|
4
|
+
|
5
|
+
The [tutorial]({% link _docs/tutorial.md %}) does a great job of covering the main ufo commands and overall usage. In the next sections we'll cover the ufo commands in more detail.
|
6
|
+
|
7
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-ships.md %}">Back</a>
|
8
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/ufo-init.md %}">Next Step</a>
|
9
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
10
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
title: Conventions
|
3
|
+
---
|
4
|
+
|
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
|
+
|
7
|
+
### Service and Task Names Convention
|
8
|
+
|
9
|
+
The main convention is that the ECS service and task definition name are the same by default. If you would like to override this convention then you can specify the task name.
|
10
|
+
|
11
|
+
```
|
12
|
+
ufo ship hi-web-prod --task my-task
|
13
|
+
```
|
14
|
+
|
15
|
+
This means that in the task_definition.rb you will also defined it with `my-task`. For example:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
task_definition "my-task" do
|
19
|
+
source "web" # this corresponds to the file in "ufo/templates/web.json.erb"
|
20
|
+
variables(
|
21
|
+
family: "my-task",
|
22
|
+
....
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
```
|
27
|
+
|
28
|
+
### Web Role Convention
|
29
|
+
|
30
|
+
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:
|
31
|
+
|
32
|
+
```sh
|
33
|
+
ufo ship hi-web-prod --no-target-group-prompt
|
34
|
+
```
|
35
|
+
|
36
|
+
You can also bypass the prompt by specifying the target group arn as part of the command upfront. The ELB and target group must already exist. The elb target group only gets associated when the service gets created for the first time. If the service already exists then the `--target-group` parameter just gets ignored and the ECS task simply gets updated. Example:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
ufo ship hi-web-prod --target-group=arn:aws:elasticloadbalancing:us-east-1:12345689:targetgroup/hi-web-prod/12345
|
40
|
+
```
|
41
|
+
|
42
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/ufo-settings.md %}">Back</a>
|
43
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/next-steps.md %}">Next Step</a>
|
44
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
45
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
title: Installation
|
3
|
+
---
|
4
|
+
|
5
|
+
### Install with Bolts Toolbelt
|
6
|
+
|
7
|
+
If you want to quickly install ufo without having to worry about ufo's dependency you can simply install the Bolts Toolbelt which has ufo included.
|
8
|
+
|
9
|
+
```sh
|
10
|
+
brew cask install boltopslabs/software/bolts
|
11
|
+
```
|
12
|
+
|
13
|
+
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)
|
14
|
+
|
15
|
+
### Install with RubyGems
|
16
|
+
|
17
|
+
If you prefer to install ufo via RubyGems follow the instructions:
|
18
|
+
|
19
|
+
```sh
|
20
|
+
gem install ufo
|
21
|
+
```
|
22
|
+
|
23
|
+
Or you can add ufo to your Gemfile in your project if you are working with a ruby project. It is not required for your project to be a ruby project to use ufo.
|
24
|
+
|
25
|
+
{% highlight ruby %}
|
26
|
+
gem "ufo"
|
27
|
+
{% endhighlight %}
|
28
|
+
|
29
|
+
<a id="prev" class="btn btn-basic" href="/docs/">Back</a>
|
30
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/structure.md %}">Next Step</a>
|
31
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
32
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
title: Next Steps
|
3
|
+
---
|
4
|
+
|
5
|
+
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.
|
6
|
+
|
7
|
+
From here, there are a few resources that can help you continue along:
|
8
|
+
|
9
|
+
* Check out the [ufo](https://github.com/tongueroo/ufo) repo on GitHub
|
10
|
+
* Submit an issue
|
11
|
+
* Write a blog post describing how you are using ufo, or an interesting problem ufo has allowed you to solve
|
12
|
+
|
13
|
+
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
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/conventions.md %}">Back</a>
|
16
|
+
<a id="next" class="btn btn-primary" href="{% link articles.md %}">Next Step</a>
|
17
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
18
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
title: Structure
|
3
|
+
---
|
4
|
+
|
5
|
+
Ufo creates a ufo folder within your project which contains the required files used by for ufo to build and deploy docker images to ECS. The standard directory structure of the ufo folder looks like this:
|
6
|
+
|
7
|
+
```sh
|
8
|
+
ufo
|
9
|
+
├── output
|
10
|
+
├── settings.yml
|
11
|
+
├── task_definitions.rb
|
12
|
+
└── templates
|
13
|
+
└── main.json.erb
|
14
|
+
```
|
15
|
+
|
16
|
+
The table below covers the purpose of each folder and file.
|
17
|
+
|
18
|
+
File / Directory | Description
|
19
|
+
------------- | -------------
|
20
|
+
<code>output/</code> | The folder where the generated task definitions are written to. The way the task definitions are generated are covered in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
21
|
+
<code>settings.yml</code> | Ufo's settings file, where you and adjust the default settings.
|
22
|
+
<code>task_definitions.rb</code> | This where you define the task definitions and specify the variables to be used for the ERB templates.
|
23
|
+
<code>templates/</code> | The ERB templates with the task definition json code. The template are covered in more detail in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
24
|
+
<code>templates/main.json.erb</code> | This is the main and starter template task definition json file that ufo initially generates.
|
25
|
+
|
26
|
+
Now that you know where the ufo configurations are located and what they look like. Let use ufo!
|
27
|
+
|
28
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/install.md %}">Back</a>
|
29
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/tutorial.md %}">Next Step</a>
|
30
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
31
|
+
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
title: ufo docker build
|
3
|
+
---
|
4
|
+
|
5
|
+
### Step 1 - Build the Docker Image
|
6
|
+
|
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
|
+
|
9
|
+
```sh
|
10
|
+
ufo docker build
|
11
|
+
```
|
12
|
+
|
13
|
+
You should see similar output (some of the output has been truncated for conciseness):
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ ufo docker build
|
17
|
+
Building docker image with:
|
18
|
+
docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .
|
19
|
+
Sending build context to Docker daemon 734.2 kB
|
20
|
+
Step 1 : FROM ruby:2.3.3
|
21
|
+
---> 0e1db669d557
|
22
|
+
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
|
23
|
+
---> Using cache
|
24
|
+
---> 931ace833716
|
25
|
+
...
|
26
|
+
Step 7 : ADD . /app
|
27
|
+
---> fae2452e6c35
|
28
|
+
Removing intermediate container 4c93f92a7fd8
|
29
|
+
Step 8 : RUN bundle install --system
|
30
|
+
---> Running in f851b9cb7d27
|
31
|
+
Using rake 12.0.0
|
32
|
+
Using i18n 0.8.1
|
33
|
+
...
|
34
|
+
Using web-console 2.3.0
|
35
|
+
Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
|
36
|
+
Bundled gems are installed into /usr/local/bundle.
|
37
|
+
---> 194830c5c1a8
|
38
|
+
...
|
39
|
+
Removing intermediate container 67545cd4cd09
|
40
|
+
Step 11 : CMD bin/web
|
41
|
+
---> Running in b1b26e68d957
|
42
|
+
---> 8547bb48b21f
|
43
|
+
Removing intermediate container b1b26e68d957
|
44
|
+
Successfully built 8547bb48b21f
|
45
|
+
Docker image tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 built. Took 33s.
|
46
|
+
$
|
47
|
+
```
|
48
|
+
|
49
|
+
As you can see `ufo docker build` effectively shells out and calls `docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .`. The docker image tag that is generated contains a useful timestamp and the current HEAD git sha of the project that you are on.
|
50
|
+
|
51
|
+
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.
|
52
|
+
|
53
|
+
```sh
|
54
|
+
ufo docker build --push
|
55
|
+
```
|
56
|
+
|
57
|
+
You should see it being pushed at the end:
|
58
|
+
|
59
|
+
```sh
|
60
|
+
Pushed tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30 docker image. Took 9s.
|
61
|
+
```
|
62
|
+
|
63
|
+
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.
|
64
|
+
|
65
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-init.md %}">Back</a>
|
66
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-tasks-build.md %}">Next Step</a>
|
67
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
68
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
title: ufo init
|
3
|
+
---
|
4
|
+
|
5
|
+
The easiest way to create this ufo folder is by using the `ufo init` command. For this tutorial we'll [tongueroo/hi](https://github.com/tongueroo/hi) which is a small test sinatra app.
|
6
|
+
Let's run the command in our newly clone project.
|
7
|
+
|
8
|
+
```sh
|
9
|
+
git clone https://github.com/tongueroo/hi.git
|
10
|
+
cd hi
|
11
|
+
ufo init --app=hi --env stag --cluster=stag --image=tongueroo/hi
|
12
|
+
```
|
13
|
+
|
14
|
+
You should see output similiar to this:
|
15
|
+
|
16
|
+
<img src="/img/tutorials/ufo-init.png" class="doc-photo" />
|
17
|
+
|
18
|
+
The standard directory structure of the ufo folder looks like this:
|
19
|
+
|
20
|
+
```sh
|
21
|
+
ufo
|
22
|
+
├── output
|
23
|
+
├── settings.yml
|
24
|
+
├── task_definitions.rb
|
25
|
+
└── templates
|
26
|
+
└── main.json.erb
|
27
|
+
```
|
28
|
+
|
29
|
+
The explanation of the folders and files were covered in detailed earlier at [Structure]({% link _docs/structure.md %}).
|
30
|
+
|
31
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/tutorial.md %}">Back</a>
|
32
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-docker-build.md %}">Next Step</a>
|
33
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
34
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
title: ufo ship
|
3
|
+
---
|
4
|
+
|
5
|
+
### Step 3 - Ship the Code to ECS
|
6
|
+
|
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
|
+
|
9
|
+
```sh
|
10
|
+
ufo ship hi-web-stag
|
11
|
+
```
|
12
|
+
|
13
|
+
The output should look something like this (some of the output has been removed for conciseness):
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ ufo ship hi-web-stag
|
17
|
+
Building docker image with:
|
18
|
+
docker build -t tongueroo/hi:ufo-2017-06-12T06-46-12-a18aa30 -f Dockerfile .
|
19
|
+
...
|
20
|
+
Pushed tongueroo/hi:ufo-2017-06-12T06-46-12-a18aa30 docker image. Took 9s.
|
21
|
+
Building Task Definitions...
|
22
|
+
Generating Task Definitions:
|
23
|
+
ufo/output/hi-web-stag.json
|
24
|
+
ufo/output/hi-worker-stag.json
|
25
|
+
ufo/output/hi-clock-stag.json
|
26
|
+
Task Definitions built in ufo/output.
|
27
|
+
hi-web-stag task definition registered.
|
28
|
+
Shipping hi-web-stag...
|
29
|
+
hi-web-stag service updated on stag cluster with task hi-web-stag
|
30
|
+
Software shipped!
|
31
|
+
Cleaning up docker images...
|
32
|
+
Running: docker rmi tongueroo/hi:ufo-2017-06-11T20-32-16-a18aa30 tongueroo/hi:ufo-2017-06-11T20-27-44-bc80e84 tongueroo/hi:ufo-2017-06-11T20-02-18-bc80e84
|
33
|
+
```
|
34
|
+
|
35
|
+
Checking the ECS console you should see something like this:
|
36
|
+
|
37
|
+
<img src="/img/tutorials/ecs-console-ufo-ship.png" class="doc-photo" />
|
38
|
+
|
39
|
+
### Skipping Previous Steps
|
40
|
+
|
41
|
+
The `ufo ship` command will automatically calls the steps we called manually in the previous pages: `ufo build` and `ufo tasks`.
|
42
|
+
|
43
|
+
If you would like to skip the first 2 steps you can use the `--no-docker` and `--no-tasks` flags:
|
44
|
+
|
45
|
+
```sh
|
46
|
+
ufo ship hi-web-stag --no-docker --no-tasks
|
47
|
+
```
|
48
|
+
|
49
|
+
The output should look something like this:
|
50
|
+
|
51
|
+
```sh
|
52
|
+
Shipping hi-web-stag...
|
53
|
+
hi-web-stag service updated on stag cluster with task hi-web-stag
|
54
|
+
Software shipped!
|
55
|
+
```
|
56
|
+
|
57
|
+
Normally you run everything together in one `ufo ship` command though. Ufo takes a multiple step process and simplifies it down to a single command!
|
58
|
+
|
59
|
+
Congratulations 🎊 You have successfully built a Docker image, register it and deployed it to AWS ECS.
|
60
|
+
|
61
|
+
<a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-tasks-build.md %}">Back</a>
|
62
|
+
<a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-ships.md %}">Next Step</a>
|
63
|
+
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
64
|
+
|