Automating your workflow

Learn best practices around managing your releases in version control to enable collaboration and automation.

Now that you’ve made a release using the vendor.replicated.com UI, its time to check your yaml into source control and start collaborating with your team. We’ll use the KOTS Starter repository as a starting point for this.

Replicated Kubernetes Starter

Example project showcasing how power users can leverage the Replicated CLI Tools to manage kots YAMLs using a git repository.

Get started

This repo is a GitHub Template Repository. You can create a private copy by using the “Use this Template” link in the repo:

Template Repo

You should use the template to create a new private repo in your org, for example mycompany/kots-app or mycompany/replicated-starter-kots.

Once you’ve created a repository from the template, you’ll want to git clone your new repo and cd into it locally.

Configure environment

You’ll need to set up two environment variables to interact with vendor.replicated.com:

export REPLICATED_APP=...
export REPLICATED_API_TOKEN=...

REPLICATED_APP should be set to the app slug from the Settings page:

Replicated App

Next, create an API token from the Teams and Tokens page:

Replicated App

Ensure the token has “Write” access or you’ll be unable create new releases. Once you have the values, set them in your environment.

export REPLICATED_APP=...
export REPLICATED_API_TOKEN=...

You can ensure this is working with

make list-releases

Iterating on your release

Once you’ve made changes to replicated.yaml, you can push a new release to a channel with

make release

By default the Unstable channel will be used. You can override this with channel:

make release channel=Beta

Integrating with CI

This repo contains a GitHub Actions workflow for ci at ./.github/workflows/main.yml. You’ll need to configure secrets for REPLICATED_APP and REPLICATED_API_TOKEN.

Tools reference

License

MIT