cnti-testcatalog/testsuite

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

kosstennbl opened this issue · 3 comments

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.)

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/<deployment_config.name>/source
  2. Call installation method for helm deployments

HelmDirectory:

  1. Copy helm_directory to CNF_DIR/deployments/<deployment_config.name>/source
  2. Call installation method for helm deployments

ManifestDirectory:

  1. Copy manifest_directory to CNF_DIR/deployments/<deployment_config.name>/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)

Things to not forget about:

  • Estimated time configmap (remove if possible)
  • Jaeger tracing used (remove if possible)
  • Oran e2 session establishment (remove if possible)
  • CNF to new cluster handling
  • Cleanup process similar to install process

Done in #2165