Failover Service for Key Manager Plus (MS SQL Server Cluster)
(Feature available only for Windows installations of Key Manager Plus with MS SQL cluster as backend database.)
The Failover Service in Key Manager Plus is aimed at ensuring uninterrupted access to keys and certificates. It functions with redundant Key Manager Plus server instances that have access to a common MS-SQL cluster.
Note: Failover Service for Key Manager Plus allows configuration of a maximum of TWO instances of Key Manager Plus only.
How does failover service work?
- There will be redundant Key Manager Plus server instances which will have access to a common MS-SQL cluster.
- Both the instances of Key Manager Plus server will be primary installations providing read/write access to the users. While one instance acts as the primary, the other will act as the standby. (Primary, standby and SQL cluster database will be installed on three separate machines)
- In this setup, Key Manager Plus installed in the primary will normally be up and running. The standby machine will keep monitoring the primary. The Key Manager Plus application in the standby is configured to start up and take-over, in case the primary crashes or goes down.
- When the primary server is brought back to service, it will automatically act as the 'standby'. The server, which was originally configured to act as standby will become the primary.
Prerequisites to set up failover service
- FailOver service(FOS) can be configured only for builds that have MS SQL as backend.
- Both the primary and secondary servers should be bound by a common public static IP and Key Manager Plus web-interface will always be connected to this specific IP. So end-users can connect to Key Manager Plus anytime using the same public IP irrespective of whether Key Manager Plus running on primary or secondary server.
- Failover service can be set up only if the processor versions of both the primary and secondary machines are compatible with one another. i.e., 64 bit or 32 bit.
- The same version of Key Manager Plus should be installed in both the primary and secondary machines.
- The common static IP should not be assigned to any other machine.
- The subnet mask value of both primary and secondary servers should be the same as that of the subnet mask value of the common IP.
- During configuration process, make sure the Key Manager Plus service is not running.
Steps to configure failover service
Step 1: Set up primary and standby servers
Install Key Manager Plus in two machines. One will act as the primary server and the other will act as the standby server.
(You can choose which machines should act as primary / secondary through a configuration later.)
Step 2: Database setup
Failover service can be configured only with MS SQL clusters as back end database. To configure MS SQL as your backend database, refer to this section of the help documentation.
Step 3: Set up failover service in your primary installation
To set up failover service in your primary installation,
- Stop Key Manager Plus service in your primary server.
- Open the command prompt with administrative privileges, and navigate to <kmp installation="" folder="">/bin directory. </kmp>
- Run the script: FOSSetup.bat
- A pop-up opens and enter the details as specified below for each field:
- Common IP: Assign a common IP address for both the Primary and Standby servers, so that the Key Manager Plus web interface could always be connected to this specific IP. The Key Manager Plus server will be bound by this single public IP and irrespective of whether Key Manager Plus is running as Primary or Standby, end-users can connect to the same public IP. The common IP that you enter here should be static and not be assigned to any other machine.
- Common IP Netmask: Specify the subnet mask value of the common IP.
- Standby IP: Enter the IP address of the standby server. This step ensures that the primary knows where the standby is running and vice-versa.
- Network Connection Type: Ensure that both primary and secondary servers rest on the chosen network.
Once you enter the details and click Save. The configuration settings will be created as a .zip file in primary. This configuration pack will be named as FOSPack.zip and placed under the directory: Key_Manager_Plus_Primary_Installation_Folder>/FailoverService. With this, the failover service configuration in the primary server is complete. To configure FOS in the standby, the first step is to copy this .zip file and place it in the Key Manager Plus standby installation home directory.
Step 4: Set up failover service in your secondary installation
To set up failover service in the standby server,
- Open the command prompt with administrative privileges, and navigate to /bin directory.
- Run the script: ConfigureStandbyFOS.bat<file-path> passing the location of FOS configuration settings pack .zip file as the command line argument. Once unzipped, FOS instance will get installed in the standby installation as well.
- Once the FOS settings pack has been unzipped and installed in the Standby, copy the pmp_key.key file, which contains the master encryption key, from primary server and place it in the secondary server and map the path location to <Key Manager Plus installation folder>/conf/manage_key.conf file)
1.Key Manager Plus License: Normally, when the FOS Settings file is unzipped in the standby, the Key Manager Plus license will also get automatically reflected respectively. Therefore, standby does NOT require a separate license file. You can use the same license you purchased for primary. On the other hand, if you are changing your Key Manager Plus license in the future, the same will not get reflected in the standby server. In that case, you need to apply the license file in the standby as a separate step.
2. Installing server certificate for standby server: To get the standby server running, it is vital to import the server certificate from the primary server into the standby server. To import server certificate into the standby server, open command prompt, navigate to <Key_Manager_Plus_Secondary_Installation_Folder>/bin and execute the command: importcert.bat <server_certificate_path>. Ensure that the server certificate is a .cer file.
Step 5: Start failover service in the primary and standby servers
After configuring FOS in both the servers, start the Key Manager Plus service in both the servers from the Windows services panel. A common static IP is used to access the application. e.g., https://<Common ip>:<Port>. When the primary server goes down, the standby server will get started.
Uninstalling Failover Service
You can deactivate the failover service either from the primary or the standby server.
- Navigate to <Key_Manager_Plus_Installation_Folder>/bin using command prompt in either of the servers.
- Execute the following script: UninstallFOS.bat
- The failover service will get deactivated.