Skip to main content
Version: v4.5.0

stk create env

caution

This command is deprecated and is no longer available to use.

The stk create env command allows you to create an environment to deploy an application. This environment can have functionality extended through plugins.

The command is also used to set stages of the created environment configuration and to assign a remote repository to the project.

How does it work?

It works when using several parameters. To access it use the command: stk create env --help.

How to create an environment?

To create an environment, you must enter the following parameters:

--stage <[name:accountNumber:region]>
--template
--remote <git-url>

Parameters

Check the available options in the command:

ParameterDescription
NAMEDefines the name of the application. If you don't name it, the repository name from the --remote parameter is set.
--templateDefines which Template will be applied to create the application. The format is <stack>/<template> and the Template must contain the app-template type.
--env-urlDefines the shared environment with resources used by the application. You need to add the project's Git URL.
--stagesDefines the configuration files of the application stages. The format of a stage is <name>:<account-aws>:<regiao>. You can define multiple stages separated by a comma.
--remote <git-url>Defines the URL of the remote Git repository that is used as the project's source. If not entered, the remote repository will not be configured and you must do the process manually.
--template-pathApplies a Template that has not yet been published to a catalog. This parameter cannot be used in conjunction with --template.
--stackfileDefines a Stackfile to be used when creating the app. The expected format is: <name-stack>/<name-stackfile>. If <name-stack> is the only one to be entered, the default Stackfile (default.yaml) of the Stack is the one to be used. You can also enter the absolute path to the <name-stackfile>.yaml file.

Examples

  1. The example shows the creation of:
  • An Application Stack with the name my-ecs-cluster.
  • The initial Template is ecs-cluster-template from the ecs-stack catalog.
  • And the repository is associated with the project source:
stk create env --template ecs-stack/ecs-cluster-template --remote git@github.com:my-org/my-ecs-cluster.git my-ecs-cluster

  1. Creating an Application Stack based on the Template stored in ~/projects/my-template with the name test-my-template:
stk create env --template-path ~/projects/my-template

See below:

Read more

Was this page helpful?