ufo 3.1.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/bin/commit_docs.sh +26 -0
  3. data/.circleci/config.yml +13 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile.lock +6 -4
  6. data/Rakefile +7 -0
  7. data/docs/_config.yml +3 -0
  8. data/docs/_docs/conventions.md +3 -3
  9. data/docs/_docs/install.md +5 -5
  10. data/docs/_docs/settings.md +3 -3
  11. data/docs/_docs/structure.md +2 -2
  12. data/docs/_docs/tutorial-ufo-docker-build.md +1 -1
  13. data/docs/_docs/tutorial-ufo-init.md +1 -1
  14. data/docs/_docs/tutorial-ufo-ship.md +3 -7
  15. data/docs/_docs/tutorial-ufo-ships.md +2 -2
  16. data/docs/_docs/tutorial-ufo-tasks-build.md +7 -7
  17. data/docs/_docs/tutorial.md +1 -1
  18. data/docs/_docs/ufo-env.md +5 -5
  19. data/docs/_docs/ufo-tasks-register.md +0 -4
  20. data/docs/_docs/variables.md +6 -7
  21. data/docs/_includes/content.html +5 -0
  22. data/docs/_includes/css/main.css +23 -4
  23. data/docs/_includes/css/ufo.css +9 -9
  24. data/docs/_includes/reference.md +5 -0
  25. data/docs/_includes/subnav.html +16 -33
  26. data/docs/_reference/ufo-completion.md +46 -0
  27. data/docs/_reference/ufo-completion_script.md +27 -0
  28. data/docs/_reference/ufo-deploy.md +51 -0
  29. data/docs/_reference/ufo-destroy.md +34 -0
  30. data/docs/{_docs → _reference}/ufo-docker-base.md +36 -17
  31. data/docs/_reference/ufo-docker-build.md +81 -0
  32. data/docs/_reference/ufo-docker-clean.md +44 -0
  33. data/docs/_reference/ufo-docker-help.md +15 -0
  34. data/docs/_reference/ufo-docker-name.md +37 -0
  35. data/docs/_reference/ufo-docker-push.md +49 -0
  36. data/docs/_reference/ufo-docker.md +35 -0
  37. data/docs/_reference/ufo-init.md +74 -0
  38. data/docs/_reference/ufo-scale.md +30 -0
  39. data/docs/_reference/ufo-ship.md +100 -0
  40. data/docs/_reference/ufo-ships.md +77 -0
  41. data/docs/_reference/ufo-task.md +37 -0
  42. data/docs/_reference/ufo-tasks-build.md +179 -0
  43. data/docs/_reference/ufo-tasks-help.md +15 -0
  44. data/docs/_reference/ufo-tasks-register.md +29 -0
  45. data/docs/_reference/ufo-tasks.md +35 -0
  46. data/docs/_reference/ufo-upgrade3.md +23 -0
  47. data/docs/_reference/ufo-version.md +23 -0
  48. data/docs/articles.md +2 -0
  49. data/docs/docs.md +3 -3
  50. data/docs/quick-start.md +2 -2
  51. data/docs/reference.md +18 -0
  52. data/lib/ufo/cli.rb +13 -13
  53. data/lib/ufo/docker.rb +5 -5
  54. data/lib/ufo/ecr/auth.rb +6 -1
  55. data/lib/ufo/ecr/cleaner.rb +1 -1
  56. data/lib/ufo/help/completion.md +1 -1
  57. data/lib/ufo/help/completions.md +1 -1
  58. data/lib/ufo/help/deploy.md +5 -1
  59. data/lib/ufo/help/destroy.md +7 -3
  60. data/lib/ufo/help/docker.md +1 -1
  61. data/lib/ufo/help/docker/base.md +34 -4
  62. data/lib/ufo/help/docker/build.md +59 -4
  63. data/lib/ufo/help/docker/clean.md +12 -6
  64. data/lib/ufo/help/docker/name.md +10 -10
  65. data/lib/ufo/help/docker/push.md +23 -6
  66. data/lib/ufo/help/hello.md +1 -1
  67. data/lib/ufo/help/init.md +43 -5
  68. data/lib/ufo/help/scale.md +4 -3
  69. data/lib/ufo/help/ship.md +59 -8
  70. data/lib/ufo/help/ships.md +35 -9
  71. data/lib/ufo/help/task.md +1 -1
  72. data/lib/ufo/help/tasks.md +1 -1
  73. data/lib/ufo/help/tasks/build.md +155 -4
  74. data/lib/ufo/help/tasks/register.md +12 -3
  75. data/lib/ufo/ship.rb +2 -4
  76. data/lib/ufo/tasks.rb +2 -2
  77. data/lib/ufo/version.rb +1 -1
  78. data/spec/lib/ship_spec.rb +2 -1
  79. data/ufo.gemspec +3 -3
  80. metadata +44 -21
  81. data/docs/_docs/commands.md +0 -10
  82. data/docs/_docs/ufo-deploy.md +0 -30
  83. data/docs/_docs/ufo-destroy.md +0 -19
  84. data/docs/_docs/ufo-docker-build.md +0 -79
  85. data/docs/_docs/ufo-docker-clean.md +0 -27
  86. data/docs/_docs/ufo-docker-name.md +0 -15
  87. data/docs/_docs/ufo-docker-push.md +0 -43
  88. data/docs/_docs/ufo-help.md +0 -22
  89. data/docs/_docs/ufo-init.md +0 -54
  90. data/docs/_docs/ufo-scale.md +0 -21
  91. data/docs/_docs/ufo-ship.md +0 -75
  92. data/docs/_docs/ufo-ships.md +0 -52
  93. data/docs/_docs/ufo-tasks-build.md +0 -166
  94. data/lib/ufo/completion.rb +0 -15
  95. data/lib/ufo/sub.rb +0 -12
