Update README
Update README so it reflects recent changes to the app generator. Story: 2010937 Task: 49326 Change-Id: I20c7bfa743693d3267c10e0b50952dcdcefa4119 Signed-off-by: Daniel Caires <daniel.caires@encora.com>
This commit is contained in:
parent
b57e56f487
commit
0793f0bfee
102
README.md
102
README.md
@ -9,20 +9,22 @@ Below you will find the steps to deploy an application as a **StarlingX App**.
|
|||||||
|
|
||||||
- [StarlingX Application Generation Tool](#starlingx-application-generation-tool)
|
- [StarlingX Application Generation Tool](#starlingx-application-generation-tool)
|
||||||
- [Why deploy an application as a StarlingX application?](#why-deploy-an-application-as-a-starlingx-application)
|
- [Why deploy an application as a StarlingX application?](#why-deploy-an-application-as-a-starlingx-application)
|
||||||
- [Tools requirements](#tools-requirements)
|
- [Software Requirements](#software-requirements)
|
||||||
- [Prerequisites](#prerequisites)
|
- [Prerequisites](#prerequisites)
|
||||||
|
- [Standalone Installation](#standalone-installation)
|
||||||
|
- [Option 1 - Install in same folder](#option-1---install-in-same-folder)
|
||||||
|
- [Option 2 - Install From Url](#option-2---install-from-url)
|
||||||
- [Generate the StarlingX Application package](#generate-the-starlingx-application-package)
|
- [Generate the StarlingX Application package](#generate-the-starlingx-application-package)
|
||||||
- [App manifest configuration](#app-manifest-configuration)
|
- [App manifest configuration](#app-manifest-configuration)
|
||||||
- [Metadata File Configuration](#metadata-file-configuration)
|
- [Metadata File Configuration](#metadata-file-configuration)
|
||||||
- [App Setup configuration](#app-setup-configuration)
|
- [App Setup configuration](#app-setup-configuration)
|
||||||
- [Run the StarlingX App Generator](#run-the-stx-app-generator)
|
- [Run the StarlingX App Generator](#run-the-starlingx-app-generator)
|
||||||
- [FluxCD Packaging](#fluxcd-packaging)
|
- [Flux Packaging](#flux-packaging)
|
||||||
- [FluxCD Manifest](#fluxcd-manifest)
|
- [FluxCD Manifest](#fluxcd-manifest)
|
||||||
- [Plugins](#plugins)
|
- [Plugins](#plugins)
|
||||||
- [Metadata](#metadata)
|
- [Metadata](#metadata)
|
||||||
- [Tarballs](#tarballs)
|
- [Tarballs](#tarballs)
|
||||||
- [Customizing the application](#customizing-the-application)
|
- [Customizing the application](#customizing-the-application)
|
||||||
- [FluxCD Manifest](#fluxcd-manifest)
|
|
||||||
- [FluxCD](#fluxcd)
|
- [FluxCD](#fluxcd)
|
||||||
- [Plugins](#plugins-1)
|
- [Plugins](#plugins-1)
|
||||||
- [Other files](#other-files)
|
- [Other files](#other-files)
|
||||||
@ -91,9 +93,9 @@ This is what you'll find in the `app-gen-tool` repository:
|
|||||||
|
|
||||||
```shell.
|
```shell.
|
||||||
.
|
.
|
||||||
|
├── app_manifest.yaml
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
├── README.md
|
├── README.md
|
||||||
├── app_manifest.yaml
|
|
||||||
├── bandit.yaml
|
├── bandit.yaml
|
||||||
├── debian_build_layer.cfg
|
├── debian_build_layer.cfg
|
||||||
├── debian_iso_image.inc
|
├── debian_iso_image.inc
|
||||||
@ -109,39 +111,6 @@ This is what you'll find in the `app-gen-tool` repository:
|
|||||||
│ │ ├── deployment.yaml
|
│ │ ├── deployment.yaml
|
||||||
│ │ └── service.yaml
|
│ │ └── service.yaml
|
||||||
│ └── values.yaml
|
│ └── values.yaml
|
||||||
├── output
|
|
||||||
│ └── app-test
|
|
||||||
│ ├── charts
|
|
||||||
│ ├── fluxcd-manifests
|
|
||||||
│ │ ├── adminer
|
|
||||||
│ │ │ ├── adminer-static-overrides.yaml
|
|
||||||
│ │ │ ├── adminer-system-overrides.yaml
|
|
||||||
│ │ │ ├── helmrelease.yaml
|
|
||||||
│ │ │ └── kustomization.yaml
|
|
||||||
│ │ ├── base
|
|
||||||
│ │ │ ├── helmrepository.yaml
|
|
||||||
│ │ │ ├── kustomization.yaml
|
|
||||||
│ │ │ └── namespace.yaml
|
|
||||||
│ │ └── kustomization.yaml
|
|
||||||
│ ├── metadata.yaml
|
|
||||||
│ └── plugins
|
|
||||||
│ ├── __init__.py
|
|
||||||
│ ├── k8sapp_app_test
|
|
||||||
│ │ ├── __init__.py
|
|
||||||
│ │ ├── common
|
|
||||||
│ │ │ ├── __init__.py
|
|
||||||
│ │ │ └── constants.py
|
|
||||||
│ │ ├── helm
|
|
||||||
│ │ │ ├── __init__.py
|
|
||||||
│ │ │ └── adminer.py
|
|
||||||
│ │ ├── kustomize
|
|
||||||
│ │ │ ├── __init__.py
|
|
||||||
│ │ │ └── kustomize_app_test.py
|
|
||||||
│ │ └── lifecycle
|
|
||||||
│ │ ├── __init__.py
|
|
||||||
│ │ └── lifecycle_app_test.py
|
|
||||||
│ ├── setup.cfg
|
|
||||||
│ └── setup.py
|
|
||||||
├── playbooks
|
├── playbooks
|
||||||
│ └── app-gen-tool-tox-coverage
|
│ └── app-gen-tool-tox-coverage
|
||||||
│ └── pre.yaml
|
│ └── pre.yaml
|
||||||
@ -162,10 +131,10 @@ This is what you'll find in the `app-gen-tool` repository:
|
|||||||
│ └── stx-app-generator
|
│ └── stx-app-generator
|
||||||
│ ├── app_gen_tool
|
│ ├── app_gen_tool
|
||||||
│ │ ├── __init__.py
|
│ │ ├── __init__.py
|
||||||
│ │ ├── application.py
|
|
||||||
│ │ ├── cmd
|
│ │ ├── cmd
|
||||||
│ │ │ ├── __init__.py
|
│ │ │ ├── __init__.py
|
||||||
│ │ │ └── generator.py
|
│ │ │ └── generator.py
|
||||||
|
│ │ ├── application.py
|
||||||
│ │ ├── common.py
|
│ │ ├── common.py
|
||||||
│ │ ├── constants.py
|
│ │ ├── constants.py
|
||||||
│ │ ├── fluxcd.py
|
│ │ ├── fluxcd.py
|
||||||
@ -230,20 +199,8 @@ which will help you fill them out for you application:
|
|||||||
- **version** field: your chart version as it is in the chart metadata.
|
- **version** field: your chart version as it is in the chart metadata.
|
||||||
- **path** field: relative path to the Helm chart directory, Helm repo or
|
- **path** field: relative path to the Helm chart directory, Helm repo or
|
||||||
Helm package file.
|
Helm package file.
|
||||||
> _NOTE_: Currently only Helm charts in directories have been tested.
|
|
||||||
- **chartGroup** field: chartgroup in which the helm-chart belong
|
- **chartGroup** field: chartgroup in which the helm-chart belong
|
||||||
- **chartGroup**
|
|
||||||
- **name**: Name of the chartgroup
|
|
||||||
- **description**: description of chart set
|
|
||||||
- **sequenced**: enables sequenced chart deployment in a group
|
|
||||||
- **chart_names**: a list of the names of the charts from your application.
|
|
||||||
- **manifest**:
|
|
||||||
- **name**: manifest name
|
|
||||||
- **releasePrefix**: appends to the front of all charts released by the manifest in order to manage releases throughout their lifecycle
|
|
||||||
|
|
||||||
Note that the minimum required fields that will need to be filled in order
|
|
||||||
for the StarlingX App Generator to work properly will depend on the intended
|
|
||||||
type of packaging.
|
|
||||||
|
|
||||||
### Metadata File Configuration
|
### Metadata File Configuration
|
||||||
|
|
||||||
@ -294,16 +251,22 @@ stx-app-generator -i app_manifest.yaml -o ./output
|
|||||||
```
|
```
|
||||||
|
|
||||||
With the command above, the StarlingX App Generator will create a set of files
|
With the command above, the StarlingX App Generator will create a set of files
|
||||||
and package everything in the chosen StarlingX format, and then finally place
|
necessary for integration with the StarlingX platform.
|
||||||
the file in an output folder.
|
|
||||||
|
|
||||||
## Supported Packaging Methods
|
Then, by running:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
stx-app-generator -i app_manifest.yaml -o ./output --package-only
|
||||||
|
```
|
||||||
|
|
||||||
|
The generator will package everything in the chosen StarlingX format, and then
|
||||||
|
place the file in the output folder.
|
||||||
|
|
||||||
|
### Flux Packaging
|
||||||
|
|
||||||
The following sections explain in high-level the most important parts of the
|
The following sections explain in high-level the most important parts of the
|
||||||
package.
|
package.
|
||||||
|
|
||||||
### Flux Packaging
|
|
||||||
|
|
||||||
#### FluxCD Manifest
|
#### FluxCD Manifest
|
||||||
|
|
||||||
The generator will first create the FluxCD Manifest following the structure below:
|
The generator will first create the FluxCD Manifest following the structure below:
|
||||||
@ -325,7 +288,11 @@ fluxcd-manifests/
|
|||||||
For every Helm chart configured in the `app_manifest.yaml` file, a folder with
|
For every Helm chart configured in the `app_manifest.yaml` file, a folder with
|
||||||
the name of the chart will be created.
|
the name of the chart will be created.
|
||||||
|
|
||||||
> **_NOTE_**: The `CHART-NAME-static-overrides.yaml` file will be empty.
|
> **_NOTE_**: The `CHART-NAME-static-overrides.yaml` file will be created with
|
||||||
|
> the same contents as the values file from the Helm chart.
|
||||||
|
|
||||||
|
> **_NOTE_**: The `CHART-NAME-system-overrides.yaml` file will be empty, this is by
|
||||||
|
> design.
|
||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
@ -365,8 +332,8 @@ section in the `app_manifest.yaml`.
|
|||||||
|
|
||||||
#### Tarballs
|
#### Tarballs
|
||||||
|
|
||||||
After the main files have been created, the generator will start packaging
|
After the main files have been created, by using the `--package-only` flag, the
|
||||||
everything.
|
generator will start packaging everything.
|
||||||
|
|
||||||
Firstly it will package every helm-chart, that was given in the
|
Firstly it will package every helm-chart, that was given in the
|
||||||
`app_manifest.yaml` file, into a `.tgz` file, saving these files into a folder
|
`app_manifest.yaml` file, into a `.tgz` file, saving these files into a folder
|
||||||
@ -402,11 +369,10 @@ The structure of the app inside the tarball will be the following:
|
|||||||
If you wish to add customization for the particularities of your application,
|
If you wish to add customization for the particularities of your application,
|
||||||
it is important to modify some of the generated files.
|
it is important to modify some of the generated files.
|
||||||
|
|
||||||
In order to allow such customization, the generator provides additional
|
The execution of the generator is made to allow such customization.
|
||||||
functions to modify specific files in the package.
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
stx-app-generator -i app_manifest.yaml [-o ./output] [--overwrite] [--no-package]|[--package-only]
|
stx-app-generator -i app_manifest.yaml [-o ./output] [--overwrite] [--package-only]
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
@ -415,27 +381,27 @@ Where:
|
|||||||
- `-o/--output`: output folder. Defaults to a new folder with the app name in
|
- `-o/--output`: output folder. Defaults to a new folder with the app name in
|
||||||
the current directory.
|
the current directory.
|
||||||
- `--overwrite`: deletes existing output folder before starting.
|
- `--overwrite`: deletes existing output folder before starting.
|
||||||
- `--no-package`: only creates the FluxCD manifest, plugins and the
|
|
||||||
metadata file, without compressing them in a tarball.
|
|
||||||
- `--package-only`: create the plugins wheels, sha256 file, helm-chart tarball
|
- `--package-only`: create the plugins wheels, sha256 file, helm-chart tarball
|
||||||
and package the entire application into a tarball.
|
and package the entire application into a tarball.
|
||||||
|
|
||||||
This means that, in order to be able to make additional configuration, one must:
|
This means that, in order to be able to make additional configuration, one must:
|
||||||
|
|
||||||
- first run the App Generator with `--no-package`;
|
- Simply run the App Generator;
|
||||||
- then do the changes (described in the following sections);
|
- then do the changes (described in the following sections);
|
||||||
- finally, run the App Generator again with `--package-only`.
|
- finally, run the App Generator again with `--package-only`.
|
||||||
|
|
||||||
### Flux Manifest
|
### Customizing the application
|
||||||
|
|
||||||
#### FluxCD
|
#### FluxCD
|
||||||
> _NOTE_: this section needs improvement.
|
|
||||||
|
|
||||||
Most of the generated manifest won't need any modification, but for every
|
Most of the generated manifest won't need any modification, but for every
|
||||||
Helm chart in the `app_manifest.yaml`, a static-overrides file will be created.
|
Helm chart in the `app_manifest.yaml`, a static-overrides file will be created.
|
||||||
The static-overrides file contains all information that is not to be
|
The static-overrides file contains all information that is not to be
|
||||||
overwritten inside the values.yaml of the Helm chart.
|
overwritten inside the values.yaml of the Helm chart.
|
||||||
|
|
||||||
|
> _NOTE_: By default, the static-overrides will be created with all the
|
||||||
|
> contents of the values.yaml file.
|
||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
The StarlingX App Generator will create 3 main plugins: the Helm,
|
The StarlingX App Generator will create 3 main plugins: the Helm,
|
||||||
|
Loading…
Reference in New Issue
Block a user