ufo 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/_config.yml +1 -1
- data/docs/_docs/fargate.md +12 -3
- data/docs/_includes/css/ufo.css +22 -0
- data/docs/_includes/head.html +1 -1
- data/docs/_includes/header.html +1 -1
- data/docs/_includes/nav.html +1 -1
- data/docs/quick-start.md +1 -1
- data/lib/ufo/destroy.rb +1 -1
- data/lib/ufo/ps/task.rb +11 -7
- data/lib/ufo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e87e363feef7f56793f6fe3b7e09b4c702eeedbc82535eae4233e2c79b68950
|
4
|
+
data.tar.gz: 8ff17b4dab22f9c92bec4de7248d75689f472813934ef9d51e16f13d7800d2bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5506d4b6023131bacb147e7f297314fd82504721125dbd27b7f059f8461b9680a83576d835d71426dbeaa7823b049f742c51aa59df8567631b285d663773d86b
|
7
|
+
data.tar.gz: aba58a3f64b8c17fec69eec866734941ddacbf8c5a72b8da576a8c5b4839bb36a7fcb4ecc1f9fa78d9c1328eef201cd358618571d13a9c105489470dbaf0f4e5
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
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.0.3]
|
7
|
+
- fix ufo ps for stopped task
|
8
|
+
- improve docs
|
9
|
+
|
6
10
|
## [4.0.2]
|
7
11
|
- Merge pull request #45 from tongueroo/ssl2
|
8
12
|
- default deregistration_delay 10
|
data/docs/_config.yml
CHANGED
data/docs/_docs/fargate.md
CHANGED
@@ -4,13 +4,21 @@ title: Fargate
|
|
4
4
|
|
5
5
|
Ufo supports Fargate. AWS Fargate is a technology for Amazon ECS that allows you to run containers without having to manage servers or clusters. This provides an interesting "serverless" option for running Docker containers on AWS.
|
6
6
|
|
7
|
+
Here's video demo of using ufo with ECS Fargate:
|
8
|
+
|
9
|
+
<div class="video-box"><div class="video-container">
|
10
|
+
<iframe src="https://www.youtube.com/embed/nYWt-mM7kyY" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
11
|
+
</div></div>
|
12
|
+
|
13
|
+
The commands from the video are also provided and explained below.
|
14
|
+
|
7
15
|
## Fargate Example
|
8
16
|
|
9
17
|
Here's an example of creating web service with Fargate.
|
10
18
|
|
11
|
-
git clone https://github.com/tongueroo/demo-ufo
|
12
|
-
cd demo
|
13
|
-
ufo init --image tongueroo/demo-ufo --
|
19
|
+
git clone https://github.com/tongueroo/demo-ufo demo
|
20
|
+
cd demo
|
21
|
+
ufo init --image tongueroo/demo-ufo --launch-type fargate --execution-role-arn arn:aws:iam::123456789012:role/ecsTaskExecutionRole
|
14
22
|
ufo current --service demo-web
|
15
23
|
ufo ship
|
16
24
|
|
@@ -97,6 +105,7 @@ Remove the service to save costs.
|
|
97
105
|
|
98
106
|
Here's an article that compares the cost of ECS Fargate: [Heroku vs ECS Fargate vs EC2 On-Demand vs EC2 Spot Pricing Comparison](https://blog.boltops.com/2018/04/22/heroku-vs-ecs-fargate-vs-ec2-on-demand-vs-ec2-spot-pricing-comparison)
|
99
107
|
|
108
|
+
|
100
109
|
<a id="prev" class="btn btn-basic" href="{% link _docs/conventions.md %}">Back</a>
|
101
110
|
<a id="next" class="btn btn-primary" href="{% link _docs/ufo-env.md %}">Next Step</a>
|
102
111
|
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
data/docs/_includes/css/ufo.css
CHANGED
@@ -171,3 +171,25 @@ table.ship-options td:first-child {
|
|
171
171
|
padding-bottom: 0;
|
172
172
|
margin-bottom: 0;
|
173
173
|
}
|
174
|
+
|
175
|
+
.video-box {
|
176
|
+
max-width: 700px;
|
177
|
+
text-align: center;
|
178
|
+
margin: 0 auto 20px;
|
179
|
+
}
|
180
|
+
.video-box .video-container {
|
181
|
+
position:relative;
|
182
|
+
padding-bottom:56.25%;
|
183
|
+
padding-top:30px;
|
184
|
+
height:0;
|
185
|
+
overflow:hidden;
|
186
|
+
}
|
187
|
+
|
188
|
+
.video-box .video-container iframe, .video-box .video-container object, .video-box .video-container embed {
|
189
|
+
position:absolute;
|
190
|
+
top:0;
|
191
|
+
left:0;
|
192
|
+
width:100%;
|
193
|
+
height:100%;
|
194
|
+
}
|
195
|
+
}
|
data/docs/_includes/head.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<head>
|
2
2
|
<meta charset="utf-8">
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
-
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
4
|
+
<title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
|
5
5
|
<meta name="viewport" content="width=device-width">
|
6
6
|
<meta name="description" content="{{ site.description }}">
|
7
7
|
<meta name="keywords" content="{{ site.keywords }}" />
|
data/docs/_includes/header.html
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="col-lg-12">
|
6
6
|
<img class="img-responsive" src="/img/logos/ufo-logo.png" alt="">
|
7
7
|
<div class="intro-text">
|
8
|
-
<span class="name">
|
8
|
+
<span class="name">UFO</span>
|
9
9
|
<hr class="star-light">
|
10
10
|
<span class="skills">{{ site.description }}</span>
|
11
11
|
</div>
|
data/docs/_includes/nav.html
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
<span class="icon-bar"></span>
|
10
10
|
<span class="icon-bar"></span>
|
11
11
|
</button>
|
12
|
-
<a class="navbar-brand" href="/#page-top"><img class="navbar-logo" src="/img/logos/ufo-site-header.png" />
|
12
|
+
<a class="navbar-brand" href="/#page-top"><img class="navbar-logo" src="/img/logos/ufo-site-header.png" />UFO</a>
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
data/docs/quick-start.md
CHANGED
@@ -57,7 +57,7 @@ $
|
|
57
57
|
|
58
58
|
Congratulations! You have successfully deployed code to AWS ECS with ufo. It was really that simple 😁
|
59
59
|
|
60
|
-
Note: This quick start
|
60
|
+
Note: This quick start requires a working Docker installation. For Docker installation instructions refer to to the [Docker installation guide](https://docs.docker.com/engine/installation/).
|
61
61
|
|
62
62
|
Learn more in the next sections.
|
63
63
|
|
data/lib/ufo/destroy.rb
CHANGED
data/lib/ufo/ps/task.rb
CHANGED
@@ -27,21 +27,25 @@ class Ufo::Ps
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def started
|
30
|
-
started =
|
30
|
+
started = time(@task["started_at"])
|
31
|
+
return "PENDING" unless started
|
31
32
|
relative_time(started)
|
32
|
-
rescue ArgumentError
|
33
|
-
"PENDING"
|
34
33
|
end
|
35
34
|
|
36
|
-
def
|
37
|
-
Time.parse(
|
35
|
+
def time(value)
|
36
|
+
Time.parse(value.to_s)
|
38
37
|
rescue ArgumentError
|
39
38
|
nil
|
40
39
|
end
|
41
40
|
|
42
|
-
# hide stopped tasks
|
41
|
+
# hide stopped tasks have been stopped for more than 5 minutes
|
42
|
+
# created_at=2018-07-05 21:52:13 -0700,
|
43
|
+
# started_at=2018-07-05 21:52:15 -0700,
|
44
|
+
# stopping_at=2018-07-05 22:03:44 -0700,
|
45
|
+
# stopped_at=2018-07-05 22:03:45 -0700,
|
43
46
|
def hide?
|
44
|
-
|
47
|
+
stopped_at = time(@task["stopped_at"])
|
48
|
+
status == "STOPPED" && stopped_at < Time.now - 60 * 5
|
45
49
|
end
|
46
50
|
|
47
51
|
def status
|
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: 4.0.
|
4
|
+
version: 4.0.3
|
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-07-
|
11
|
+
date: 2018-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudformation
|