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