Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-2706

CDS Blueprint Processor does not work with local DB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Montreal Release
    • Guilin Release
    • charts
    • Hide

      SUMMARY

      The deployment of CDS cannot be installed on a local DB.

       

      The cds-blueprint-processor chart is assuming that the CDS DB is installed on the same DB, the SDNC is using and requires the root password:

        sdncDB:
          dbService: mariadb-galera
          dbPort: 3306
          dbName: sdnctl
          #dbRootPass: Custom root password
          dbRootPassExternalSecret: '{{ include "common.mariadb.secret.rootPassSecretName" ( dict "dot" . "chartName" .Values.config.sdncDB.dbService ) }}'
      

      In case of a local DB in the cds component value.yaml this value is not overwritten and therefor the deployment fails.

      Possible SOLUTION:
      1. Add the definition of the MariaDB (including "localCluster") in the cds component values.yaml:

        mariadbGalera:
          #This flag allows SO to instantiate its own mariadb-galera cluster
          #If shared instance is used, this chart assumes that DB already exists
          localCluster: true
          service: mariadb-galera
          internalPort: 3306
          nameOverride: cds-db
      

      2. Add a Secret for DB-Root-Password in the cds component values.yaml:

      secrets:
        - uid: db-root-password
          name: '{{ include "common.release" . }}-cds-db-root-password'
          type: password
          externalSecret: '{{ .Values.global.mariadbGalera.localCluster |
            ternary (default (include "common.mariadb.secret.rootPassSecretName"
            (dict "dot" . "chartName"
            (index .Values "mariadb-galera" "nameOverride")))
            (index .Values "mariadb-galera" "config"
            "mariadbRootPasswordExternalSecret"))
            (include "common.mariadb.secret.rootPassSecretName"
            (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) }}'
          password: '{{ (index .Values "mariadb-galera" "config" "mariadbRootPassword") }}'
      

      3. Add the root password in the mariaDB configuration:

      mariadb-galera:
        config:
          rootPasswordExternalSecret: '{{ ternary (include "common.release" .)-cds-db-root-password "" .Values.global.mariadbGalera.localCluster }}'
          userName: sdnctl
      
      

      4. Add an override for the cds-blueprint-processor:

      cds-blueprints-processor:
        config:
          sdncDB:
            dbService: *dbServer
            dbPort: 3306
            dbName: *mysqlDbName
            #dbRootPass: Custom root password
            dbRootPassExternalSecret: '{{ ternary (printf "%s-cds-db-db-root-password" (include "common.release" .)) (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" "mariadb-galera")) .Values.global.mariadbGalera.localCluster }}'
      

       

       

      Show
      SUMMARY The deployment of CDS cannot be installed on a local DB.   The cds-blueprint-processor chart is assuming that the CDS DB is installed on the same DB, the SDNC is using and requires the root password: sdncDB: dbService: mariadb-galera dbPort: 3306 dbName: sdnctl #dbRootPass: Custom root password dbRootPassExternalSecret: '{{ include "common.mariadb.secret.rootPassSecretName" ( dict "dot" . "chartName" .Values.config.sdncDB.dbService ) }}' In case of a local DB in the cds component value.yaml this value is not overwritten and therefor the deployment fails. Possible SOLUTION: 1. Add the definition of the MariaDB (including "localCluster") in the cds component values.yaml: mariadbGalera: #This flag allows SO to instantiate its own mariadb-galera cluster #If shared instance is used, this chart assumes that DB already exists localCluster: true service: mariadb-galera internalPort: 3306 nameOverride: cds-db 2. Add a Secret for DB-Root-Password in the cds component values.yaml: secrets: - uid: db-root-password name: '{{ include "common.release" . }}-cds-db-root-password' type: password externalSecret: '{{ .Values.global.mariadbGalera.localCluster | ternary ( default (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" (index .Values "mariadb-galera" "nameOverride" ))) (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret" )) (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) }}' password: '{{ (index .Values "mariadb-galera" "config" "mariadbRootPassword" ) }}' 3. Add the root password in the mariaDB configuration: mariadb-galera: config: rootPasswordExternalSecret: '{{ ternary (include "common.release" .)-cds-db-root-password "" .Values.global.mariadbGalera.localCluster }}' userName: sdnctl 4. Add an override for the cds-blueprint-processor: cds-blueprints-processor: config: sdncDB: dbService: *dbServer dbPort: 3306 dbName: *mysqlDbName #dbRootPass: Custom root password dbRootPassExternalSecret: '{{ ternary (printf "%s-cds-db-db-root-password" (include "common.release" .)) (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" "mariadb-galera" )) .Values.global.mariadbGalera.localCluster }}'    

          andreasgeissler Andreas Geissler
          andreasgeissler Andreas Geissler
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: