Jump to: navigation, search

Difference between revisions of "StarlingX/Containers/Applications/HowToAddNewFluxCDAppInSTX"

m (Added links to guides on Debian Structure and Debian Build Env)
Line 2: Line 2:
  
 
Most of the information for creating a new repo from [[StarlingX/Containers/HowToAddNewArmadaAppInSTX#Add_armada_app_configuration_in_containers.xml|How to Add New Armada App in STX]] are still applicable except for the FluxCD directory structure. Start with these steps to create the new repo. The recommended repo naming convention is now: '''app-'''<your-app-name>
 
Most of the information for creating a new repo from [[StarlingX/Containers/HowToAddNewArmadaAppInSTX#Add_armada_app_configuration_in_containers.xml|How to Add New Armada App in STX]] are still applicable except for the FluxCD directory structure. Start with these steps to create the new repo. The recommended repo naming convention is now: '''app-'''<your-app-name>
 +
 +
Please note that Starlingx is in the process of transitioning from Centos to Debian, with Centos becoming deprecated by the end of 2022.
 +
 +
In order to a build STX packages and applications, the developer will need to set up the [[StarlingX/DebianBuildEnvironment|StarlingX Debian Build Environment]].
  
 
Example review for creating a new app repo:
 
Example review for creating a new app repo:
Line 23: Line 27:
 
* https://review.opendev.org/c/starlingx/app-istio/+/836360
 
* https://review.opendev.org/c/starlingx/app-istio/+/836360
  
 
+
As an overview, this is the directory structure for app-istio:
This is the directory structure for app-istio:
 
  
 
  ├── centos_build_layer.cfg
 
  ├── centos_build_layer.cfg
Line 160: Line 163:
 
  ├── test-requirements.txt
 
  ├── test-requirements.txt
 
  └── tox.ini
 
  └── tox.ini
 +
 +
The file structure does receive minor updates over time, so for the current version as well as the contents of each file in this application example, please check the following [https://opendev.org/starlingx/app-istio link]
 +
 +
The debian folder contents are set up according to the following guide [[StarlingX/DebianBuildStructure]].
 +
For more in-depth information on the configuration options available for each file, the developer may wish to consult the [https://www.debian.org/doc/debian-policy/ch-source.html Debian source package documentation]. In general, it is recommended to use an already available app as a template since most of the configuration options available aren't required.

Revision as of 15:01, 7 November 2022

This page details steps required to add a new system-managed application's FluxCD Helm charts in StarlingX.

Most of the information for creating a new repo from How to Add New Armada App in STX are still applicable except for the FluxCD directory structure. Start with these steps to create the new repo. The recommended repo naming convention is now: app-<your-app-name>

Please note that Starlingx is in the process of transitioning from Centos to Debian, with Centos becoming deprecated by the end of 2022.

In order to a build STX packages and applications, the developer will need to set up the StarlingX Debian Build Environment.

Example review for creating a new app repo:


Create FluxCD app

Create a top-level folder for the new app under cgcs-root/stx folder.

In the main app folder, create a centos_tarball-dl.lst file with same content as the one from Step 1 above. Note that the filename is important for this step to work.

$ pwd
/localdisk/designer/<user>/starlingx_master/cgcs-root/stx/app-istio
$ cat centos_tarball-dl.lst
helm-charts-istio-1.13.2.tar.gz#helm-charts-istio#https://github.com/istio/istio/archive/refs/tags/1.13.2.tar.gz#http##
helm-charts-kiali-1.45.0.tar.gz#helm-charts-kiali#https://github.com/kiali/helm-charts/archive/refs/tags/v1.45.0.tar.gz#http##

It is recommended to start off copying another app code structure as starting point and then make necessary changes to various configuration build & configuration files.

Example review for adding a new FluxCD app:

As an overview, this is the directory structure for app-istio:

├── centos_build_layer.cfg
├── centos_iso_image.inc
├── centos_pkg_dirs
├── centos_pkg_dirs_containers
├── centos_stable_docker_images.inc
├── centos_tarball-dl.lst
├── CONTRIBUTING.rst
├── debian_build_layer.cfg
├── debian_pkg_dirs
├── HACKING.rst
├── istio-helm
│   ├── centos
│   │   ├── build_srpm.data
│   │   ├── istio-helm.spec
│   │   └── istio_proxy.stable_docker_image
│   ├── debian
│   │   ├── deb_folder
│   │   │   ├── changelog
│   │   │   ├── control
│   │   │   ├── copyright
│   │   │   ├── istio-helm.install
│   │   │   ├── rules
│   │   │   └── source
│   │   │       └── format
│   │   └── meta_data.yaml
│   └── files
│       ├── index.yaml
│       ├── Makefile
│       ├── metadata.yaml
│       └── repositories.yaml
├── kiali-helm
│   ├── centos
│   │   ├── build_srpm.data
│   │   ├── kiali-helm.spec
│   │   └── kiali.stable_docker_image
│   ├── debian
│   │   ├── deb_folder
│   │   │   ├── changelog
│   │   │   ├── control
│   │   │   ├── copyright
│   │   │   ├── kiali-helm.install
│   │   │   ├── rules
│   │   │   └── source
│   │   │       └── format
│   │   └── meta_data.yaml
│   └── files
│       ├── index.yaml
│       ├── Makefile
│       ├── metadata.yaml
│       └── repositories.yaml
├── python-k8sapp-istio
│   ├── centos
│   │   ├── build_srpm.data
│   │   └── python-k8sapp-istio.spec
│   ├── debian
│   │   ├── deb_folder
│   │   │   ├── changelog
│   │   │   ├── control
│   │   │   ├── copyright
│   │   │   ├── python3-k8sapp-istio.install
│   │   │   ├── python3-k8sapp-istio-wheels.install
│   │   │   ├── rules
│   │   │   └── source
│   │   │       └── format
│   │   └── meta_data.yaml
│   └── k8sapp_istio
│       ├── AUTHORS
│       ├── ChangeLog
│       ├── k8sapp_istio
│       │   ├── common
│       │   │   ├── constants.py
│       │   │   └── __init__.py
│       │   ├── helm
│       │   │   ├── __init__.py
│       │   │   ├── istio_operator.py
│       │   │   └── kiali_server.py
│       │   ├── __init__.py
│       │   └── tests
│       │       ├── __init__.py
│       │       ├── test_istio.py
│       │       └── test_plugins.py
│       ├── LICENSE
│       ├── pylint.rc
│       ├── README.rst
│       ├── requirements.txt
│       ├── setup.cfg
│       ├── setup.py
│       ├── test-requirements.txt
│       ├── tox.ini
│       └── upper-constraints.txt
├── requirements.txt
├── stx-istio-helm
│   ├── centos
│   │   ├── build_srpm.data
│   │   └── stx-istio-helm.spec
│   ├── debian
│   │   ├── deb_folder
│   │   │   ├── changelog
│   │   │   ├── control
│   │   │   ├── copyright
│   │   │   ├── rules
│   │   │   ├── source
│   │   │   │   └── format
│   │   │   └── stx-istio-helm.install
│   │   └── meta_data.yaml
│   └── stx-istio-helm
│       ├── files
│       │   ├── index.yaml
│       │   ├── Makefile
│       │   ├── metadata.yaml
│       │   └── repositories.yaml
│       ├── fluxcd-manifests
│       │   ├── base
│       │   │   ├── helmrepository.yaml
│       │   │   ├── kustomization.yaml
│       │   │   └── namespace.yaml
│       │   ├── istio-operator
│       │   │   ├── helmrelease.yaml
│       │   │   ├── istio-operator-static-overrides.yaml
│       │   │   ├── istio-operator-system-overrides.yaml
│        │   │   ├── istio-operator.yaml
│       │   │   └── kustomization.yaml
│       │   ├── kiali-server
│       │   │   ├── helmrelease.yaml
│       │   │   ├── kiali-server-static-overrides.yaml
│       │   │   ├── kiali-server-system-overrides.yaml
│       │   │   ├── kustomization.yaml
│       │   │   └── namespace.yaml
│       │   └── kustomization.yaml
│       └── helm-charts
│           └── Makefile
├── stx-kiali-helm
├── test-requirements.txt
└── tox.ini

The file structure does receive minor updates over time, so for the current version as well as the contents of each file in this application example, please check the following link

The debian folder contents are set up according to the following guide StarlingX/DebianBuildStructure. For more in-depth information on the configuration options available for each file, the developer may wish to consult the Debian source package documentation. In general, it is recommended to use an already available app as a template since most of the configuration options available aren't required.