cnti-testcatalog / testsuite

📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
174 stars 72 forks source link

[Feature] CNF Installation (6), Prepare new installation process #2161

Closed kosstennbl closed 1 day ago

kosstennbl commented 1 month ago

To support multiple deployments as one CNF, we need to design a new installation process. Main idea of this new process is creating separate methods for each deployment type and then install all deployments from config on one-by-one basis.

All related files and methods should be created in cnf_installation directory. If and where possible, code for HelmDirectory deployments should be reused for HelmChart deployments

On this step, old installation methods should NOT be removed or manipulated in any way. All new functionality should be added under different SAM tasks, possibly with some required ENV (e.g. ENV["CRYSTAL_ENV"] = "EXPERIMENTAL", we use that ENV for testing.)

kosstennbl commented 1 month ago

Some chaotic development ideas, written in the issue to not be lost in time and local notes:

  1. Parse CLI args
  2. Parse config and copy it to CNF_DIR
  3. For each deployment config:
    1. Create deployment installer object with deployment config and args
    2. Call install on deployment installer.
    3. Call generate manifest on deployment installer and append it to new/existing common manifest

Deployment installers: HelmChart:

  1. Create repo (if configured), pull chart to CNF_DIR/deployments//source
  2. Call installation method for helm deployments

HelmDirectory:

  1. Copy helm_directory to CNF_DIR/deployments//source
  2. Call installation method for helm deployments

ManifestDirectory:

  1. Copy manifest_directory to CNF_DIR/deployments//source
  2. Apply all manifests from source directory through KubectlClient
  3. Wait for all resources (if not skipped)

Installation method for helm deployments:

  1. Take source directory, namespace, helm values
  2. Call Helm.install with required parameters, handle errors.
  3. Wait for all resources. (if not skipped)
kosstennbl commented 1 month ago

Things to not forget about:

kosstennbl commented 1 day ago

Done in #2165