ufo 3.5.7 → 4.0.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 +24 -0
- data/Gemfile.lock +16 -10
- data/README.md +12 -13
- data/docs/_config.yml +1 -1
- data/docs/_docs/auto-completion.md +4 -4
- data/docs/_docs/automated-cleanup.md +1 -1
- data/docs/_docs/conventions.md +7 -7
- data/docs/_docs/customize-cloudformation.md +36 -0
- data/docs/_docs/faq.md +9 -7
- data/docs/_docs/fargate.md +102 -0
- data/docs/_docs/helpers.md +3 -3
- data/docs/_docs/load-balancer.md +72 -0
- data/docs/_docs/migrations.md +2 -2
- data/docs/_docs/next-steps.md +2 -2
- data/docs/_docs/params.md +12 -41
- data/docs/_docs/route53-support.md +28 -0
- data/docs/_docs/run-in-pieces.md +2 -2
- data/docs/_docs/security-groups.md +54 -0
- data/docs/_docs/settings-cfn.md +11 -0
- data/docs/_docs/settings-network.md +34 -0
- data/docs/_docs/settings.md +18 -15
- data/docs/_docs/single-task.md +3 -3
- data/docs/_docs/ssl-support.md +42 -0
- data/docs/_docs/structure.md +5 -1
- data/docs/_docs/stuck-cloudformation.md +30 -0
- data/docs/_docs/tutorial-ufo-docker-build.md +19 -31
- data/docs/_docs/tutorial-ufo-init.md +16 -12
- data/docs/_docs/tutorial-ufo-ship.md +50 -54
- data/docs/_docs/tutorial-ufo-ships.md +9 -7
- data/docs/_docs/tutorial-ufo-tasks-build.md +26 -17
- data/docs/_docs/ufo-current.md +50 -0
- data/docs/_docs/ufo-env-extra.md +21 -0
- data/docs/_docs/ufo-env.md +6 -13
- data/docs/_docs/ufo-tasks-register.md +3 -3
- data/docs/_docs/upgrade4.md +49 -0
- data/docs/_docs/variables.md +5 -5
- data/docs/_docs/why-cloudformation.md +22 -0
- data/docs/_includes/about.html +1 -1
- data/docs/_includes/cfn-customize.md +39 -0
- data/docs/_includes/commands.html +6 -6
- data/docs/_includes/css/ufo.css +1 -0
- data/docs/_includes/example.html +13 -13
- data/docs/_includes/reference.md +1 -1
- data/docs/_includes/subnav.html +22 -5
- data/docs/_includes/ufo-ship-options.md +7 -6
- data/docs/_reference/ufo-apps.md +36 -0
- data/docs/_reference/ufo-cancel.md +24 -0
- data/docs/_reference/ufo-completion.md +1 -1
- data/docs/_reference/ufo-completion_script.md +1 -1
- data/docs/_reference/ufo-current.md +93 -0
- data/docs/_reference/ufo-deploy.md +18 -17
- data/docs/_reference/ufo-destroy.md +6 -4
- data/docs/_reference/ufo-docker-base.md +7 -7
- data/docs/_reference/ufo-docker-build.md +9 -9
- data/docs/_reference/ufo-docker-clean.md +8 -8
- data/docs/_reference/ufo-docker-name.md +4 -4
- data/docs/_reference/ufo-docker.md +4 -2
- data/docs/_reference/ufo-init.md +31 -20
- data/docs/_reference/ufo-network-help.md +15 -0
- data/docs/_reference/ufo-network-init.md +38 -0
- data/docs/_reference/ufo-network.md +26 -0
- data/docs/_reference/ufo-ps.md +53 -0
- data/docs/_reference/ufo-releases.md +40 -0
- data/docs/_reference/ufo-resources.md +44 -0
- data/docs/_reference/ufo-rollback.md +59 -0
- data/docs/_reference/ufo-scale.md +23 -3
- data/docs/_reference/ufo-ship.md +54 -27
- data/docs/_reference/ufo-ships.md +17 -26
- data/docs/_reference/ufo-stop.md +31 -0
- data/docs/_reference/ufo-task.md +15 -16
- data/docs/_reference/ufo-tasks-build.md +10 -10
- data/docs/_reference/ufo-tasks-register.md +3 -3
- data/docs/_reference/ufo-tasks.md +1 -1
- data/docs/_reference/ufo-upgrade-help.md +15 -0
- data/docs/_reference/ufo-upgrade-v2to3.md +15 -0
- data/docs/_reference/ufo-upgrade-v3_3to3_4.md +15 -0
- data/docs/_reference/ufo-upgrade-v3to4.md +27 -0
- data/docs/_reference/ufo-upgrade.md +28 -0
- data/docs/_reference/ufo-version.md +1 -1
- data/docs/articles.md +2 -2
- data/docs/docs.md +1 -1
- data/docs/img/docs/cloudformation-resources.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/quick-start.md +21 -9
- data/docs/reference.md +10 -2
- data/exe/ufo +1 -1
- data/lib/cfn/stack.yml +259 -0
- data/lib/template/.ufo/params.yml.tt +21 -60
- data/lib/template/.ufo/settings.yml.tt +6 -1
- data/lib/template/.ufo/settings/cfn/default.yml.tt +55 -0
- data/lib/template/.ufo/settings/network/default.yml.tt +18 -0
- data/lib/template/.ufo/task_definitions.rb.tt +7 -6
- data/lib/template/.ufo/templates/fargate.json.erb +1 -1
- data/lib/template/.ufo/templates/main.json.erb +1 -0
- data/lib/template/.ufo/variables/base.rb.tt +5 -2
- data/lib/template/Dockerfile +10 -15
- data/lib/template/bin/deploy.tt +2 -2
- data/lib/ufo.rb +29 -20
- data/lib/ufo/apps.rb +49 -0
- data/lib/ufo/apps/cfn_map.rb +70 -0
- data/lib/ufo/apps/service.rb +56 -0
- data/lib/ufo/aws_service.rb +15 -6
- data/lib/ufo/base.rb +32 -0
- data/lib/ufo/cancel.rb +23 -0
- data/lib/ufo/cli.rb +91 -27
- data/lib/ufo/core.rb +35 -3
- data/lib/ufo/current.rb +104 -0
- data/lib/ufo/destroy.rb +10 -41
- data/lib/ufo/docker/builder.rb +5 -4
- data/lib/ufo/docker/cleaner.rb +1 -1
- data/lib/ufo/docker/pusher.rb +2 -2
- data/lib/ufo/ecr/cleaner.rb +1 -1
- data/lib/ufo/help/apps.md +12 -0
- data/lib/ufo/help/balancer.md +3 -0
- data/lib/ufo/help/current.md +65 -0
- data/lib/ufo/help/deploy.md +4 -4
- data/lib/ufo/help/destroy.md +3 -3
- data/lib/ufo/help/docker.md +3 -1
- data/lib/ufo/help/docker/base.md +7 -7
- data/lib/ufo/help/docker/build.md +9 -9
- data/lib/ufo/help/docker/clean.md +8 -8
- data/lib/ufo/help/docker/name.md +4 -4
- data/lib/ufo/help/help.md +5 -0
- data/lib/ufo/help/init.md +24 -16
- data/lib/ufo/help/network/init.md +13 -0
- data/lib/ufo/help/ps.md +27 -0
- data/lib/ufo/help/releases.md +16 -0
- data/lib/ufo/help/resources.md +20 -0
- data/lib/ufo/help/rollback.md +35 -0
- data/lib/ufo/help/scale.md +22 -2
- data/lib/ufo/help/ship.md +40 -14
- data/lib/ufo/help/ships.md +4 -13
- data/lib/ufo/help/stop.md +7 -0
- data/lib/ufo/help/task.md +9 -9
- data/lib/ufo/help/tasks/build.md +10 -10
- data/lib/ufo/help/tasks/register.md +3 -3
- data/lib/ufo/help/upgrade/v3to4.md +3 -0
- data/lib/ufo/info.rb +62 -0
- data/lib/ufo/init.rb +36 -23
- data/lib/ufo/log_group.rb +2 -1
- data/lib/ufo/network.rb +24 -0
- data/lib/ufo/network/fetch.rb +41 -0
- data/lib/ufo/network/helper.rb +23 -0
- data/lib/ufo/network/init.rb +26 -0
- data/lib/ufo/param.rb +5 -5
- data/lib/ufo/ps.rb +102 -0
- data/lib/ufo/ps/task.rb +78 -0
- data/lib/ufo/releases.rb +14 -0
- data/lib/ufo/rollback.rb +53 -0
- data/lib/ufo/scale.rb +6 -12
- data/lib/ufo/sequence.rb +7 -0
- data/lib/ufo/setting.rb +7 -6
- data/lib/ufo/setting/profile.rb +24 -0
- data/lib/ufo/ship.rb +35 -326
- data/lib/ufo/stack.rb +203 -0
- data/lib/ufo/stack/context.rb +242 -0
- data/lib/ufo/stack/helper.rb +28 -0
- data/lib/ufo/stack/status.rb +195 -0
- data/lib/ufo/stop.rb +47 -0
- data/lib/ufo/task.rb +96 -15
- data/lib/ufo/tasks/register.rb +1 -1
- data/lib/ufo/template_scope.rb +81 -7
- data/lib/ufo/upgrade.rb +32 -0
- data/lib/ufo/{upgrade3.rb → upgrade/upgrade3.rb} +1 -1
- data/lib/ufo/{upgrade33_to_34.rb → upgrade/upgrade33to34.rb} +2 -2
- data/lib/ufo/upgrade/upgrade4.rb +161 -0
- data/lib/ufo/util.rb +19 -6
- data/lib/ufo/version.rb +1 -1
- data/spec/fixtures/apps/describe_services.json +96 -0
- data/spec/fixtures/cfn/stack-events-complete.json +1080 -0
- data/spec/fixtures/cfn/stack-events-in-progress.json +1080 -0
- data/spec/fixtures/cfn/stack-events-update-rollback-complete.json +1086 -0
- data/spec/fixtures/deployments.json +50 -0
- data/spec/fixtures/ps/describe_tasks.json +58 -0
- data/spec/fixtures/settings.yml +2 -0
- data/spec/lib/apps_spec.rb +20 -0
- data/spec/lib/cli_spec.rb +4 -4
- data/spec/lib/ps_spec.rb +14 -0
- data/spec/lib/setting_spec.rb +2 -1
- data/spec/lib/ship_spec.rb +6 -30
- data/spec/lib/stack/status_spec.rb +76 -0
- data/spec/lib/stop_spec.rb +13 -0
- data/spec/lib/task_spec.rb +5 -2
- data/spec/spec_helper.rb +1 -1
- data/ufo.gemspec +2 -0
- metadata +120 -6
- data/docs/_reference/ufo-upgrade3.md +0 -23
- data/docs/_reference/ufo-upgrade3_3_to_3_4.md +0 -23
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
title: ufo ps
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo ps SERVICE
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Show process info on ECS service.
|
13
|
+
|
14
|
+
## Examples
|
15
|
+
|
16
|
+
$ ufo ps
|
17
|
+
=> Service: demo-web
|
18
|
+
Service name: development-demo-web-Ecs-7GAUAXH5F56M
|
19
|
+
Status: ACTIVE
|
20
|
+
Running count: 2
|
21
|
+
Desired count: 2
|
22
|
+
Launch type: FARGATE
|
23
|
+
Task definition: demo-web:85
|
24
|
+
Elb: develop-Elb-1M74CLRS2G0Z4-686742146.us-east-1.elb.amazonaws.com
|
25
|
+
+----------+------+-------------+----------------+---------+-------+
|
26
|
+
| Id | Name | Release | Started | Status | Notes |
|
27
|
+
+----------+------+-------------+----------------+---------+-------+
|
28
|
+
| f590ee5e | web | demo-web:85 | 47 minutes ago | RUNNING | |
|
29
|
+
| fb60ba9f | web | demo-web:85 | 45 minutes ago | RUNNING | |
|
30
|
+
+----------+------+-------------+----------------+---------+-------+
|
31
|
+
|
32
|
+
Skip the summary info:
|
33
|
+
|
34
|
+
$ ufo ps --no-summary
|
35
|
+
+----------+------+-------------+----------------+---------+-------+
|
36
|
+
| Id | Name | Release | Started | Status | Notes |
|
37
|
+
+----------+------+-------------+----------------+---------+-------+
|
38
|
+
| f590ee5e | web | demo-web:85 | 48 minutes ago | RUNNING | |
|
39
|
+
| fb60ba9f | web | demo-web:85 | 45 minutes ago | RUNNING | |
|
40
|
+
+----------+------+-------------+----------------+---------+-------+
|
41
|
+
|
42
|
+
|
43
|
+
## Options
|
44
|
+
|
45
|
+
```
|
46
|
+
[--summary], [--no-summary] # Display summary header info.
|
47
|
+
# Default: true
|
48
|
+
[--verbose], [--no-verbose]
|
49
|
+
[--mute], [--no-mute]
|
50
|
+
[--noop], [--no-noop]
|
51
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
52
|
+
```
|
53
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
title: ufo releases
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo releases SERVICE
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Show possible 'releases' or task definitions for the service.
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
$ ufo releases
|
17
|
+
Recent task definitions for this service:
|
18
|
+
demo-web:86
|
19
|
+
demo-web:85
|
20
|
+
demo-web:84
|
21
|
+
demo-web:83
|
22
|
+
demo-web:82
|
23
|
+
demo-web:81
|
24
|
+
demo-web:80
|
25
|
+
demo-web:79
|
26
|
+
demo-web:78
|
27
|
+
demo-web:77
|
28
|
+
demo-web:76
|
29
|
+
$
|
30
|
+
|
31
|
+
|
32
|
+
## Options
|
33
|
+
|
34
|
+
```
|
35
|
+
[--verbose], [--no-verbose]
|
36
|
+
[--mute], [--no-mute]
|
37
|
+
[--noop], [--no-noop]
|
38
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
39
|
+
```
|
40
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
title: ufo resources
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo resources SERVICE
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
The ECS service resources.
|
13
|
+
|
14
|
+
Displays information about the service.
|
15
|
+
|
16
|
+
## Examples
|
17
|
+
|
18
|
+
$ ufo resources demo-web
|
19
|
+
Resources:
|
20
|
+
Ecs - AWS::ECS::Service:
|
21
|
+
arn:aws:ecs:us-east-1:111111111111:service/dev-demo-web-Ecs-KN8OVQ7L2N40
|
22
|
+
EcsSecurityGroupRule - AWS::EC2::SecurityGroupIngress:
|
23
|
+
EcsSecurityGroupRule
|
24
|
+
EcsSecurityGroup - AWS::EC2::SecurityGroup:
|
25
|
+
sg-63c17228
|
26
|
+
Elb - AWS::ElasticLoadBalancingV2::LoadBalancer:
|
27
|
+
arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/dev-hi-Elb-1KEVRDILLSUC9/0b9434b7a9a66fb7
|
28
|
+
ElbSecurityGroup - AWS::EC2::SecurityGroup:
|
29
|
+
sg-11b1025a
|
30
|
+
Listener - AWS::ElasticLoadBalancingV2::Listener:
|
31
|
+
arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/dev-hi-Elb-1KEVRDILLSUC9/0b9434b7a9a66fb7/1996f1f252d7ba2e
|
32
|
+
TargetGroup - AWS::ElasticLoadBalancingV2::TargetGroup:
|
33
|
+
arn:aws:elasticloadbalancing:us-east-1:111111111111:targetgroup/dev-h-Targe-1VUFA8577XWT7/7e67276c182fdc87
|
34
|
+
|
35
|
+
|
36
|
+
## Options
|
37
|
+
|
38
|
+
```
|
39
|
+
[--verbose], [--no-verbose]
|
40
|
+
[--mute], [--no-mute]
|
41
|
+
[--noop], [--no-noop]
|
42
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
43
|
+
```
|
44
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
title: ufo rollback
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo rollback SERVICE VERSION
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Rolls back to older task definition.
|
13
|
+
|
14
|
+
## Examples
|
15
|
+
|
16
|
+
You only need to specific the task definition version number, though you can specify the name also
|
17
|
+
|
18
|
+
ufo rollback demo-web 1
|
19
|
+
ufo rollback demo-web demo-web:1
|
20
|
+
|
21
|
+
To see recent task definitions:
|
22
|
+
|
23
|
+
ufo releases
|
24
|
+
|
25
|
+
If you set a current service with `ufo current`, then the commands get shorten:
|
26
|
+
|
27
|
+
ufo rollback demo-web:1
|
28
|
+
ufo rollback 1
|
29
|
+
|
30
|
+
Note, task definitions get created by many ways with more than just `ufo ship`. So it the previous version might not be the latest version number minus one.
|
31
|
+
|
32
|
+
## Using image name
|
33
|
+
|
34
|
+
Another way to specify the version for rollback is with the container definition's image value. Here's the portion of the ecs task definition that you would look for:
|
35
|
+
|
36
|
+
...
|
37
|
+
"container_definitions": [
|
38
|
+
{
|
39
|
+
"name": "web",
|
40
|
+
"image": "tongueroo/demo-ufo:ufo-2018-06-21T15-03-52-ac60240",
|
41
|
+
"cpu": 256,
|
42
|
+
...
|
43
|
+
|
44
|
+
You only need to specify enough for a match to be found. Ufo searches the 30 most recent task definitions. So all of these would work:
|
45
|
+
|
46
|
+
ufo rollback tongueroo/demo-ufo:ufo-2018-06-21T15-03-52-ac60240
|
47
|
+
ufo rollback 2018-06-21T15-03-52
|
48
|
+
ufo rollback ac60240
|
49
|
+
|
50
|
+
|
51
|
+
## Options
|
52
|
+
|
53
|
+
```
|
54
|
+
[--verbose], [--no-verbose]
|
55
|
+
[--mute], [--no-mute]
|
56
|
+
[--noop], [--no-noop]
|
57
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
58
|
+
```
|
59
|
+
|
@@ -13,8 +13,28 @@ Scale the ECS service.
|
|
13
13
|
|
14
14
|
Ufo provides a command to scale up and down an ECS service quickly. It is a simple wrapper for `aws ecs update-service --service xxx ----desired-count xxx`. Here's an example of how you use it:
|
15
15
|
|
16
|
-
$ ufo scale
|
17
|
-
Scale
|
16
|
+
$ ufo scale 3
|
17
|
+
Scale demo-web service in development cluster to 3
|
18
|
+
|
19
|
+
It is useful to use `ufo ps` to check the status.
|
20
|
+
|
21
|
+
$ ufo ps
|
22
|
+
=> Service: demo-web
|
23
|
+
Service name: development-demo-web-Ecs-7GAUAXH5F56M
|
24
|
+
Status: ACTIVE
|
25
|
+
Running count: 2
|
26
|
+
Desired count: 3
|
27
|
+
Launch type: FARGATE
|
28
|
+
Task definition: demo-web:85
|
29
|
+
Elb: develop-Elb-1M74CLRS2G0Z4-686742146.us-east-1.elb.amazonaws.com
|
30
|
+
+----------+------+-------------+----------------+--------------+-------+
|
31
|
+
| Id | Name | Release | Started | Status | Notes |
|
32
|
+
+----------+------+-------------+----------------+--------------+-------+
|
33
|
+
| 8f95ef9d | web | demo-web:85 | PENDING | PROVISIONING | |
|
34
|
+
| f590ee5e | web | demo-web:85 | 50 minutes ago | RUNNING | |
|
35
|
+
| fb60ba9f | web | demo-web:85 | 48 minutes ago | RUNNING | |
|
36
|
+
+----------+------+-------------+----------------+--------------+-------+
|
37
|
+
$
|
18
38
|
|
19
39
|
While scaling via this method is quick and convenient the [ECS Service AutoScaling](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html) that is built into ECS is a much more powerful way to manage scaling your ECS service.
|
20
40
|
|
@@ -25,6 +45,6 @@ While scaling via this method is quick and convenient the [ECS Service AutoScali
|
|
25
45
|
[--verbose], [--no-verbose]
|
26
46
|
[--mute], [--no-mute]
|
27
47
|
[--noop], [--no-noop]
|
28
|
-
[--cluster=CLUSTER] # Cluster. Overrides ufo/settings.yml.
|
48
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
29
49
|
```
|
30
50
|
|
data/docs/_reference/ufo-ship.md
CHANGED
@@ -19,15 +19,15 @@ The main command you use when using ufo is: `ufo ship`. This command:
|
|
19
19
|
|
20
20
|
Basic usage is:
|
21
21
|
|
22
|
-
ufo ship
|
22
|
+
ufo ship demo-web
|
23
23
|
|
24
24
|
The ECS service gets created if the service does not yet exist on the cluster.
|
25
25
|
|
26
26
|
### Conventions
|
27
27
|
|
28
|
-
By convention the task and service names match. If you need override to this convention then you can specific the task. For example if you want to ship to the `
|
28
|
+
By convention the task and service names match. If you need override to this convention then you can specific the task. For example if you want to ship to the `demo-web-1` service and use the `demo-web` task, run:
|
29
29
|
|
30
|
-
ufo ship
|
30
|
+
ufo ship demo-web-1 --task demo-web
|
31
31
|
|
32
32
|
## Options in Detail
|
33
33
|
|
@@ -37,15 +37,31 @@ The command has a decent amount of options, you can see the options available wi
|
|
37
37
|
|
38
38
|
As you can see there are plenty of options for `ufo ship`. Let's demonstrate usage of them in a few examples.
|
39
39
|
|
40
|
-
### Load Balancer
|
40
|
+
### Load Balancer
|
41
41
|
|
42
|
-
|
42
|
+
ECS services can be associated with a Load Balancer upon creation. Ufo can automatically create a load balancer. The options:
|
43
43
|
|
44
|
-
|
44
|
+
1. Automatically create the ELB.
|
45
|
+
2. Provide a target group from an existing ELB.
|
46
|
+
3. No ELB is created.
|
45
47
|
|
46
|
-
|
48
|
+
Here are examples for each of them:
|
47
49
|
|
48
|
-
ufo ship
|
50
|
+
ufo ship demo-web --elb=true
|
51
|
+
|
52
|
+
# Use existing target group from pre-created ELB:
|
53
|
+
ufo ship demo-web --elb=arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/target-name/2378947392743
|
54
|
+
|
55
|
+
# Disable creating elb and prompt:
|
56
|
+
ufo ship demo-web --elb=false
|
57
|
+
|
58
|
+
Note, if the docker container's name is web then the `--elb` flag defaults to true automatically.
|
59
|
+
|
60
|
+
If you need to create a network load balancer with pre-allocated EIPs, you can use `--elb-eip-ids`, example:
|
61
|
+
|
62
|
+
ufo deploy demo-web --elb-eip-ids eipalloc-a8de9ca1 eipalloc-a8de9ca2
|
63
|
+
|
64
|
+
More info available at the [load balancer docs](http://ufoships.com/docs/load-balancer/).
|
49
65
|
|
50
66
|
### Deploying Task Definition without Docker Build
|
51
67
|
|
@@ -55,27 +71,37 @@ Let's you want skip the docker build phase and only want use ufo to deploy a tas
|
|
55
71
|
|
56
72
|
By default when ufo updates the ECS service with the new task definition it does so asynchronuously. You then normally visit the ECS service console and then refresh until you see that the deployment is completed. You can also have ufo poll and wait for the deployment to be done with the `--wait` option
|
57
73
|
|
58
|
-
ufo ship
|
74
|
+
ufo ship demo-web --wait
|
59
75
|
|
60
76
|
You should see output similar to this:
|
61
77
|
|
62
|
-
Shipping
|
63
|
-
|
64
|
-
Waiting for deployment of task definition
|
78
|
+
Shipping demo-web...
|
79
|
+
demo-web service updated on cluster with task demo-web
|
80
|
+
Waiting for deployment of task definition demo-web:8 to complete
|
65
81
|
......
|
66
82
|
Time waiting for ECS deployment: 31s.
|
67
83
|
Software shipped!
|
68
84
|
|
85
|
+
### Route 53 DNS Support
|
86
|
+
|
87
|
+
Ufo can automatically create a "pretty" route53 record an set it to the created ELB dns name. This is done in by configuring the `.ufo/settings/network/[profile].yml` file. Example:
|
88
|
+
|
89
|
+
dns:
|
90
|
+
name: "{stack_name}.mydomain.com."
|
91
|
+
hosted_zone_name: mydomain.com. # dont forget the trailing period
|
92
|
+
|
93
|
+
Refer to [Route53 Support](http://ufoships.com/docs/route53-support/) for more info.
|
94
|
+
|
69
95
|
### Cleaning up Docker Images Automatically
|
70
96
|
|
71
97
|
Since ufo builds the Docker image every time there's a deployment you will end up with a long list of docker images. Ufo automatically cleans up older docker images at the end of the deploy process if you are using AWS ECR. By default ufo keeps the most recent 30 Docker images. This can be adjust with the `--ecr-keep` option.
|
72
98
|
|
73
|
-
docker ship
|
99
|
+
docker ship demo-web --ecr-keep 2
|
74
100
|
|
75
101
|
You should see something like this:
|
76
102
|
|
77
103
|
Cleaning up docker images...
|
78
|
-
Running: docker rmi tongueroo/
|
104
|
+
Running: docker rmi tongueroo/demo-ufo:ufo-2017-06-12T06-46-12-a18aa30
|
79
105
|
|
80
106
|
If you are using DockerHub or another registry, ufo does not automatically clean up images.
|
81
107
|
|
@@ -83,18 +109,19 @@ If you are using DockerHub or another registry, ufo does not automatically clean
|
|
83
109
|
## Options
|
84
110
|
|
85
111
|
```
|
86
|
-
[--
|
87
|
-
[--
|
88
|
-
[--
|
89
|
-
|
90
|
-
[--
|
91
|
-
|
92
|
-
|
93
|
-
[--
|
94
|
-
[--
|
95
|
-
|
96
|
-
[--
|
97
|
-
[--
|
98
|
-
[--
|
112
|
+
[--ecr-keep=N] # ECR specific cleanup of old images. Specifies how many images to keep. Only runs if the images are ECR images. Defaults keeps all images.
|
113
|
+
[--elb=ELB] # Decides to create elb, not create elb or use existing target group.
|
114
|
+
[--elb-eip-ids=one two three] # EIP Allocation ids to use for network load balancer.
|
115
|
+
[--elb-type=ELB_TYPE] # ELB type: application or network. Keep current deployed elb type when not specified.
|
116
|
+
[--pretty], [--no-pretty] # Pretty format the json for the task definitions
|
117
|
+
# Default: true
|
118
|
+
[--stop-old-tasks], [--no-stop-old-tasks] # Stop old tasks as part of deployment to speed it up
|
119
|
+
[--task=TASK] # ECS task name, to override the task name convention.
|
120
|
+
[--wait], [--no-wait] # Wait for deployment to complete
|
121
|
+
# Default: true
|
122
|
+
[--verbose], [--no-verbose]
|
123
|
+
[--mute], [--no-mute]
|
124
|
+
[--noop], [--no-noop]
|
125
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
99
126
|
```
|
100
127
|
|
@@ -19,7 +19,7 @@ The `ufo ships` command allows you to deploy the *same* Docker image and task de
|
|
19
19
|
|
20
20
|
Instead of using the [ufo ship]({% link _reference/ufo-ship.md %}) and build and deploying the code 3 times you can instead use `ufo ships`. This will result in the *same* Docker image and *same* task definition being deployed to all 3 services. Example usage:
|
21
21
|
|
22
|
-
ufo ships
|
22
|
+
ufo ships demo-web demo-worker demo-clock
|
23
23
|
|
24
24
|
## Shell expansion
|
25
25
|
|
@@ -30,14 +30,14 @@ Since the ECS service names are provided as a list you can shorten the command b
|
|
30
30
|
If you're new to shell expansion, run this to understand why above works just as well:
|
31
31
|
|
32
32
|
$ echo hi-{web,worker,clock}
|
33
|
-
|
33
|
+
demo-web demo-worker demo-clock
|
34
34
|
|
35
35
|
## Overriding convention
|
36
36
|
|
37
37
|
As explained in detail in [Conventions]({% link _docs/conventions.md %}) the task definition and service name are the same by convention. This convention also applies for each of the services being shipped in the list. The task definition and service names match for each of the services in the list. If you would like to override the convention as part of the ships command then you use a special syntax. In the special syntax the service and task definition is separated by a colon. Examples:
|
38
38
|
|
39
|
-
ufo ships
|
40
|
-
ufo ships
|
39
|
+
ufo ships demo-web-1:demo-web demo-clock-1 demo-worker-1
|
40
|
+
ufo ships demo-web-1:my-task demo-clock-1:another-task demo-worker-1:third-task
|
41
41
|
|
42
42
|
## ufo ships Options
|
43
43
|
|
@@ -47,31 +47,22 @@ The `ufo ships`, `ufo ship`, `ufo deploy` command support the same options. The
|
|
47
47
|
|
48
48
|
Note: The `--task` option is not used with the `ufo ships` command.
|
49
49
|
|
50
|
-
## ELB Target Group
|
51
|
-
|
52
|
-
For each service being deployed to, ufo will create the ECS service if the service does not yet exist on the cluster. The deploy process will prompt you for the ELB `--target-group` if you are deploying to a 'web' service that does not yet exist. Ufo determines that it is a web service by the name of the service. If the service has 'web' in the name then it is considered a web service. If it is not a web service then the `--target-group` option gets ignored.
|
53
|
-
|
54
|
-
The prommt can be bypassed by specifying a valid `--target-group` option or specifying the `---no-target-group-prompt` option. ## Examples
|
55
|
-
|
56
|
-
ufo ships hi-web hi-clock hi-worker --target-group arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/hi-web/jsdlfjsdkd
|
57
|
-
ufo ships hi-web hi-clock hi-worker --no-target-group-prompt
|
58
|
-
|
59
50
|
|
60
51
|
## Options
|
61
52
|
|
62
53
|
```
|
63
|
-
[--
|
64
|
-
[--
|
65
|
-
[--
|
66
|
-
|
67
|
-
[--
|
68
|
-
|
69
|
-
|
70
|
-
[--
|
71
|
-
[--
|
72
|
-
[--verbose], [--no-verbose]
|
73
|
-
[--mute], [--no-mute]
|
74
|
-
[--noop], [--no-noop]
|
75
|
-
[--cluster=CLUSTER]
|
54
|
+
[--ecr-keep=N] # ECR specific cleanup of old images. Specifies how many images to keep. Only runs if the images are ECR images. Defaults keeps all images.
|
55
|
+
[--elb=ELB] # Decides to create elb, not create elb or use existing target group.
|
56
|
+
[--elb-eip-ids=one two three] # EIP Allocation ids to use for network load balancer.
|
57
|
+
[--elb-type=ELB_TYPE] # ELB type: application or network. Keep current deployed elb type when not specified.
|
58
|
+
[--pretty], [--no-pretty] # Pretty format the json for the task definitions
|
59
|
+
# Default: true
|
60
|
+
[--stop-old-tasks], [--no-stop-old-tasks] # Stop old tasks as part of deployment to speed it up
|
61
|
+
[--task=TASK] # ECS task name, to override the task name convention.
|
62
|
+
[--wait], [--no-wait] # Wait for deployment to complete
|
63
|
+
[--verbose], [--no-verbose]
|
64
|
+
[--mute], [--no-mute]
|
65
|
+
[--noop], [--no-noop]
|
66
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
76
67
|
```
|
77
68
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
title: ufo stop
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
ufo stop SERVICE
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Stop tasks from old deployments. Can speed up deployments with network load balancer.
|
13
|
+
|
14
|
+
ECS deployments can sometimes take a while. One reason could be because the old ECS tasks can take some time to drain and removed. The recommended way to speed this draining process up is configuring the `deregistration_delay.timeout_seconds` to a low value. You can configured this in `.ufo/settings/cfn/default.yml`. For more info refer to http://localhost:4000/docs/settings-cfn/ This setting works well for Application Load Balancers.
|
15
|
+
|
16
|
+
However, for Network Load Balancers, it seems like the deregistration_delay is not currently being respected. In this case, it take an annoying load time and this command can help speed up the process.
|
17
|
+
|
18
|
+
The command looks for any extra old ongoing deployments and stops the tasks associated with them. This can cause errors for any inflight requests.
|
19
|
+
|
20
|
+
ufo stop demo-web
|
21
|
+
|
22
|
+
|
23
|
+
## Options
|
24
|
+
|
25
|
+
```
|
26
|
+
[--verbose], [--no-verbose]
|
27
|
+
[--mute], [--no-mute]
|
28
|
+
[--noop], [--no-noop]
|
29
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
30
|
+
```
|
31
|
+
|