Commands

$ runway --help
Usage: runway [OPTIONS] COMMAND [ARGS]...

  Runway CLI.

  Full documentation available at https://docs.onica.com/projects/runway/

Options:
  --version   Show the version and exit.
  --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.
  -h, --help  Show this message and exit.
...

deploy

$ runway deploy --help
Usage: runway deploy [OPTIONS]

  Deploy infrastructure as code.

  Process
  -------
  1. Determines the deploy environment.
      - "-e, --deploy-environment" option
      - "DEPLOY_ENVIRONMENT" environment variable
      - git branch name
          - strips "ENV-" prefix, master is converted to common
          - ignored if "ignore_git_branch: true"
      - name of the current working directory
  2. Selects deployments & modules to deploy.
      - (default) prompts
      - (tags) module contains all tags
      - (non-interactive) all
  3. Deploys selected deployments/modules in the order defined.

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.
  -h, --help                      Show this message and exit.

Example

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

destroy

$ runway destroy --help
Usage: runway destroy [OPTIONS]

  Destroy infrastructure as code.

  Process
  -------
  1. Determines the deploy environment.
      - "-e, --deploy-environment" option
      - "DEPLOY_ENVIRONMENT" environment variable
      - git branch name
          - strips "ENV-" prefix, master is converted to common
          - ignored if "ignore_git_branch: true"
      - name of the current working directory
  2. Selects deployments & modules to deploy.
      - (default) prompts
      - (tags) module contains all tags
      - (non-interactive) all
  3. Destroys selected deployments/modules in reverse the order defined.

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.
  -h, --help                      Show this message and exit.

Example

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

dismantle

$ runway dismantle --help
Usage: runway dismantle [OPTIONS]

  Alias of "runway destroy".

  For more information, refer to the output of "runway destroy --help".

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.
  -h, --help                      Show this message and exit.

Example

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

docs

$ runway docs --help
Usage: runway docs [OPTIONS]

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

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.
  -h, --help  Show this message and exit.

Example

$ runway docs

envvars

$ runway envvars --help
Usage: runway envvars [OPTIONS]

  Output "env_vars" defined in the Runway config file.

  OS environment variables can be set in the Runway config file for different
  Runway 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.

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.
  -h, --help                      Show this message and exit.

Example

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

gen-sample

$ runway gen-sample --help
Usage: runway gen-sample [OPTIONS] COMMAND [ARGS]...

  Generate a sample Runway module module/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.

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.
  -h, --help  Show this message and exit.

Commands:
  cdk-csharp      cdk + c# (sampleapp.cdk)
  cdk-py          cdk + py (sampleapp.cdk)
  cdk-tsc         cdk + tsc (sampleapp.cdk)
  cfn             cfngin + cfn (sampleapp.cfn)
  cfngin          cfngin + troposphere (sampleapp.cfn)
  k8s-cfn-repo    k8s + cfn (k8s-cfn-infrastructure)
  k8s-flux-repo   k8s + flux + tf (k8s-tf-infrastructure)
  k8s-tf-repo     k8s + tf (k8s-tf-infrastructure)
  sls-py          sls + python (sampleapp.sls)
  sls-tsc         sls + tsc (sampleapp.sls)
  static-angular  angular static site (static-angular)
  static-react    react static site (static-react)
  tf              tf (sampleapp.tf)

Example

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

init

$ runway init --help
Usage: runway init [OPTIONS]

  Run initialization/bootstrap steps.

  Process
  -------
  1. Determines the deploy environment.
      - "-e, --deploy-environment" option
      - "DEPLOY_ENVIRONMENT" environment variable
      - git branch name
          - strips "ENV-" prefix, master is converted to common
          - ignored if "ignore_git_branch: true"
      - name of the current working directory
  2. Selects deployments & modules to deploy.
      - (default) prompts
      - (tags) module contains all tags
      - (non-interactive) all
  3. Initializes/bootstraps selected deployments/modules in the order defined.
     (e.g. "cdk bootstrap", "terraform init")

  Steps By Module Type
  --------------------
  - AWS CDK: Runs "cdk bootstrap".
  - CFNgin: Creates the "cfngin_bucket" if needed.
  - Terraform: Runs "terraform init", changes the workspace if needed, runs
    "terraform init" again if the workspace was changed, and finally
    downloads/updates Terraform modules.

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.
  -h, --help                      Show this message and exit.

Example

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

kbenv install

$ runway kbenv install --help
Usage: runway kbenv install [OPTIONS] [<version>]

  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. If this file doesn't
  exist, nothing will be installed.

  Compatible with https://github.com/alexppg/kbenv.

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.
  -h, --help  Show this message and exit.

Example

$ runway kbenv install
$ runway kbenv install v1.14.0

kbenv list

$ runway kbenv list --help
Usage: runway kbenv list [OPTIONS]

  List the versions of kubectl that have been installed by Runway and/or
  kbenv.

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.
  -h, --help  Show this message and exit.

Example

$ runway kbenv list

kbenv run

$ runway kbenv run --help
Usage: runway kbenv run [OPTIONS] <args>

  Run a kubectl command.

  Uses the version of kubectl specified in the ".kubectl-version" file in the
  current directory.

  IMPORTANT: When using options shared with Runway "--" must be placed before
  the kubectl command.

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.
  -h, --help  Show this message and exit.

Example

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

kbenv uninstall

