Skip to main content

deploy

Deploy an Altostra project.

Deploy an existing version of the project

This command will deploy using the given version name. The version must already exist.

alto deploy <stack-name>:<version-name> \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]

Deploy a new version of the project

This command will first create and push a new version by the given name and then it will deploy that version. A version by that name must not exist.

alto deploy <stack-name>:<version-name> --push \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]

Deploy a new version of the project without specifying the version name

This command will first create and push a new version with an auto-generated version name and then it will deploy that version.

Use this command to quickly deploy project when version names are not important, such as during testing or in scripts.

alto deploy <stack-name> \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]

Arguments

stack-name

The stack name.

Required: yes

version-name

The version name.

When the --push option is used, the :<version> part can be omitted. In this case - a version name is auto-generated based on the current date and time.

When a version name :<version> is not provided, --push is assumed.

Required: no

Options

--env <environment-name>

Specify the environment for new stacks.

Aliases: -e

Required:

Only when creating a new stack.

--config-set <config-file>

Specify a configuration file for the stack.

If specified and the stack is being updated, it will override the existing stack configuration.

Aliases: --cs

Required: no

--parameter-map <map-file>

Specify a parameter name mapping file for the stack.

If specified and the stack is being updated, it will override the existing stack parameter mapping.

Aliases: --pm

Required: no

--push

Push and deploy a version using only the deploy command. This is equivalent to running the push command and then the deploy command with the same version name.

Aliases: --new-version

Required: no

--project-path

Specify the project working directory.

If not specified, the project directory is assumed to be the current directory.

Aliases: --pp

Required: no

--project

Specify the project ID to deploy if it differs from the one stored in .altostra/project.json.

This option is useful if you want to perform operations on a specific project in a script when there isn't a working project directory.

Aliases: -p

Required: no

--new <environment-name>

Deprecated: Use '--env' instead.

Create a new stack in the specified environment instead of updating an existing one.

When --env is not specified and --new is not set, the default action is to update an existing stack. If a stack with the given name doesn't exist, the operation will fail.

Aliases: -n

Required:

  • Yes, when creating a new stack and not specifying --env.
  • No, when updating an existing stack.

--force-import

Import the project to the working Altostra account if it does not already exist.

Required: no

Providing configuration

If a project has parameters - they all must be satisfied with configuration values from the environment or provided by the --config-set option.

You can provide configuration values in two ways, which are not mutually exclusive:

  1. Specify a configuration-set file using the --config-set option
  2. Specify an environment using the --new option, when creating a new stack

If you use both these options together, the values from the configuration file will take precedence over the values in any of the configuration sets in the given environment.

alto deploy stack-name:version-name \
--config-set config.json \
--environment my-env

Parameters mapping

A parameters-map file may be used to map between parameter-names expected by the project, and the provided configuration values in the configuration-set.

Ready to Get Started?

Get Started for Free
© 2022 Altostra, Inc.