6 Deploying the BRM Database Schema

Learn how to deploy a new database schema or use an existing database schema in the Oracle Communications Billing and Revenue Management (BRM) cloud native environment.

Topics in this document:

Deploying BRM with a New Database Schema

To deploy BRM with a new BRM and pipeline database schema:

  1. If you have not already done so, create a BRM database and create schema users for BRM Server and pipeline. See "Creating and Configuring Your BRM Database".

  2. Create a new Kubernetes namespace for oc-cn-init-db-helm-chart:

    kubectl create namespace InitDbNameSpace
  3. Create an override-values.yaml file for oc-cn-init-db-helm-chart, and then add keys from Table 6-1.

    Note:

    This documentation uses the override-values.yaml file name for ease of use, but you can name the file whatever you want.

  4. If you want to deploy the BRM cloud native schema into a multischema database, do the following in your override-values.yaml file:

    1. Set the ocbrm.db.skipPrimary key to false.

    2. For each secondary schema in your system, add an ocbrm.db.multiSchemas.secondaryN block, where N is 1 for the first secondary schema, 2 for the next secondary schema, and so on.

    3. In each ocbrm.db.multiSchemas.secondaryN block, set the following keys:

      Note:

      If the host, port, and service keys are not defined, the secondary schema uses the same host name, service, and port number as the primary schema.

      • deploy: Set this to true to deploy this secondary schema.

      • host: Set this to the host name of the secondary schema. This key is optional.

      • port: Set this to the port number for the secondary schema. This key is optional.

      • service: Set this to the service name for the secondary schema. This key is optional.

      • schemauser: Set this to the schema user name.

      • schemapass: Set this to the schema password.

      • schematablespace: Set this to the name of the schema tablespace, such as pin01.

      • indextablespace: Set this to the name of the index tablespace, such as pinx01.

    4. Enable account migration between your schemas by setting the ocbrm.isAmt key to true.

      See "Understanding Account Migration" in BRM Moving Accounts Between Database Schemas for more information.

    This shows example entries for a BRM database with one primary schema, two secondary schemas, and account migration enabled:

    ocbrm:
       isAmt: true
       db:
          skipPrimary: false
          multiSchemas:    
             secondary1:
                deploy: true
                schemauser: pin02    
                schemapass: password    
                schematablespace: pin02   
                indextablespace: pinx02
             secondary2:  
                deploy: true  
                schemauser: pin03   
                schemapass: password   
                schematablespace: pin03
                indextablespace: pinx03
  5. To commit seed data to the BRM database, modify the init-db container (configmap_create_obj_2.yaml) to add the corresponding PCM_OP_CREATE_OBJ input flist. For example:

    <PCM_OP $PIN_OPNAME=$PIN_CONF_INIT_OPNAME; $PIN_OPFLAGS=0>
    0 PIN_FLD_POID           POID [0] $DB_NUMBER /config/recharge_card_type 0 0
    0 PIN_FLD_NAME            STR [0] "-"
    0 PIN_FLD_PROGRAM_NAME    STR [0] "load_pin_recharge_card_type"
    0 PIN_FLD_HOSTNAME        STR [0] "-"
    0 PIN_FLD_VERSION         STR [0] "1"
    0 PIN_FLD_ACCOUNT_OBJ    POID [0] 0.0.0.1 /account 1 0
    </PCM_OP>
  6. Initialize the BRM database schema by running this command from the helmcharts directory:

    helm install InitDbReleaseName oc-cn-init-db-helm-chart --namespace InitDbNameSpace --values OverrideValuesFile

    where:

    • InitDbReleaseName is the release name for oc-cn-init-db-helm-chart and is used to track this installation instance.

    • InitDbNameSpace is the namespace for oc-cn-init-db-helm-chart.

    • OverrideValuesFile is the path to a YAML file that overrides the default configurations in the values.yaml file for oc-cn-init-db-helm-cart.

    The init-db Helm chart creates an init-db pod and job for each schema. If you have a multischema database, the primary init-db pod also runs the pin_multidb.pl and pin_amt_install.pl scripts. You can view the status of these scripts by running the kubectl logs command.

  7. After the init-db Helm chart is deployed successfully, delete the Helm chart from your namespace by running this command from the helmcharts directory:

    helm delete InitDbReleaseName -n InitDbNameSpace

Table 6-1 lists the keys that directly impact the BRM database schema and pipeline database schema. Add these keys to your override-values.yaml file with the same path hierarchy.

Caution:

Some keys hold sensitive data. They must be handled carefully with controlled access to the file containing its values. Encode all of these values in Base64. See "Secrets" in Kubernetes Concepts.

Table 6-1 oc-cn-init-db-helm-chart Keys

Key Purpose

db.*

The details for connecting to a shared database. The keys in this section take precedence over other database connection keys.

Add these keys only if your system uses a shared database:

  • sslMode: The type of SSL connection required for connecting to the database: TWO_WAY, ONE_WAY, or NO. The default is ONE_WAY.
  • host: The host name or IP address of the database server.
  • port: The port number of the database server.
  • user: The user name of the database administrator.
  • password: The password of the database system administrator.
  • serviceName: The service name that identifies the database.
  • role: The role assigned to the DBA user.
  • walletPassword: The password for accessing the certificates from the TrustStore and KeyStore.
  • walletType: The type of file specified as the TrustStore or KeyStore for SSL connections: SSO or pkcs12.

ocbrm.imagePullPolicy

Specify when to pull images:

  • IfNotPresent: Pulls an image only if one is not present locally. This is the default.
  • Always: Always pulls an image.

ocbrm.isAMT

