module Ufo

Code Explanation:

There are 3 types of things to auto-complete:

1. command: the command itself
2. parameters: command parameters.
3. options: command options

Here's an example:

mycli hello name --from me

* command: hello
* parameters: name
* option: --from

When command parameters are done processing, the remaining completion words will be options. We can tell that the command params are completed based on the method arity.

## Arity

For example, say you had a method for a CLI command with the following form:

ufo scale service count --cluster development

It's equivalent ruby method:

scale(service, count) = has an arity of 2

So typing:

ufo scale service count [TAB] # there are 3 parameters including the "scale" command according to Thor's CLI processing.

So the completion should only show options, something like this:

Simply aggregates a bunch of variables that is useful for the task_definition.

Normally, you must authorized to AWS ECR to push to their registry with:

eval $(aws ecr get-login --no-include-email)

If you haven't ever ran the ecr get-login command before then you'll get this error:

no basic auth credentials

If you have ran it before but the auto token has expired you'll get this message:

denied: Your Authorization Token has expired. Please run 'aws ecr get-login' to fetch a new one.

This class manipulates the ~/.docker/config.json file which is an internal docker file to automatically update the auto token for you. If that format changes, the update will need to be updated.

Can test:

ufo ship app-web --cluster prod --noop

Creating this class pass so we can have a reference to their properties in memory: cluster_name and service_name. This helps us avoid making additional API calls to describe and lookup the information.

Also this class allows us to pass one object around instead of both cluster_name and service_name.

This is really only used in the Ufo::Ship class.

Use to automatically create the CloudWatch group. For some reason creating ECS does do this by default.

CloudFormation status codes, full list:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html

CREATE_COMPLETE
ROLLBACK_COMPLETE
DELETE_COMPLETE
UPDATE_COMPLETE
UPDATE_ROLLBACK_COMPLETE

CREATE_FAILED
DELETE_FAILED
ROLLBACK_FAILED
UPDATE_ROLLBACK_FAILED

CREATE_IN_PROGRESS
DELETE_IN_PROGRESS
REVIEW_IN_PROGRESS
ROLLBACK_IN_PROGRESS
UPDATE_COMPLETE_CLEANUP_IN_PROGRESS
UPDATE_IN_PROGRESS
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS
UPDATE_ROLLBACK_IN_PROGRESS

Constants

VERSION