Commands

deploy

Used to deploy modules with Runway.

When this command is used, the following will take place:

  1. The deploy environment will be determined from one of the following (in order of precedence):

  • -e, --deploy-environment option

  • DEPLOY_ENVIRONMENT environment variable

  • git branch (unless ignore_git_branch is enabled in the Runway Config File)

  • directory

  1. The deployment(s) and module(s) to deploy will be selected. This will occur in one of three ways:

  • (default) Runway will prompt the user to make selections manually

  • if --tag is provided, all modules containing all tags will be selected

  • if Runway is run non-interactively, all deployments and modules will be selected

  1. Runway will iterate through all of the selected deployments and modules, deploying them in the order defined.

Usage

$ runway deploy [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway deploy
$ runway deploy --ci --deploy-environment example
$ runway deploy --tag tag1 --tag tag2

destroy

Used to destroy modules with Runway.

Danger

Use extreme caution when run non-interactively or using --tag <tag>.... You will not be prompted before deletion. All modules (or those selected by tag) will be irrecoverably deleted.

When this command is used, the following will take place:

  1. The deploy environment will be determined from one of the following (in order of precedence):

  • -e, --deploy-environment option

  • DEPLOY_ENVIRONMENT environment variable

  • git branch (unless ignore_git_branch is enabled in the Runway Config File)

  • directory

  1. The deployment(s) and module(s) to deploy will be selected. This will occur in one of three ways:

  • (default) Runway will prompt the user to make selections manually

  • if --tag is provided, all modules containing all tags will be selected

  • if Runway is run non-interactively, all deployments and modules will be selected

  1. Runway will iterate through all of the selected deployments and modules, destroying them in reverse of the order defined.

Usage

$ runway destroy [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway destroy
$ runway destroy --ci --deploy-environment example
$ runway destroy --tag tag1 --tag tag2

dismantle

Alias of destroy.

Usage

$ runway dismantle [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway dismantle
$ runway dismantle --ci --deploy-environment example
$ runway dismantle --tag tag1 --tag tag2

envvars

Output env_vars defined in the Runway Config File.

OS environment variables can be set in the Runway Config File for different deploy environments (e.g. dev & prod KUBECONFIG values). This command allows access to these values for use outside of Runway.

Note

Only outputs env_vars defined in deployments, not modules.

Usage

$ runway envvars [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway envvars
$ eval "$(runway envvars)"
$ runway envvars --deploy-environment example

docs

Open the Runway documentation web site using the default web browser.

Usage

$ runway docs [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway docs

gen-sample

Generate a sample Runway module directory or project.

The sample is created in the current directory. If a directory already exists with the name Runway tries to use, the sample will not be created.

Available Samples

Name

Description

cdk-csharp

AWS Cloud Development Kit (CDK) using C#

cdk-py

AWS Cloud Development Kit (CDK) using Python

cdk-tsc

AWS Cloud Development Kit (CDK) using TypeScript

cfn

CloudFormation stack with S3 bucket & DDB table (perfect for storing Terraform backend state)

cfngin

Troposphere identical to the cfn sample but written in Python

k8s-cfn-repo

Kubernetes EKS cluster & sample app using CloudFormation

k8s-tf-repo

Kubernetes EKS cluster & sample app using Terraform

sls-py

Serverless Framework module using Python

sls-tsc

Serverless Framework using TypeScript

static-angular

Static Site using Angular

static-react

Static Site using React

tf

Terraform

Usage

$ runway gen-sample [OPTIONS] <sample>

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway gen-sample cfngin
$ runway gen-sample static-react

init

Creates a sample Runway Config File in the current directory.

Usage

$ runway init [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway init
$ runway init --debug

kbenv install

Install the specified version of kubectl (e.g. v1.14.0).

If no version is specified, Runway will attempt to find and read a .kubectl-version file in the current directory (see Version Management for more details). If this file doesn’t exist, nothing will be installed.

Compatible with alexppg/kbenv.

Usage

$ runway kbenv install [OPTIONS] [<version>]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway kbenv install
$ runway kbenv install v1.14.0

kbenv run

Run a kubectl command.

Uses the version of kubectl specified in the .kubectl-version file in the current directory (see Version Management for more details).

Important

When using options shared with Runway, -- must be placed before the kubectl command.

Usage

$ runway kbenv run [OPTIONS] [<version>]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway kbenv run version --client
$ runway kbenv run -- --help

plan

Determine what infrastructure changes will occur during the next deploy.

When this command is used, the following will take place:

  1. The deploy environment will be determined from one of the following (in order of precedence):

  • -e, --deploy-environment option

  • DEPLOY_ENVIRONMENT environment variable

  • git branch (unless ignore_git_branch is enabled in the Runway Config File)

  • directory

  1. The deployment(s) and module(s) to deploy will be selected. This will occur in one of three ways:

  • (default) Runway will prompt the user to make selections manually

  • if --tag is provided, all modules containing all tags will be selected

  • if Runway is run non-interactively, all deployments and modules will be selected

  1. Runway will iterate through all of the selected deployments and modules, attempting to determine the changes will occur during the next deploy.

Usage

$ runway plan [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway plan
$ runway plan --ci --deploy-environment example
$ runway plan --tag tag1 --tag tag2

preflight

Alias of test.

Usage

$ runway preflight [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway preflight

run-aws

Execute awscli commands using the version bundled with Runway.

This command gives access to the awscli when it might not otherwise be installed (e.g. when using a binary release of Runway).

Important

When using options shared with Runway, -- must be placed before the awscli command.

Usage

$ runway run-aws [OPTIONS] <args>

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway run-aws sts get-caller-identity
$ runway run-aws -- --version

run-python

Execute a python script using a bundled copy of python.

This command can execute actions using python without requiring python to be installed on a system. This is only applicable when installing a binary release of Runway (not installed from PyPi). When installed from PyPI, the current interpreter is used.

Usage

$ runway run-python [OPTIONS] <filename>

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway run-python my_script.py

run-stacker

Execute the “shimmed” Stacker aka Runway CFNgin.

This command allows direct access to Runway’s CloudFormation management tool.

Deprecated since version 1.5.0.

Important

When using options shared with Runway, -- must be placed before the Stacker command.

Usage

$ runway run-stacker [OPTIONS] <args>

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway run-stacker build cfngin_config.yml
$ runway run-stacker -- info --help

takeoff

Alias of deploy

Usage

$ runway takeoff [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway takeoff
$ runway takeoff --ci --deploy-environment example
$ runway takeoff --tag tag1 --tag tag2

taxi

Alias of plan.

Usage

$ runway taxi [OPTIONS]

Options

--ci                            Run in non-interactive mode.
--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--tag <tag>...                  Select modules by tag or tags.
                                This option can be specified more than once to
                                build a list of tags that are treated as "AND".
                                (e.g. "--tag <tag1> --tag <tag2>" would select
                                all modules with BOTH tags).
--verbose                       Display Runway verbose logs.

Example

$ runway taxi
$ runway taxi --ci --deploy-environment example
$ runway taxi --tag tag1 --tag tag2

test

Execute tests as defined in the Runway Config File.

If one of the tests fail, the command will exit immediately unless the required option is set to false for the failing test. If it is not required, the next test will be executed. If any tests fail, the command with exit with a non-zero exit code.

Usage

$ runway test [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
                                Manually specify the name of the deploy environment.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway test

tfenv install

Install the specified version of Terraform (e.g. 0.12.0).

If no version is specified, Runway will attempt to find and read a .terraform-version file in the current directory (see Version Management for more details). If this file doesn’t exist, nothing will be installed.

Usage

$ runway tfenv install [OPTIONS] [<version>]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway tfenv install 0.12.0

tfenv run

Run a Terraform command.

Uses the version of Terraform specified in the .terraform-version file in the current directory (see Version Management for more details).

Important

When using options shared with Runway, -- must be placed before the Terraform command.

Usage

$ runway tfenv run [OPTIONS] <args>

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway tfenv run --version
$ runway tfenv run -- --help

whichenv

Print the current deploy environment name to stdout.

When run, the deploy environment will be determined from one of the following (in order of precedence):

  • DEPLOY_ENVIRONMENT environment variable

  • git branch (unless ignore_git_branch is enabled in the Runway Config File)

  • directory

Usage

$ runway whichenv [OPTIONS]

Options

--debug                         Supply once to display Runway debug logs.
                                Supply twice to display all debug logs.
--no-color                      Disable color in Runway's logs.
--verbose                       Display Runway verbose logs.

Example

$ runway whichenv