Specify whether account migration is enabled in your BRM multischema database:

  • True: Account migration is enabled.
  • False: Account migration is disabled. This is the default.

ocbrm.ece_deployed

Specify whether to deploy ECE in your BRM cloud native environment:

  • True: ECE configurations will be loaded into your environment. This is the default.
  • False: ECE configurations will not be loaded into your environment.

ocbrm.existing_rootkey_wallet

Specify whether you are using an existing BRM database or existing root key wallet:

  • True: Uses your existing BRM database.
  • False: Performs a fresh database initialization.

    When set to false, the init-db Helm chart runs lds-config-job to load default strings into the BRM database during the deployment process. Manually delete lds-config-job after BRM is deployed successfully.

ocbrm.is_upgrade

Specify whether to upgrade the existing database schema:

  • True: Upgrades your existing database schema.
  • False: Deploys a new BRM database schema.

ocbrm.LOG_LEVEL

The dm-oracle log level.

ocbrm.brm_root_pass

The BRM root password. The value can be per user.

You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.

ocbrm.wallet.client

The password for the client wallet.

You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.

ocbrm.wallet.server

The password for the server wallet.

You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.

ocbrm.wallet.root

The password for the root wallet.

You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.

ocbrm.db.host

The host name of the machine on which the BRM database is configured.

ocbrm.db.port

The port on which the BRM database is configured.

ocbrm.db.service

The BRM database service name.

ocbrm.db.isSSLEnabled

Whether SSL is enabled in the BRM database.

  • True: SSL is enabled.
  • False: SSL is disabled. This is the default.

ocbrm.db.sslMode

The type of SSL connection required for connecting to the database: TWO_WAY, ONE_WAY, or NO. The default is ONE_WAY.

ocbrm.db.walletPassword

The password for accessing the database certificates from the TrustStore and KeyStore.

ocbrm.db.walletType

The type of file specified as the TrustStore or KeyStore for database SSL connections: SSO or pkcs12.

ocbrm.db.enable_partition

Whether partitioning is enabled in your BRM database:

  • Yes: Partitioning is enabled. This is the default.
  • No: Partitioning is disabled in your BRM database.

ocbrm.db.schemauser

The user name for the primary BRM schema. The user name should be pre-created with all of the required grants.

ocbrm.db.schemapass

The BRM schema password. You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.

ocbrm.db.schematablespace

The name of the tablespace for the primary BRM schema. This field is case-sensitive.

ocbrm.db.indextablespace

The name of the index tablespace for the primary BRM schema. This field is case-sensitive.

ocbrm.db.nls_lang

The language, territory, and character set. Set this to American_America.characterset, where characterset is either UTF8 or AL32UTF8.

Note: You must use American_America as the language and territory, regardless of your locale.

ocbrm.db.pipeline*

The details for connecting to the pipeline database schema. If these keys are not defined, the pipeline database uses the same schema user, schema password, and tablespaces as specified for the primary BRM schema.

Note: Either set all of these pipeline keys or set none of the keys.

  • pipelineschemauser: The BRM pipeline schema user name, which should be pre-created with all of the required grants.
  • pipelineschemapass: The BRM pipeline schema password. You must generate a Secret. Add this key to your override-values.yaml file with the same path hierarchy.
  • pipelineschematablespace: The name of the tablespace for the BRM pipeline schema. This field is case-sensitive.
  • pipelineindextablespace: The name of the index tablespace for the BRM pipeline schema. This field is case-sensitive.

ocbrm.db.skipPrimary

Specifies whether to skip the deployment of the primary schema.

  • false: The primary schema is deployed. This is the default.
  • true: The primary schema is not deployed. Use this value only if you are adding a schema to an existing BRM multischema system. See "Adding Schemas to a Multischema System" in BRM Cloud Native System Administrator's Guide.

ocbrm.db.multiSchemas.secondaryN

The details for connecting to your secondary schemas, where N is 1 for the first secondary schema, 2 for the next secondary schema, and so on.

Add this block only if your BRM database contains multiple schemas. This section will be commented out by default:

multiSchemas: 
   secondary1: 
      deploy: true
      host: localhost 
      port: 1521 
      service: pindb 
      schemauser: 
      schemapass: 
      schematablespace: 
      indextablespace:

Deploying BRM with an Existing Schema

Note:

If your existing database schema has not been updated to BRM 12.0 Patch Set 4, first upgrade the BRM schema by following the instructions in "Upgrading Your Database Schema".

To deploy BRM with an existing schema and with default Oracle images:

  1. Copy the client wallet files from the $BRM_WALLET/client directory to the oc-cn-helm-chart/existing_wallet directory.

  2. In your override-values.yaml file for oc-cn-helm-chart, set the ocbrm.existing_rootkey_wallet key to true.

  3. Deploy oc-cn-helm-chart.

Alternatively, you could deploy BRM with an existing schema by doing this:

  1. Create Docker images for each of the BRM Server components in the installed BRM staging area (using the same staging area that initialized the database).

  2. In your override-values.yaml file for oc-cn-helm-chart, update the keys with the existing schema credentials and also set the following keys:

    • ocbrm.existing_rootkey_wallet: Set this to true.

    • ocbrm.use_oracle_brm_images: Set this to false.

    • ocbrm.db.queuename: Set this to match the queue name in the existing database.

    • obcrm.db.roamqueuename: If you want a database queue for Roaming Pipeline, create another queue in the Oracle database by following the instructions in "Creating Additional Queues for Multischema BRM Systems" in BRM Installation Guide. Then, set the roamqueuename key to the name of the queue you created.

  3. Deploy oc-cn-helm-chart.