Deployment and Management Guide for Cisco IoT FND on OVA with Postgres and InfluxDB, Release 5.x.x and Later

PDF

Configure HA and DR

Updated: February 4, 2026

Overview

Use this topic to configure and implement high availability for Cisco IoT FND using PostgreSQL, ensuring continuous service and minimal downtime.

Use these instructions to configure HA and DR on on Cisco IoT FND with Postgres.

Before you begin

  • Ensure to have an EDB cluster up and running. For more information, see creating a cluster. Here's the config.yaml file used to provision and deploy the cluster.

    [XXXXXXX@pgdah pgd_cluster]$ cat config.yml
    ---
    architecture: PGD-Always-ON
    cluster_name: pgd_cluster
    cluster_tags: {}
    
    keyring_backend: legacy
    vault_name: xxxx-xxxxx-xxxxx-xxxxx-xxxxxxxx
    
    cluster_vars:
      postgres_users:
      - username: cgms_dev
        generate_password: false
        role_attrs:
        - LOGIN
        - SUPERUSER
        - CREATEROLE
        - CREATEDB
        - REPLICATION
      apt_repository_list: []
      bdr_database: cgms
      bdr_node_group: pgd_cluster
      bdr_node_groups:
      - name: pgd_cluster
        options:
          enable_proxy_routing: true
      - name: dc1_subgroup
        options:
          location: dc1
        parent_group_name: pgd_cluster
      - name: dc2_subgroup
        options:
          location: dc2
        parent_group_name: pgd_cluster
      - name: dc3_subgroup
        options:
          location: dc3
        parent_group_name: pgd_cluster
      bdr_version: '5'
      bdr_package_version: '5.9.*'
      pgd_proxy_package_version: '5.9*'
      pgdcli_package_version: '5.9*'
      default_pgd_proxy_options:
        listen_port: 6432
        read_listen_port: 6433
      edb_repositories:
      - standard
      - postgres_distributed
      failover_manager: pgd
      postgres_coredump_filter: '0xff'
      postgres_flavour: edbpge
      postgres_version: '16'
      postgres_package_version: '16.9*'
      postgres_port: 5432
      postgres_data_dir: '/pgdata/data'
      postgres_wal_dir: '/pgdata/pgwal'
      postgres_tablespaces:
        ts_tblspc1:
           location: '/pgdata/tblspc'
      preferred_python_version: python3
      use_local_repo_only: true
      use_volatile_subscriptions: false
      yum_repository_list:
      - EPEL
      log_line_prefix: '%t [%p]: [%l-1] user=%u db=%d app=%a client=%h '
      postgres_log_file: '/pgdata/log/postgres/postgres-%Y-%m-%d.log'
      postgres_conf_settings:
        work_mem: "'32MB'"
        log_min_duration_statement: "'500ms'"
        log_checkpoints: "'on'"
        log_disconnections: "'on'"
        log_connections: "'on'"
        log_lock_waits: "'on'"
        log_temp_files: "'0'"
        log_rotation_age: "'1d'"
        log_statement: "'ddl'"
        log_rotation_size: "'1GB'"
        bdr.default_sequence_kind: 'local'
        wal_sender_timeout: "'30min'"
        wal_receiver_timeout: "'30min'"
        max_replication_slots: '26'
      log_destination: 'stderr'
      postgres_hba_settings:
      - host all all <Masked_IP_Range>/0 scram-sha-256
      - host all all <Masked_IPv6_Address_1>/128 scram-sha-256
      - host all all <Masked_IPv6_Address_2>/128 scram-sha-256
    
    locations:
    - Name: dc1
    - Name: dc2
    - Name: dc3
    
    
    instance_defaults:
      platform: bare
      vars:
        ansible_user: pgdinstall
    
    instances:
    - Name: pgda1
      public_ip: <Masked_IP_1>
      location: dc1
      node: 1
      role:
      - bdr
      - pgd-proxy
      vars:
        bdr_child_group: dc1_subgroup
        bdr_node_options:
          route_priority: 100
    - Name: pgda2
      public_ip: <Masked_IP_2>
      location: dc1
      node: 2
      role:
      - bdr
      - pgd-proxy
      vars:
        bdr_child_group: dc1_subgroup
        bdr_node_options:
          route_priority: 100
    - Name: pgdb1
      public_ip: <Masked_IP_3>
      location: dc2
      node: 3
      role:
      - bdr
      - pgd-proxy
      vars:
        bdr_child_group: dc2_subgroup
        bdr_node_options:
          route_priority: 100
    - Name: pgdb2
      public_ip: <Masked_IP_4>
      location: dc2
      node: 4
      role:
      - bdr
      - pgd-proxy
      vars:
        bdr_child_group: dc2_subgroup
        bdr_node_options:
          route_priority: 100
    - Name: pgdw
      public_ip: <Masked_IP_5>
      location: dc3
      node: 5
      role:
      - bdr
      - witness
      vars:
        bdr_child_group: dc3_subgroup
  • Ensure that your DC1 FND and DC2 FND are deployed using Bare Metal servers.

  • Ensure to install and verify the RPM. Here are the RPM details:

    RPM type

    RPM ID

    FND RPM

    cgms-5.1.1-16.pg.x86_64.rpm

    Postgres RPM

    cgms-postgres-5.1.1-16.x86_64.rpm

    Tools RPM

    cgms-tools-5.1.1-16.x86_64.rpm

  • We recommend that you perform the following logging configuration when installing EDB, in coordination with the EDB vendor:
    log_line_prefix: '%t [%p]: [%l-1] user=%u db=%d app=%a client=%h '
      postgres_log_file: '/pgdata/log/postgres/postgres-%Y-%m-%d.log'
      postgres_conf_settings:
        work_mem: "'32MB'"
        log_min_duration_statement: "'500ms'"
        log_checkpoints: "'on'"
        log_disconnections: "'on'"
        log_connections: "'on'"
        log_lock_waits: "'on'"
        log_temp_files: "'0'"
        log_rotation_age: "'1d'"
        log_statement: "'ddl'"
        log_rotation_size: "'1GB'"
        bdr.default_sequence_kind: 'local'
        wal_sender_timeout: "'30min'"
        wal_receiver_timeout: "'30min'"
        max_replication_slots: '26'
      log_destination: 'stderr'