@@ -1,10 +0,0 @@
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
-
@@ -1,30 +0,0 @@
1
- ---
2
- title: ufo deploy
3
- ---
4
-
5
- It is useful to sometimes deploy only the task definition without re-building it. Say for example, you are debugging the task definition and just want to directly edit the `.ufo/output/hi-web.json` definition. You can accomplish this with the `ufo deploy` command. The `ufo deploy` command will deploy the task definition in `.ufo/output` unmodified. Example:
6
-
7
- ```
8
- ufo deploy hi-web
9
- ```
10
-
11
- The above command does the following:
12
-
13
- 1. register the `.ufo/output/hi-web.json` task definition to ECS untouched.
14
- 2. deploys it to ECS by updating the service
15
-
16
- The `ufo deploy` command does less than the `ufo ship` command. Typically, people use [ufo ship]({% link _docs/ufo-ship.md %}) over the `ufo deploy` command do everything in one step:
17
-
18
- 1. build the Docker image
19
- 2. register the ECS task definition
20
- 3. update the ECS service
21
-
22
- The `ufo ships`, `ufo ship`, `ufo deploy` command support the same options. The options are presented here again for convenience:
23
-
24
- {% include ufo-ship-options.md %}
25
-
26
-
27
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-ships.md %}">Back</a>
28
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-scale.md %}">Next Step</a>
29
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
30
-
@@ -1,19 +0,0 @@
1
- ---
2
- title: ufo destroy
3
- ---
4
-
5
- Ufo provides a quick way to destroy an ECS service. In order to destroy an ECS service you must makes sure that the desired number of tasks is first set to 0. It is easy to forgot to do this and waste time. So as part of destroying the service ufo will scale the ECS service down to 0 automatically first and then destroy the service. Ufo also prompts you before destroying the service.
6
-
7
- ```
8
- ufo destroy hi-web
9
- ```
10
-
11
- If you would like to bypass the prompt you can use the `--sure` option.
12
-
13
- ```
14
- ufo destroy hi-web --sure
15
- ```
16
-
17
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-scale.md %}">Back</a>
18
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-build.md %}">Next Step</a>
19
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -1,79 +0,0 @@
1
- ---
2
- title: ufo docker build
3
- ---
4
-
5
- The `ufo docker build` builds a Docker image using the Dockerfile in the current project folder. This simply is a wrapper command that shells out and calls the `docker` command. We're use the [tongueroo/hi]((https://github.com/tongueroo/hi) project and it's Dockerfile for demonstration. Example:
6
-
7
- ```sh
8
- ufo docker build
9
- ```
10
-
11
- You'll see that it calls:
12
-
13
- ```
14
- docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .
15
- ```
16
-
17
- You should see similar output (some of the output has been truncated for conciseness):
18
-
19
- ```sh
20
- $ ufo docker build
21
- Building docker image with:
22
- docker build -t tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 -f Dockerfile .
23
- Sending build context to Docker daemon 734.2 kB
24
- Step 1 : FROM ruby:2.3.3
25
- ---> 0e1db669d557
26
- 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
27
- ---> Using cache
28
- ---> 931ace833716
29
- ...
30
- Step 7 : ADD . /app
31
- ---> fae2452e6c35
32
- Removing intermediate container 4c93f92a7fd8
33
- Step 8 : RUN bundle install --system
34
- ---> Running in f851b9cb7d27
35
- Using rake 12.0.0
36
- Using i18n 0.8.1
37
- ...
38
- Using web-console 2.3.0
39
- Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
40
- Bundled gems are installed into /usr/local/bundle.
41
- ---> 194830c5c1a8
42
- ...
43
- Removing intermediate container 67545cd4cd09
44
- Step 11 : CMD bin/web
45
- ---> Running in b1b26e68d957
46
- ---> 8547bb48b21f
47
- Removing intermediate container b1b26e68d957
48
- Successfully built 8547bb48b21f
49
- Docker image tongueroo/hi:ufo-2017-06-11T22-18-03-a18aa30 built. Took 33s.
50
- $
51
- ```
52
-
53
- The docker image tag that is generated contains a useful timestamp and the current HEAD git sha of the project that you are on.
54
-
55
- 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.
56
-
57
- ```sh
58
- ufo docker build --push
59
- ```
60
-
61
- You should see it being pushed at the end:
62
-
63
- ```sh
64
- Docker image tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30 built. Took 34s.
65
- The push refers to a repository [docker.io/tongueroo/hi]
66
- ef375857f165: Pushed
67
- 4d791d7cde66: Pushed
68
- 277ff31e79b4: Layer already exists
69
- a361a4de05df: Layer already exists
70
- ufo-2017-06-11T22-22-32-a18aa30: digest: sha256:c5385a5084e87643bd943eb120e110321c59e8acd30736ba7b5223eb1143baa8 size: 3464
71
- Pushed tongueroo/hi:ufo-2017-06-11T22-22-32-a18aa30 docker image. Took 9s.
72
- ```
73
-
74
- Note in order to push the image to a registry 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.
75
-
76
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-destroy.md %}">Back</a>
77
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-push.md %}">Next Step</a>
78
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
79
-
@@ -1,27 +0,0 @@
1
- ---
2
- title: ufo docker clean
3
- ---
4
-
5
- Ufo comes with a handy command to clean up old images that ufo generates. Ufo only deletes images from the docker daemon and does not remove any images from any registry. To use it you pass the base portion of the image name to the command. Example:
6
-
7
- ```sh
8
- ufo docker clean tongueroo/hi
9
- ```
10
-
11
- Here is some example output of the commmand:
12
-
13
- ```sh
14
- Cleaning up docker images...
15
- Running: docker rmi tongueroo/hi:ufo-2017-06-12T12-14-22-a18aa30 tongueroo/hi:ufo-2017-06-12T12-12-05-a18aa30
16
- ```
17
-
18
- By default the clean command keeps the most 3 recent docker images. If you would like to override this setting you can use the `--keep` option. Example:
19
-
20
- ```sh
21
- ufo docker clean tongueroo/hi --keep 5
22
- ```
23
-
24
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-name.md %}">Back</a>
25
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-tasks-build.md %}">Next Step</a>
26
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
27
-
@@ -1,15 +0,0 @@
1
- ---
2
- title: ufo docker name
3
- ---
4
-
5
- It is sometimes handy to grab the name of the Docker image that was just generated. Let's say ou needed the image name so you can feed it into another script that you have. The command `ufo docker name` returns the image of the most recently built Docker image. Example:
6
-
7
- ```sh
8
- $ ufo docker image
9
- tongueroo/hi:ufo-2017-06-12T12-34-48-a18aa30
10
- ```
11
-
12
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-base.md %}">Back</a>
13
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-clean.md %}">Next Step</a>
14
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
15
-
@@ -1,43 +0,0 @@
1
- ---
2
- title: ufo docker push
3
- ---
4
-
5
- The `ufo docker push` command pushes the most recent Docker image built by `ufo docker build` to a registry. Example:
6
-
7
- ```sh
8
- ufo docker build # to build the image
9
- ufo docker name # to see the image name
10
- ufo docker push # push up the registry
11
- ```
12
-
13
- You'll see that `ufo docker push` simply shells out and calls `docker push`:
14
-
15
- ```
16
- $ ufo docker push
17
- => docker push 123456789.dkr.ecr.us-east-1.amazonaws.com/hi:ufo-2018-02-13T10-51-44-e0cc7be
18
- The push refers to a repository [123456789.dkr.ecr.us-east-1.amazonaws.com/hi]
19
- 399c739c257d: Layer already exists
20
- ...
21
- Pushed 123456789.dkr.ecr.us-east-1.amazonaws.com/hi:ufo-2018-02-13T10-51-44-e0cc7be docker image. Took 1s.
22
- $
23
- ```
24
-
25
- You can also specify your own custom image to push as a parameter.
26
-
27
- ```
28
- ufo docker push my/image:tag
29
- ```
30
-
31
- You could also use the `--push` flag as part of the `ufo docker build` command to achieve the same thing as `ufo docker push`. Some find that `ufo docker push` is more intutitive.
32
-
33
- ```sh
34
- ufo docker build --push # same as above
35
- ```
36
-
37
- ## Docker Authorization
38
-
39
- Note in order to push the image to a registry 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, ufo will automatically try to authorize you and configure your `~/.docker/config.json`. If can also use `aws ecr get-login` command.
40
-
41
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-docker-build.md %}">Back</a>
42
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-docker-base.md %}">Next Step</a>
43
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -1,22 +0,0 @@
1
- ---
2
- title: ufo help
3
- ---
4
-
5
- You can run help for quick help information right at the cli. Example:
6
-
7
- ```sh
8
- ufo help
9
- ```
10
-
11
- You can append `help`, `-h` or `--help` to the end of any command to get more help information about that specific command. These all work.
12
-
13
- ```sh
14
- ufo docker build help
15
- ufo ship --help
16
- ufo ships -h
17
- ```
18
-
19
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-tasks-register.md %}">Back</a>
20
- <a id="next" class="btn btn-primary" href="{% link _docs/settings.md %}">Next Step</a>
21
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
22
-
@@ -1,54 +0,0 @@
1
- ---
2
- title: ufo init
3
- ---
4
-
5
- The `ufo init` command provides a way to quickly setup a project to be ufo ready. It creates a ufo folder with all the starter supporting files in order to use ufo. This page demonstrates how to use `ufo init`. The command requires these options: `--app` and `--image`.
6
-
7
- For this example we will use [tongueroo/hi](https://github.com/tongueroo/hi) which is a small test sinatra app.
8
-
9
- Let's run the command in our newly clone project.
10
-
11
- ```sh
12
- git clone https://github.com/tongueroo/hi.git
13
- cd hi
14
- ufo init --app=hi --image=tongueroo/hi
15
- ```
16
-
17
- You should see output similiar to this:
18
-
19
- ```sh
20
- $ ufo init --app=hi --image=tongueroo/hi
21
- Setting up ufo project...
22
- create .ufo/settings.yml
23
- create .ufo/task_definitions.rb
24
- create .ufo/templates/main.json.erb
25
- create .ufo/variables/base.rb
26
- create .ufo/variables/development.rb
27
- create .ufo/variables/production.rb
28
- create Dockerfile
29
- create bin/deploy
30
- append .gitignore
31
- Starter ufo files created.
32
- ```
33
-
34
- The standard directory structure of the ufo folder looks like this:
35
-
36
- ```sh
37
- ufo
38
- ├── output
39
- ├── settings.yml
40
- ├── task_definitions.rb
41
- ├── templates
42
- ├ └── main.json.erb
43
- └── variables
44
- ├── base.rb
45
- ├── production.rb
46
- └── development.rb
47
- ```
48
-
49
- The explanation of the folders and files were covered in detailed earlier at [Structure]({% link _docs/structure.md %}).
50
-
51
- <a id="prev" class="btn btn-basic" href="{% link _docs/commands.md %}">Back</a>
52
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-ship.md %}">Next Step</a>
53
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
54
-
@@ -1,21 +0,0 @@
1
- ---
2
- title: ufo scale
3
- ---
4
-
5
- Ufo provides a command to quickly scale up and down an ECS service. Here's an example of how you use it:
6
-
7
- ```sh
8
- ufo scale hi-web 3
9
- ```
10
-
11
- You should get output similiar to below:
12
-
13
- ```sh
14
- Scale hi-web service in stag cluster to 3
15
- ```
16
-
17
- 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.
18
-
19
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-deploy.md %}">Back</a>
20
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-destroy.md %}">Next Step</a>
21
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
@@ -1,75 +0,0 @@
1
- ---
2
- title: ufo ship
3
- ---
4
-
5
- The main command you use when using ufo is: `ufo ship`. This command builds the docker image, registers the generated ECS task definition and deploys the definition to AWS ECS all in one go.
6
-
7
- The command has a decent amount of options, you can see the options available with `ufo ship -h`. The table below covers some of the options in detail:
8
-
9
- {% include ufo-ship-options.md %}
10
-
11
- As you can see there are plenty of options for `ufo ship`. Let's demonstrate usage of them in a few examples:
12
-
13
- #### Load Balancer Target Group
14
-
15
- When you are deploying to a service with the word 'web' in it, ufo by convention assumes that this is a web service that uses a load balancer in front of it. This is also covered a in the [Conventions]({% link _docs/conventions.md %}) page. If you would you like to create a service with the word web without an load balancer associated with it you can use the `--no-target-group-prompt` option:
16
-
17
- ```sh
18
- ufo ship hi-web --no-target-group-prompt
19
- ```
20
-
21
- Or if you would like specify the target-group up front and not be bother with the prompted later you can use the `--target-group` option.
22
-
23
- ```sh
24
- ufo ship hi-web --target-group=arn:aws:elasticloadbalancing:us-east-1:12345689:targetgroup/hi-web/12345
25
- ```
26
-
27
- #### Deploying Existing Task Definition
28
-
29
- Let's say you already have built an registered a task definition by some other means and only want to use ufo to deploy that already registered task definition. You can do this by skipping the task build and register phase. It probably also makes sense to skip the docker phase in this case.
30
-
31
- ```sh
32
- ufo ship hi-web --no-docker --no-tasks
33
- ```
34
-
35
- #### Waiting for Deployments to Complete
36
-
37
- 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
38
-
39
- ```sh
40
- ufo ship hi-web --wait
41
- ```
42
-
43
- You should see output similar to this:
44
-
45
- ```sh
46
- Shipping hi-web...
47
- hi-web service updated on cluster with task hi-web
48
- Waiting for deployment of task definition hi-web:8 to complete
49
- ......
50
- Time waiting for ECS deployment: 31s.
51
- Software shipped!
52
- ```
53
-
54
- #### Cleaning up Docker Images Automatically
55
-
56
- 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.
57
-
58
- ```sh
59
- docker ship hi-web --ecr-keep 2
60
- ```
61
-
62
- You should see something like this:
63
-
64
- ```sh
65
- Cleaning up docker images...
66
- Running: docker rmi tongueroo/hi:ufo-2017-06-12T06-46-12-a18aa30
67
- ```
68
-
69
- If you are using DockerHub or another registry, ufo does not automatically clean up images.
70
-
71
-
72
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-init.md %}">Back</a>
73
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-ships.md %}">Next Step</a>
74
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
75
-
@@ -1,52 +0,0 @@
1
- ---
2
- title: ufo ships
3
- ---
4
-
5
- The `ufo ships` command allows you to deploy the *same* Docker image and task definition to multiple ECS services. This is a very common pattern to have the same code base running on different roles. For example, say you have an app with 3 roles:
6
-
7
- 1. web - serves web requests.
8
- 2. worker - processes background jobs.
9
- 3. clock - schedules background jobs.
10
-
11
- Instead of using the [ufo ship]({% link _docs/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:
12
-
13
- ```sh
14
- ufo ships hi-web hi-worker hi-clock
15
- ```
16
-
17
- ### Shell expansion
18
-
19
- Since the ECS service names are provided as a list you can shorten the command by using bash shell expansion 😁
20
-
21
- ```sh
22
- ufo ships hi-{web,worker,clock}
23
- ```
24
-
25
- If you're new to shell expansion, run this to understand why above works just as well:
26
-
27
- ```sh
28
- $ echo hi-{web,worker,clock}
29
- hi-web hi-worker hi-clock
30
- ```
31
-
32
- ### Overriding convention
33
-
34
- 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:
35
-
36
- ```sh
37
- ufo ships hi-web-1:hi-web hi-clock-1 hi-worker-1
38
- ufo ships hi-web-1:my-task hi-clock-1:another-task hi-worker-1:third-task
39
- ```
40
-
41
- ### ufo ships Options
42
-
43
- The `ufo ships`, `ufo ship`, `ufo deploy` command support the same options. The options are presented here again for convenience:
44
-
45
- {% include ufo-ship-options.md %}
46
-
47
- Note: The `--task` option is not used with the `ufo ships` command.
48
-
49
- <a id="prev" class="btn btn-basic" href="{% link _docs/ufo-ship.md %}">Back</a>
50
- <a id="next" class="btn btn-primary" href="{% link _docs/ufo-deploy.md %}">Next Step</a>
51
- <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
52
-