StarlingX Application Generator Tool
Go to file
Mingyuan Qi ad4c2b5d13 Add user application generation tool
This commit adds the user app gen tool for customer application
development. This tool completely decouples app development
from stx build, which means the app developers no longer need
to fetch stx code/build tool nor to build app by stx build system.

Features:

1. One command to package chart, generate manifest, checksum and
   package app.
2. Supports local dir, git repo and tarball as chart source.
3. The app manifest abstracts a few important fields from armada
   schema for user to lower the learning curve of armada.
4. Static value overrides allowed in app manifest

Story: 2006974
Task: 37704

Change-Id: I25a85e9fd7bdd0130041499eb9b1fc1350a63756
Signed-off-by: Mingyuan Qi <mingyuan.qi@intel.com>
2019-12-09 02:53:49 +00:00
bin Add user application generation tool 2019-12-09 02:53:49 +00:00
template Add user application generation tool 2019-12-09 02:53:49 +00:00
app-gen.py Add user application generation tool 2019-12-09 02:53:49 +00:00
example.yaml Add user application generation tool 2019-12-09 02:53:49 +00:00
README.md Add user application generation tool 2019-12-09 02:53:49 +00:00

StarlingX Application Generation Tool

The purpose of this tool is to generate StarlingX user applications in an easy way without stx build environment and armada manifest schema knowledge.

Pre-requisite

  1. Helm2 installed
  2. python3.5+
  3. pyyaml>=5.0.0 package

$ pip3 install pyyaml==5.1.2

3 Steps to create a starlingx user app

1. Prepare a helm chart(s)

What is helm and helm chart?

Helm is a Kubernetes package and operations manager. A Helm chart can contain any number of Kubernetes objects, all of which are deployed as part of the chart.

A list of official Helm Charts locates here

How to develop a helm chart?

Refer to official helm doc

2. Create an app manifest

A few essential fields needed to create the app, simplest one could be:

appName: stx-app
namespace: stx-app
version: 1.0-1
chart:
- name: chart1
  path: /path/to/chart1
chartGroup:
- name: chartgroup1
  description: "This is the first chartgroup"
  sequenced: true
  chart_group:
  - chart1
manifest:
  name: stx-app-manifest
  releasePrefix: myprefix
  chart_groups:
  - chartgroup1

For more details, please refer to example.yaml

3. Run app-gen.py

$ python3 app-gen.py -i app_manifest.yaml [-o ./output] [--overwrite]

The application will be generated automatically along with the tarball located in the folder of your application name.