Follow the two-step task to configure HA and DR for Cisco IoT FND with Postgres:

Procedure

1.

Configure HA and DR on DC1 FND

2.

Configure HA and DR on DC2 FND

What to do next

Configure HA and DR on DC1 FND


Configure HA and DR on DC1 FND

This task helps you configure HA and DR on DC1 FND.

Procedure

1.

Install the Cisco IoT FND RPM. For more information, see Install Cisco IoT FND RPM.

You've installed the RPM.
2.

Navigate to cd/opt/cgms/bin using the terminal or command prompt.

The command changes the current directory to /opt/cgms/bin.

3.

Execute the script setupCgms.sh.

Example:

[root@dc1fnd bin]# ./setupCgms.sh
01-20-2026 12:44:08 IST: INFO: ========== IoT-FND Setup Started - 2026-01-20-12-44-08 ==========
01-20-2026 12:44:08 IST: INFO: Log file: /opt/cgms/bin/../server/cgms/log/cgms_setup.log

Are you sure you want to setup IoT-FND (y/n)? y

01-20-2026 12:44:10 IST: INFO: User response: y

Do you want to change the database settings (y/n)? y

01-20-2026 12:44:12 IST: INFO: User response: y

Do you want to configure Postgres with High Availability (y/n)? y

01-20-2026 12:44:18 IST: INFO: User response: y

Enter comma separated proxy hostnames or IPs with port in the format <Proxy IP>:6432 [[<proxy_ip_1>]:6432,[<proxy_ip_2>]:6432,[<proxy_ip_3>]:6432,[<proxy_ip_4>]:6432]:
01-20-2026 12:44:55 IST: INFO: Postgres Proxy server & Port: [<proxy_ip_1>]:6432,[<proxy_ip_2>]:6432,[<proxy_ip_3>]:6432,[<proxy_ip_4>]:6432

Enter comma separated DB node hostnames or IPs with port in the format <DB Node IP>:5432 [[<db_node_ip_1>]:5432,[<db_node_ip_2>]:5432,[<db_node_ip_3>]:5432,[<db_node_ip_4>]:5432]:
01-20-2026 12:45:04 IST: INFO: Postgres HA DB Node Ip & Port: [<db_node_ip_1>]:5432,[<db_node_ip_2>]:5432,[<db_node_ip_3>]:5432,[<db_node_ip_4>]:5432

Enter database SID [cgms]:
01-20-2026 12:45:24 IST: INFO: Database SID: cgms
01-20-2026 12:45:24 IST: INFO: Configuring database settings. This may take a while. Please wait ...
01-20-2026 12:45:24 IST: INFO: Database settings configured.
01-20-2026 12:45:24 IST: INFO: Configuring BDR sequence settings for High Availability...

Enter database password:
Re-enter database password:

