Skip to content

CLI reference

matl33t edited this page Jun 20, 2016 · 13 revisions

Full Commands Listing

deploy short

Initiates a deployment by first creating a new task definition with the provided docker tag, and injects environment variables from the specified .env file. The corresponding service is updated to deploy the new task definition, which will automatically do a blue-green deploy. On timeout or error, a rollback will ensure the most previous task definition will be deployed.

deploy full

Same as above, except specified pre-deployment commands will be run sequentially before the service is updated with the new task definition. This is where various database migrations or other setup tasks can be run.

deploy scale

Updates the service using the existing task definition with the provided scale, taking precedence over whatever has been specified in the configuration file.

deploy run

Creates a new task definition using the provided tag and environment variables. A one-off task will be launched using this task definition; after, the created task definition will be deregistered.

deploy rollback

Deregisters N task definitions and deploys the next valid one. For example, a rollback of 1 will deregister the currently deployed task definition and attempt to deploy the one immediately before.

deploy status

Prints out useful information about what is currently deployed.

deploy logtail

Tails the logs inside one of the running containers for your service.

deploy ssh

SSHs into the host EC2 instance that is running one of the containers for your service.

deploy bash

Establishes a shell inside a running container for your service.

CLI example usage

  • You can run broadside with the --help flag for any command and subcommand to get usage instructions.

  • After following through the ECS Deploy Setup instructions, you can attempt to deploy your application:

    broadside deploy short --target TARGET --tag DOCKER_TAG
    
  • A short deploy will simply launch new containers for your application if configurations have changed.

  • If you would like to run a migration or other predeploy tasks prior to your deploy, you can use the full deploy command:

    broadside deploy full --target TARGET --tag DOCKER_TAG
    
  • A deploy will fail if the application is unresponsive or if the container does not launch correctly. In this case, an automatic rollback will happen to ensure the previous (and ideally correct) configurations are deployed.

  • Following a successful deploy, you can check your service status:

    broadside deploy status --target TARGET
    
  • If you wish the rescale your service on the fly, use:

    broadside deploy scale --target TARGET --scale NUM
    
  • Note that using this command with a provided scale will override the scale setting defined in your broadside.conf.rb

Clone this wiki locally