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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90a5d05cdf6d22404d21a414946933e467f5ab1f85c153f4154512824ebfb58d
4
- data.tar.gz: fd67d3241ea05d7508480ebaad399602f5bcd3ea51dbba4a65c63ffeab0edfc0
3
+ metadata.gz: 6e87e363feef7f56793f6fe3b7e09b4c702eeedbc82535eae4233e2c79b68950
4
+ data.tar.gz: 8ff17b4dab22f9c92bec4de7248d75689f472813934ef9d51e16f13d7800d2bd
5
5
  SHA512:
6
- metadata.gz: 456582ec11bd18087728e5318b61709c9c468887cd2e8ff1b03834ab52f1af324a3407af90bb39cd69f140f092f1cac0d39eb7e8d0c2ac5c062692a2d670a496
7
- data.tar.gz: 5f05000fd4e83a257aac2e13ec075b58f1c470dc26838f96b16ebbaadccfaf9d814349e063fd74e8b1bc3d381a07e040c67dac71aa7fdb2f58b409b5d4bfd1a2
6
+ metadata.gz: 5506d4b6023131bacb147e7f297314fd82504721125dbd27b7f059f8461b9680a83576d835d71426dbeaa7823b049f742c51aa59df8567631b285d663773d86b
7
+ data.tar.gz: aba58a3f64b8c17fec69eec866734941ddacbf8c5a72b8da576a8c5b4839bb36a7fcb4ecc1f9fa78d9c1328eef201cd358618571d13a9c105489470dbaf0f4e5
@@ -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
@@ -1,5 +1,5 @@
1
1
  # Site settings
2
- title: Ufo
2
+ title: UFO ECS Deployment Tool
3
3
  email: tongueroo@gmail.com
4
4
  url: http://ufoships.com
5
5
  description: "AWS ECS Deployment Tool"
@@ -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-ufo
13
- ufo init --image tongueroo/demo-ufo --app demo --force --launch-type fargate --execution-role-arn arn:aws:iam::123456789012:role/ecsTaskExecutionRole
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>
@@ -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
+ }
@@ -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 }}" />
@@ -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">{{ site.title }}</span>
8
+ <span class="name">UFO</span>
9
9
  <hr class="star-light">
10
10
  <span class="skills">{{ site.description }}</span>
11
11
  </div>
@@ -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" />{{ site.title }}</a>
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 -->
@@ -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 does require that you have a docker working on your environment. For docker installation instructions refer to to the official [docker installation guide](https://docs.docker.com/engine/installation/).
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
 
@@ -8,7 +8,7 @@ module Ufo
8
8
 
9
9
  stack = find_stack(@stack_name)
10
10
  unless stack
11
- puts "Stack #{@stack_name} does not exit"
11
+ puts "Stack #{@stack_name} does not exist."
12
12
  exit
13
13
  end
14
14
 
@@ -27,21 +27,25 @@ class Ufo::Ps
27
27
  end
28
28
 
29
29
  def started
30
- started = Time.parse(@task["started_at"].to_s)
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 started_at
37
- Time.parse(@task["started_at"].to_s)
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 that are older than 10 minutes
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
- status == "STOPPED" && started_at < Time.now - 60 * 10
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
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "4.0.2"
2
+ VERSION = "4.0.3"
3
3
  end
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.2
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-05 00:00:00.000000000 Z
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