The easiest way to package a single stack is to use the Appsody CLI, however, you can use CI scripts if you want to package multiple stacks.
To package a stack using CI scripts, clone or copy the appsody/stacks
Git repository. Then, from the base directory, run the build script and specify the desired stack as a parameter, for example:
./ci/build.sh incubator/<stack-id>
If a stack is not specified, all stacks in all repositories are built.
A local repository based on the stack, or stacks, built is added to the repository list. To see this repository, which is named <repo>-index-local
, run:
appsody repo list
Check the built stack has been added in that repository by running:
appsody list <repo>-index-local
Here is an example of the output you should get:
REPO ID VERSION TEMPLATES DESCRIPTION
incubator-index-local <stack-id> <version> *<template> <stack-description>
Set an environment variable to configure Appsody to use locally created images:
export APPSODY_PULL_POLICY=IFNOTPRESENT
Create a directory to initialize your project in, for example:
mkdir my-project
Navigate to the directory of your new project, for example:
cd my-project
Use the Appsody CLI to create new projects using the packaged stack:
appsody init <repo>-index-local/<stack-id>
After you create, or update a stack, the next consideration is to test the stack to check that it meets your needs. For more information, see Testing Stacks.