Reconfiguring Against Oracle RAC
This section describes how you can configure Key Manager servers after you have replicated/moved the Key Manager database to Oracle RAC.
To reconfigure your Key Manager deployment to use a database on Oracle RAC, perform the following on all Key Manager Servers:
-
Stop the Key Manager services to prevent database connections during the procedure:
# supervisorctl stop all -
Adjust the database-connection settings, by default located at
/opt/sshmgr/app/localsettings.pyIn the settings file, find the
DATABASESsetting, which should look similar to the following:DATABASES = {'default': {'ENGINE': 'django.db.backends.oracle','NAME': 'database_sid','USER': 'database_username','PASSWORD': unobfuscate('<redacted>').decode('utf-8'),'OPTIONS': { },'HOST': 'keymanager.example.com','PORT': '1521','ATOMIC_REQUESTS': True,},}To connect to Oracle RAC, change the settings as follows:
NAME- Specify the Oracle RAC connection parameters in connect descriptor format.HOST- Remove this setting.PORT- Remove this setting.
The
DATABASESsetting should now look similar to the following:DATABASES = {'default': {'ENGINE': 'django.db.backends.oracle','NAME': '(DESCRIPTION = (FAILOVER=on)(LOAD_BALANCE=off)' \'(TRANSPORT_CONNECT_TIMEOUT=5)(CONNECT_TIMEOUT=5)' \'(RETRY_COUNT=10)' \'(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)' \'(HOST = oraclerac1.example.com)(PORT = 1521))' \'(ADDRESS = (PROTOCOL = TCP)' \'(HOST = oraclerac2.example.com)(PORT = 1521)))' \'(CONNECT_DATA = (SERVER = DEDICATED)' \'(SERVICE_NAME = oracleracdb)))','USER': 'database_username','PASSWORD': unobfuscate('<redacted>').decode('utf-8'),'OPTIONS': { },'ATOMIC_REQUESTS': True,},}Replace the example values as appropriate for your environment. Particularly, note that the connect descriptor for your Oracle RAC may require completely different parameters than shown in the example.
Save your changes to the settings file.
-
Restart the Key Manager services to apply the changes:
# supervisorctl restart all