How UFO Works

UFO first builds the Docker image. Then it builds a CloudFormation template. Lastly, it calls CloudFormation to deploy your app and create the necessary ECS resources. It does these 3 steps:

  1. Build and Push the Docker Image
  2. Build the ECS Task Definition and CloudFormation Template
  3. Deploy to ECS

In fact, you can use UFO to build the files first, and then run aws cloudformation create-stack directly. Example:

ufo build

The ufo build command builds the Docker image using your Dockerfile and builds the CloudFormation template.

$ ufo build
Building Docker Image
=> docker build -t -f Dockerfile .
=> docker push
Task Definition built: .ufo/output/task_definition.json
Parameters built:      .ufo/output/params.json
Template built:        .ufo/output/template.yml

You can even run using the built params.json and template.yml to create the stack directly.

aws cloudformation create-stack \
    --stack-name demo-web-dev \
    --template-body file://template.yml \
    --parameters file://params.json \
    --capabilities CAPABILITY_NAMED_IAM

UFO automates the process with:

ufo ship