Creating a KeyControl Mapping

A KeyControl Mapping lets you associate each KeyControl node with an externally-visible IP address or hostname.

You can create multiple KeyControl Mappings and associate those Mappings with one or Policy Agents. If a KeyControl node is added or removed, you can update the relevant KeyControl Mappings in the KeyControl webGUI and the changes are then disseminated to the VMs on their next heartbeat.

The first node in a KeyControl Mapping is considered the preferred node, and all VMs will use that node as long as it is available. If the preferred node goes offline, the VMs will use the next IP address in the list until the preferred node becomes available again.

Procedure 

  1. Log into the KeyControl webGUI on any node in the cluster using an account with Cloud Admin privileges.
  2. In the top menu bar, click Cloud.
  3. Click the Mappings tab.
  4. Select Actions > Create Mapping.
  5. On the Mapping tab, specify the options you want to use.

  6. When you are done, click Next.
  7. On the Servers tab, create an entry for the first KeyControl node by specifying the options you want to use.

  8. If you want to add another node, click the + button and enter the appropriate information.
  9. When you are done adding nodes, make sure that the order is correct. The VMs will attempt to contact the first node in the list. If the first is unavailable they will try to contact the second node, then the third, then the fourth and so on. If you need to change the order, click and hold on the arrow icon at the beginning of the line to drag the entry to the proper position. Release the mouse to drop the entry in the new location.
  10. When all nodes are included and the order is correct, click Create.
  11. At the Mapping Successfully Created message, click Close.
  12. If you want to associate the KeyControl Mapping with an existing VM that already has the Policy Agent installed:

    1. Log into the VM as an administrator.
    2. Enter the command hcl updatekc -a and enter the credentials for a KeyControl user account with Cloud Admin privileges at the prompt. KeyControl displays a list of available KeyControl Mapping that you can use with the VM.

    3. Select the KeyControl Mapping you want to use from the list. KeyControl echoes the IP addresses in the list for confirmation.

    Note: For details about specifying a KeyControl Mapping when you install KeyControl, see Linux Policy Agent Installation or Windows Policy Agent Installation.
  13. To associate the KeyControl Mapping with one or more Policy Agents, log into each server you want to associate with the KeyControl Mapping and enter the command hcl updatekc –a [-u username [-p password]], where:

    • -u is a KeyControl user account with Cloud Admin privileges. If you do not enter a user account name you will be prompted for one.
    • -p is the password for the KeyControl user account. If you do not enter a password you will be prompted for one.

    The Policy Agent then queries KeyControl for the list of available KeyControl Mappings. Type the number corresponding to the Mapping you want to use and press Enter.