01-20-2026 12:45:39 IST: INFO: Database connection details - Proxy IP: <proxy_ip_1>, Port: 6432, SID: cgms, User: cgms_dev
01-20-2026 12:45:39 IST: INFO: Checking sequences galloc status on <proxy_ip_1>:6432 for user cgms_dev in database cgms
01-20-2026 12:45:39 IST: INFO: Sequences galloc check result: '0' non-galloc sequences found
01-20-2026 12:45:39 IST: INFO: BDR sequences are already configured for HA (all sequences are galloc and default sequence kind is galloc). Skipping conversion.

Do you want to change the database password (y/n)? n

01-20-2026 12:46:05 IST: INFO: User response: n

Do you want to change the keystore password (y/n)? n

01-20-2026 12:46:07 IST: INFO: User response: n

Do you want to change the web application 'root' user password (y/n)? n

01-20-2026 12:46:09 IST: INFO: User response: n

Do you want to change IPAM and PSK Settings (y/n)? n

01-20-2026 12:46:10 IST: INFO: User response: n

Do you want to change the FTP settings (y/n)? n

01-20-2026 12:46:12 IST: INFO: User response: n

Do you want to change router CGDM protocol settings (y/n)? n

01-20-2026 12:46:14 IST: INFO: User response: n

Do you want to change router management mode [Demo, Bandwidth Optimized, Default] (y/n)? n

01-20-2026 12:46:15 IST: INFO: User response: n

Do you want to configure timeseries database (y/n)? n

01-20-2026 12:46:17 IST: INFO: User response: n
01-20-2026 12:46:17 IST: INFO: Configuring timeseries flag  none in system properties. This may take a while. Please wait...
01-20-2026 12:46:17 IST: INFO: timeseries flag none

Do you want to change log file settings? (y/n)? n

01-20-2026 12:46:19 IST: INFO: User response: n
01-20-2026 12:46:19 IST: INFO: ========== IoT-FND Setup Completed Successfully ==========
You've setup the cgms service for DC1 FND.
4.

Execute db-init.sh to initiate the database.

Example:

Note
  • Initiate the database only if you're installing Cisco IoT FND for the first time.

  • You must install psql v16 client on Cisco IoT FND VM/Bare Metal before running db-init command for setting up the database. For more information, see PostgreSQL documentation.

Example:

./db-init <db host> <db port> <db service> <username> <password>
[root@dc1fnd bin]# ./db-init [xxxx:xxxx:xxxx:4::212:20] 6432 cgms cgms_dev cgms123
07-16-2025 19:46:20 IST: INFO: Log file: /opt/cgms/bin/../server/cgms/log/cgms_init.log
07-16-2025 19:46:20 IST: INFO: Performing init.
07-16-2025 19:46:21 IST: INFO: Init completed.
07-16-2025 19:46:21 IST: INFO: Creating Schema.
07-16-2025 19:46:21 IST: INFO: Schema creation completed.
The database has been initialized successfully and the schema creation is complete.
5.

Execute db-migrate to migrate the database.

Example:

[root@dc1fnd bin]# ./db-migrate
Enter database password: <cgms123>
02-11-2022 10:48:11 EST: INFO: Log file: /opt/cgms/bin/../server/cgms/log/cgms_setup.log
02-11-2022 10:48:11 EST: INFO: Performing pre migration. This may take a while. Please wait ...
02-11-2022 10:48:12 EST: INFO: Pre migration completed.
02-11-2022 10:48:12 EST: INFO: Performing migration. This may take a while. Please wait ...
02-11-2022 10:48:58 EST: INFO: Migration completed.
02-11-2022 10:48:58 EST: INFO: Performing post migration. This may take a while. Please wait ...
02-11-2022 10:51:57 EST: INFO: Post migration completed.
[root@fnd-rhel8-33 bin]#
The database migration has completed successfully, including pre-migration and post-migration steps.
6.

Start the cgms service using the service cgms start command and verify the status using the service cgms status command.

Example:

IoT-FND Version 5.1.1-7
01-20-2026 12:53:47 IST: INFO: IoT-FND database server: [xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432
01-20-2026 12:53:47 IST: INFO: IoT-FND database connection verified.
01-20-2026 12:53:49 IST: INFO: IoT-FND application server is up and running.
01-20-2026 12:53:52 IST: INFO: IoT-FND is up and running.

You've configured HA and DR on DC1 FND.

What to do next

Configure HA and DR on DC2 FND.


Configure HA and DR on DC2 FND

This task helps you configure HA and DR on DC2 FND.

Procedure

1.

Install the Cisco IoT FND RPM. For more information, see Install Cisco IoT FND RPM.

You've installed the RPM.
2.

Navigate to cd/opt/cgms/bin using the terminal or command prompt.

The command changes the current directory to /opt/cgms/bin.

3.

Execute the script setupcgms.sh.

Example:

[root@dc1fnd bin]# ./setupCgms.sh
01-20-2026 12:44:08 IST: INFO: ========== IoT-FND Setup Started - 2026-01-20-12-44-08 ==========
01-20-2026 12:44:08 IST: INFO: Log file: /opt/cgms/bin/../server/cgms/log/cgms_setup.log

Are you sure you want to setup IoT-FND (y/n)? y

01-20-2026 12:44:10 IST: INFO: User response: y

Do you want to change the database settings (y/n)? y

01-20-2026 12:44:12 IST: INFO: User response: y

Do you want to configure Postgres with High Availability (y/n)? y

01-20-2026 12:44:18 IST: INFO: User response: y

Enter comma separated proxy hostnames or IPs with port in the format <Proxy IP>:6432 [[2001:db8::212:20]:6432,[2001:db8::212:21]:6432,[2001:db8::213:20]:6432,[2001:db8::213:21]:6432]:
01-20-2026 12:44:55 IST: INFO: Postgres Proxy server & Port: [2001:db8::212:20]:6432,[2001:db8::212:21]:6432,[2001:db8::213:20]:6432,[2001:db8::213:21]:6432

Enter comma separated DB node hostnames or IPs with port in the format <DB Node IP>:5432 [[2001:db8::212:20]:5432,[2001:db8::212:21]:5432,[2001:db8::213:20]:5432,[2001:db8::213:21]:5432]:
01-20-2026 12:45:04 IST: INFO: Postgres HA DB Node Ip & Port: [2001:db8::212:20]:5432,[2001:db8::212:21]:5432,[2001:db8::213:20]:5432,[2001:db8::213:21]:5432

Enter database SID [cgms]:
01-20-2026 12:45:24 IST: INFO: Database SID: cgms
01-20-2026 12:45:24 IST: INFO: Configuring database settings. This may take a while. Please wait ...
01-20-2026 12:45:24 IST: INFO: Database settings configured.
01-20-2026 12:45:24 IST: INFO: Configuring BDR sequence settings for High Availability...

Enter database password:
Re-enter database password:

01-20-2026 12:45:39 IST: INFO: Database connection details - Proxy IP: 2001:db8::212:20, Port: 6432, SID: cgms, User: cgms_dev
01-20-2026 12:45:39 IST: INFO: Checking sequences galloc status on 2001:db8::212:20:6432 for user cgms_dev in database cgms
01-20-2026 12:45:39 IST: INFO: Sequences galloc check result: '0' non-galloc sequences found
01-20-2026 12:45:39 IST: INFO: BDR sequences are already configured for HA (all sequences are galloc and default sequence kind is galloc). Skipping conversion.

Do you want to change the database password (y/n)? n

01-20-2026 12:46:05 IST: INFO: User response: n

Do you want to change the keystore password (y/n)? n

01-20-2026 12:46:07 IST: INFO: User response: n

Do you want to change the web application 'root' user password (y/n)? n

01-20-2026 12:46:09 IST: INFO: User response: n

Do you want to change IPAM and PSK Settings (y/n)? n

01-20-2026 12:46:10 IST: INFO: User response: n

Do you want to change the FTP settings (y/n)? n

01-20-2026 12:46:12 IST: INFO: User response: n

Do you want to change router CGDM protocol settings (y/n)? n

01-20-2026 12:46:14 IST: INFO: User response: n

Do you want to change router management mode [Demo, Bandwidth Optimized, Default] (y/n)? n

01-20-2026 12:46:15 IST: INFO: User response: n

Do you want to configure timeseries database (y/n)? n

01-20-2026 12:46:17 IST: INFO: User response: n
01-20-2026 12:46:17 IST: INFO: Configuring timeseries flag  none in system properties. This may take a while. Please wait...
01-20-2026 12:46:17 IST: INFO: timeseries flag none

Do you want to change log file settings? (y/n)? n

01-20-2026 12:46:19 IST: INFO: User response: n
01-20-2026 12:46:19 IST: INFO: ========== IoT-FND Setup Completed Successfully ==========
You've setup the cgms service for DC2 FND.
4.

Start the cgms service using the systemctl start cgms command and verify the status using the systemctl status cgms command.

Example:

IoT-FND Version 5.1.1-7
01-20-2026 12:53:47 IST: INFO: IoT-FND database server: [xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432,[xxxx:xxxx:xxxx:xx]:6432
01-20-2026 12:53:47 IST: INFO: IoT-FND database connection verified.
01-20-2026 12:53:49 IST: INFO: IoT-FND application server is up and running.
01-20-2026 12:53:52 IST: INFO: IoT-FND is up and running.

You've configured HA and DR on DC2 FND.