$ runway kbenv uninstall --help
Usage: runway kbenv uninstall [OPTIONS] [<version>]

  Uninstall the specified <version> of kubectl (e.g. v1.14.0) or all installed
  versions.

  If no version is specified, Runway will attempt to find and read a
  ".kubectl-version" file in the current directory.

Options:
  --all       Uninstall all versions of kubectl.
  --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.
  -h, --help  Show this message and exit.

Example

$ runway kbenv uninstall v1.21.0
$ runway kbenv uninstall --all

new

$ runway new --help
Usage: runway new [OPTIONS]

  Create an example runway.yml file in the correct directory.

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.
  -h, --help  Show this message and exit.

Example

$ runway new
$ runway new --debug

plan

$ runway new --help
Usage: runway new [OPTIONS]

  Create an example runway.yml file in the correct directory.

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.
  -h, --help  Show this message and exit.

Example

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

preflight

$ runway preflight --help
Usage: runway preflight [OPTIONS]

  Alias of "runway test".

  For more information, refer to the output of "runway test --help".

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.
  -h, --help                      Show this message and exit.

Example

$ runway preflight

run-python

$ runway run-python --help
Usage: runway run-python [OPTIONS] <filename>

  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.

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.
  -h, --help  Show this message and exit.

Example

$ runway run-python my_script.py

schema cfngin

$ runway schema cfngin --help
Usage: runway schema cfngin [OPTIONS]

  Output JSON schema for CFNgin configuration files.

  The schema that is output can be used to validate configuration files. It
  can also be added to text editors to provide autocompletion, tool tips, and
  suggestions within configuration files.

Options:
  --debug                   Supply once to display Runway debug logs. Supply
                            twice to display all debug logs.
  --indent <int>            Number of spaces to use per indentation level when
                            output JSON.  [default: 4]
  --no-color                Disable color in Runway's logs.
  -o, --output <file-name>  If provided, schema will be saved to a file
                            instead of being output to stdout.
  --verbose                 Display Runway verbose logs.
  -h, --help                Show this message and exit.

Example

$ runway schema cfngin --output cfngin-schema.json

schema runway

$ runway schema runway --help
Usage: runway schema runway [OPTIONS]

  Output JSON schema Runway configuration files.

  The schema that is output can be used to validate configuration files. It
  can also be added to text editors to provide autocompletion, tool tips, and
  suggestions within configuration files.

Options:
  --debug                   Supply once to display Runway debug logs. Supply
                            twice to display all debug logs.
  --indent <int>            Number of spaces to use per indentation level when
                            output JSON.  [default: 4]
  --no-color                Disable color in Runway's logs.
  -o, --output <file-name>  If provided, schema will be saved to a file
                            instead of being output to stdout.
  --verbose                 Display Runway verbose logs.
  -h, --help                Show this message and exit.

Example

$ runway schema runway --output runway-schema.json

takeoff

$ runway takeoff --help
Usage: runway takeoff [OPTIONS]

  Alias of "runway deploy".

  For more information, refer to the output of "runway deploy --help".

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.
  -h, --help                      Show this message and exit.

Example

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

taxi

$ runway taxi --help
Usage: runway taxi [OPTIONS]

  Alias of "runway plan".

  For more information, refer to the output of "runway plan --help".

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.
  -h, --help                      Show this message and exit.

Example

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

test

$ runway test --help
Usage: runway test [OPTIONS]

  Execute tests as defined in the Runway config file.

  If one of the tests fail, the command will exit immediately unless
  "required: false" is set on the failing test.

  If the failing test is not required, the next test will be executed.

  If any of the tests fail, the command will exit with a non-zero exit code.

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.
  -h, --help                      Show this message and exit.

Example

$ runway test

tfenv install

$ runway tfenv install --help
Usage: runway tfenv install [OPTIONS] [<version>]

  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. If this file doesn't
  exist, nothing will be installed.

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.
  -h, --help  Show this message and exit.

Example

$ runway tfenv install 0.12.0

tfenv list

$ runway tfenv list --help
Usage: runway tfenv list [OPTIONS]

  List the versions of Terraform that have been installed by Runway and/or
  tfenv.

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.
  -h, --help  Show this message and exit.

Example

$ runway tfenv list

tfenv run

$ runway tfenv run --help
Usage: runway tfenv run [OPTIONS] <args>

  Run a Terraform command.

  Uses the version of Terraform specified in the ".terraform-version" file in
  the current directory.

  IMPORTANT: When using options shared with Runway "--" must be placed before
  the Terraform command.

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.
  -h, --help  Show this message and exit.

Example

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

tfenv uninstall

$ runway tfenv uninstall --help
Usage: runway tfenv uninstall [OPTIONS] [<version>]

  Uninstall the specified <version> of Terraform (e.g. 0.12.0) or all
  installed versions.

  If no version is specified, Runway will attempt to find and read a
  ".terraform-version" file in the current directory.

Options:
  --all       Uninstall all versions of Terraform.
  --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.
  -h, --help  Show this message and exit.

Example

$ runway tfenv uninstall 1.0.0
$ runway tfenv uninstall --all

whichenv

$ runway whichenv --help
Usage: runway whichenv [OPTIONS]

  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 name (strips "ENV-" prefix, master => common)
    - current working directory

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.
  -h, --help  Show this message and exit.

Example

$ runway whichenv