Skip to main content
Version: v4.5.0

Description

The stk-legacy create stack command creates a repository for the Template and Plugin Stack.

How does it work?

The command allows you to create an empty repository for the Stack, where you can add Templates and Plugins.

Parameters

Check the available options in the command:

ParameterDescription
NAMESets the name of the created stack. If the name is not given, the repository name from the --remote parameter is set.
--remoteThis parameter defines the Git's repository remote URL that will be used as the origin for the Stack. If you do not enter remote, you must run git add remote in order to publish the Stack to Git.

Example

Check out the example below on how to create your Stack:

  1. Run in your terminal:
stk-legacy create stack your-stack-name
  1. The return will be:
Creating stack your-stack-name
  1. Then run:
cd your-stack-name/
tree
cat stack.yaml
tree
  1. Now you can add Plugins to your Stack with the stk-legacy add plugin command.

Add a Stackfile to a Stack

Creators can define Stackfiles and include them in the Stacks. It allows you to access them in a simplified way. There are two possibilities to do this:

  1. Create a stackfiles folder in the repository created earlier by the stk-legacy create stack command and place the Stackfile yaml file inside this folder;

  2. Run the stk-legacy create stackfile <name-stackfile> command in the stackfiles folder to create a default stackfile for development.

When you publish this change to the Stack repository, the Stackfile will be available to use.

See an example of the layout of a repository with Stackfiles:

/stack-python
stack.yaml
/python-app-template/
template.yaml
/templates/
...
/flask-api-plugin/
plugin.yaml
/templates/
...
/zappa-deploy-plugin/
plugin.yaml
/templates/
...
/stackfiles/
default.yaml
flask-serverless-api.yaml

Example

Read more

Was this page helpful?