Skip to content

Building apps ​

This guide explains how to package apps that work on every n5i distribution. An app is a directory of YAML files that describe its containers, its metadata in the app store, and optionally files to generate at install time. n5i turns these files into Kubernetes objects, so you don't need to write Kubernetes manifests yourself.

App structure ​

An app is a directory named after the app's ID. The ID must be unique within an app store, and it is used in hostnames and Kubernetes namespaces, so keep it short, lowercase and use only letters, digits and -.

text
linkstack/
├── app.yml                 # or app.yml.jinja: containers, services, ingress, secrets
├── metadata.yml            # or metadata.yml.jinja: permissions, volumes, settings, UI entries
├── store-metadata.yml      # name, description, version and other app store information
├── custom.yml              # optional, or custom.yml.jinja: extra Kubernetes objects
├── _tera/                  # optional: JavaScript helpers for templates
│   └── helpers.js
└── data/                   # optional: files preloaded into volumes
    └── <volume-id>/
        └── config.yml.n5i_jinja
FileRequiredPurpose
app.ymlyesThe app definition: containers, services, ingress, secrets and network policies.
metadata.ymlyesDeveloper metadata: permissions, volumes, settings, dependencies, dashboard menu entries.
store-metadata.ymlwith metadata.yml version 2Store metadata: what users see in the app store.
custom.ymlnoArbitrary Kubernetes objects (requires admin permissions to install).
_tera/*.jsnoJavaScript functions for templates.
data/noFiles that are copied into the app's volumes on installation.

Any of app.yml, metadata.yml and custom.yml can be a template instead: name it app.yml.jinja (and so on), and n5i renders it with Tera before parsing it.

If a directory does not contain both app.yml and metadata.yml, n5i asks the installed runtime plugins whether they can handle it. This is how other app formats can be supported.

Example app ​

This guide uses LinkStack, a self-hosted link page, as an example. Create a directory for the app:

bash
mkdir linkstack
cd linkstack

Then continue with building a basic app.

Next steps ​

Free and open-source software under the GNU AGPL 3.0 or later.