Sha256: 6af8defd066fbae0edf0082e722660ebf4618e6baf9426b2fbc26b0447ff2ab9

Contents?: true

Size: 1.83 KB

Versions: 16

Compression:

Stored size: 1.83 KB

Contents

---
title: Deploy Multiple Apps
nav_order: 9
---

You might have noticed in the tutorial that the generated starter .ufo folder contains 3 task definitions a `web`, `worker` and `clock` role.  This is a common pattern.  The web process handles web traffic, the worker process handles background job processing that would be too slow and potentially block web requests, and a clock process is typically used to schedule recurring jobs.

These processes typically use the same codebase and same docker image, but have slightly different run time settings.  The docker run command for a web process could be [puma](http://puma.io/) and the command for a worker process could be [sidekiq](http://sidekiq.org/).  Environment variables are also sometimes different.  The important key is that the same docker image is used for all 3 services but the task definition for each service is slightly different.

While we can use the `ufo ship` command to deploy to all 3 service roles individually like so:

```sh
ufo ship demo-web
ufo ship demo-worker
ufo ship demo-clock
```

This would build a new Docker image for each process.  We actually want have the same docker image running on all of these roles.  In this case where we want to use the *same* Docker image for all 3 roles, ufo provides a `ufo ships` command.

## ufo ships

```sh
ufo ships demo-web demo-worker demo-clock
```

You can check on the ECS console and should see something similar to this:

<img src="/img/tutorials/ecs-console-ufo-ships.png" class="doc-photo" />

You can shorten the command by taking advantage of shell expansion:

```sh
ufo ships demo-{web,worker,clock}
```

In the case of the `ufo ships` command the `--wait` option defaults to false so that all the specified ECS services update in parallel.  You can check on the status of the update on the CloudFormation console.

{% include prev_next.md %}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ufo-4.5.11 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.10 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.9 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.8 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.7 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.6 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.5 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.4 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.3 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.2 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.1 docs/_docs/tutorial-ufo-ships.md
ufo-4.5.0 docs/_docs/tutorial-ufo-ships.md
ufo-4.4.3 docs/_docs/tutorial-ufo-ships.md
ufo-4.4.2 docs/_docs/tutorial-ufo-ships.md
ufo-4.4.1 docs/_docs/tutorial-ufo-ships.md
ufo-4.4.0 docs/_docs/tutorial-ufo-ships.md