ufo deploy


ufo deploy SERVICE


Deploy task definition to ECS service without re-building the definition.

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:

ufo deploy hi-web

The above command does the following:

  1. register the .ufo/output/hi-web.json task definition to ECS untouched.
  2. deploys it to ECS by updating the service

ufo tasks build

To regenerate a .ufo/output/hi-web.json definition:

ufo tasks build

ufo ship

The ufo deploy command does less than the ufo ship command. Normally, it is recommended to use ufo ship over the ufo deploy command to do everything in one step:

  1. build the Docker image
  2. register the ECS task definition
  3. update the ECS service

The ufo ships, ufo ship, ufo deploy command support the same options. The options are presented here again for convenience:

Option Description
--task By convention ufo uses the same name for both the ECS service and task definition. You can override this convention with this option. The conventions are covered on the Conventions page.
--target-group The ELB target group to use for the ECS service. This is respected if the ECS service is being created the first time. If the ECS service already exists, this option gets ignored.
--target-group-prompt This boolean option allows you to bypass setting the ELB target group if desired.
--wait This boolean option determines if ufo blocks and waits until the service has been deployed before continuing.
--pretty This boolean option determines ufo generates the task definitions in output in a pretty human readable format.
--stop-old-tasks This boolean option determines if ufo will call ecs stop-task on the old tasks after deployment. Sometimes old tasks hang around for a little bit with ECS this forces them along a little quicker.
--ecr-keep This integer option determines how many old docker images to keep around. Ufo will automatically delete and clean up docker images at the end of this process. The default is reasonable large at 30.
--cluster This decides what cluster to use. This can also be set in ufo/settings.yml covered in Settings. The cli option takes highest precedence.


[--task=TASK]                                        # ECS task name, to override the task name convention.
[--target-group=TARGET_GROUP]                        # ELB Target Group ARN.
[--target-group-prompt], [--no-target-group-prompt]  # Enable Target Group ARN prompt
                                                     # Default: true
[--wait], [--no-wait]                                # Wait for deployment to complete
[--pretty], [--no-pretty]                            # Pretty format the json for the task definitions
                                                     # Default: true
[--stop-old-tasks], [--no-stop-old-tasks]            # Stop old tasks after waiting for deploying to complete
[--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.
[--verbose], [--no-verbose]                          
[--mute], [--no-mute]                                
[--noop], [--no-noop]                                
[--cluster=CLUSTER]                                  # Cluster.  Overrides ufo/settings.yml.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!