deploy
Deploy an Altostra project.
Deploy an existing image of the project
This command will deploy using the given image name. The image must already exist.
$ alto deploy <instance-name>:<image-name> \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]
Deploy a new image of the project
This command will first create and push a new image by the given name and then it will deploy that image. An image by that name must not exist.
$ alto deploy <instance-name>:<image-name> --push \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]
Deploy a new image of the project without specifying the image name
This command will first create and push a new image with an auto-generated image name and then it will deploy that image.
Use this command to quickly deploy project when image names are not important, such as during testing or in scripts.
$ alto deploy <instance-name> \
[--env [<environment-name>]] \
[--config-set <config-file>] \
[--parameter-map <map-file>]
Arguments
instance-name
The instance name.
Required: yes
image-name
The image name.
When the --push
option is used, the :<image>
part can be omitted.
In this case - an image name is auto-generated based on the current date and time.
When an image name :<image>
is not provided, --push
is assumed.
Required: no
Options
--env <environment-name>
Specify the environment for new instances.
-e
Aliases: Required:
Only when creating a new instance.
--config-set <config-file>
Specify a configuration file for the instance.
If specified and the instance is being updated, it will override the existing instance configuration.
--cs
Aliases: Required: no
--parameter-map <map-file>
Specify a parameter name mapping file for the instance.
If specified and the instance is being updated, it will override the existing instance parameter mapping.
--pm
Aliases: Required: no
--push
Push and deploy an image using only the deploy
command.
This is equivalent to running the push
command and then the deploy
command with the same image name.
--new-image
Aliases: Required: no
--project-path
Specify the project working directory.
If not specified, the project directory is assumed to be the current directory.
--pp
Aliases: 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.
-p
Aliases: Required: no
--new <environment-name>
Deprecated: Use '--env' instead.
Create a new instance 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 instance. If an instance with the given
name doesn't exist, the operation will fail.
-n
Aliases: Required:
- Yes, when creating a new instance and not specifying
--env
. - No, when updating an existing instance.
Providing configuration
If a project has parameters - they all must be satisfied with configuration values from
configuration-sets attached to the environment or provided by the --config-set
option.
You can provide configuration values in two ways, which are not mutually exclusive:
- Specify a configuration-set file using the
--config-set
option - Specify an environment using the
--new
option, when creating new instance
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 instance-name:image-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.