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:
Parameter | Description |
---|---|
NAME | Sets the name of the created stack. If the name is not given, the repository name from the --remote parameter is set. |
--remote | This 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:
- Run in your terminal:
stk-legacy create stack your-stack-name
- The return will be:
Creating stack your-stack-name
- Then run:
cd your-stack-name/
tree
cat stack.yaml
tree
- 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:
Create a
stackfiles
folder in the repository created earlier by thestk-legacy create stack
command and place the Stackfileyaml
file inside this folder;Run the
stk-legacy create stackfile <name-stackfile>
command in thestackfiles
folder to create a defaultstackfile
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?