After you develop, package, and test a stack, you can make it available so that other developers can use your stack's functionalities to accelerate development of their cloud native applications. You can make a stack available by contributing it to the Appsody project, or by publishing it with a web hosting service.
You can now contribute your stack by following these steps:
For more information, see the Contributing guidelines.
The easiest way to publish a stack is to use the Appsody CLI, however, you can use CI scripts if you want to publish multiple stacks.
If the stack is not already packaged, package it by running the
appsody stack package command from the root directory of your stack, specifying the namespace for creating the Docker images with. For example, the following command creates Docker images with a namespace of
appsody stack package --image-namespace myproject
This command builds the stack container image, creates archives for your source code and each template, and adds your stack to the
dev.local repository in your Appsody configuration.
If you want to publish your Docker images to a non-default image registry, such as
myregistry.io, you can specify the registry to use with the
appsody stack package --image-namespace myproject --image-registry myregistry.io
Push the stack container image to the appropriate Docker registry, such as docker.io or
Upload the source code and template archives to a suitable web hosting service, such as the Releases section of a GitHub repo.
To add your stack to a repository, run the
appsody stack add-to-repo command from the root directory of your stack, specifying the repository name and the base URL to use. For example:
appsody stack add-to-repo myrepository --release-url https://github.com/myorg/myrepository/releases/latest/download/
This command creates (or updates) a repository index file, that represents the repository, using the specified
--release-url as the base URL for referencing the source code and template archives. The repository index file name is determined from the repository name (
myrepository-index.yaml in this example), and is created in the
To generate a
.json formatted file of the created repository index (
.json generation script from the Appsody Stacks git repository
Change the script's permissions to be executable
chmod +x ./create_codewind_index.py
Run the script (
./create_codewind_index.py -h to see optional arguments). For example, to generate
.json files for every yaml file in the
./create_codewind_index.py -f /assets
Upload the generated repository index files (
json) to the web hosting service.
You can now provide the URL to the hosted repository index file to other Appsody users, who can add it to their Appsody repository list then initialise a project using your stack.
Congratulations! You have now developed, tested and published a stack for use in Appsody!
Why not learn more about stacks and familiarize yourself with the lifecycle of a stack?