Product Documentation

Configuring High Availability

Oct 20, 2015

If you deploy two App Controller virtual machines (VM), you can deploy them in a high availability configuration. You configure one App Controller VM as the primary role and the other VM as the secondary role. In this deployment, the primary App Controller VM listens for requests, and serves user requests. The secondary VM synchronizes its data with the data on the primary App Controller VM. The two VMs work as an active-passive pair, in which only one VM is active at a time.

If the current primary App Controller VM stops responding for any reason, the current secondary App Controller VM takes over and becomes the active VM. The new primary App Controller begins to serve user requests.

You configure each instance of App Controller with an individual IP address. Each App Controller in the pair is also assigned with the same virtual IP address, which is used by the active App Controller. Users connect to the primary App Controller VM by using a fully qualified domain name (FQDN) that resolves to the virtual IP address.

In App Controller, you use the Console tab in XenCenter or a Secure Shell (SSH) client, such as PuTTY, to prepare two App Controller VMs for high availability. When you configure high availability, you configure the following settings:

  • Select the role preference that defines the primary and secondary VM.
  • Select the virtual IP address (primary only) and peer IP address along with a shared key.
  • Enable or disable high availability.
  • Show the status of each VM in the pair.
  • Force failover to the secondary VM from the current primary VM.

How App Controller High Availability Works

When you configure App Controller for high availability, the two virtual machines (VMs) communicate by using TCP port 9736. Each VM in an App Controller high availability pair generates a heartbeat message at one second intervals. You can view the status of the VMs by using the App Controller command line. The heartbeat service running on the two VMs monitors the health of each App Controller system and the health of the high availability pair.

If the primary App Controller VM fails for any reason, the secondary VM immediately takes over as the primary VM. If the active VM does not respond or reports a failure, the passive VM acquires the virtual IP address and becomes active.

When the failed VM comes back online, it joins with the current active VM and becomes the passive VM. The passive VM then synchronizes with the data from the active VM.

Before you configure an high availability pair, do the following:

  • Install the same build version for each App Controller virtual machine (VM).
  • Install both VMs in the same network subnet.
  • Assign IP addresses from the same subnet to each VM in the pair.
The basic steps for configuring high availability are as follows:
  • Identify which VM is the primary role and which VM is the secondary role.
  • Configure the virtual IP address, the peer IP address, and shared key on the primary VM.
  • When you finish configuring high availability on the primary VM, configure the peer IP address and shared key on the secondary VM.

To prepare each VM for high availability in App Controller, you use the command-line console to configure the settings. You can log on to the command-line console by using the Console tab in XenCenter or vSphere. You can also log on to App Controller by using a command-line tool, such as PuTTY. You must enable SSH in App Controller to use PuTTY.

Configuring the Primary and Secondary App Controller Virtual Machines

When you configure high availability, each App Controller virtual machine (VM) must be running the same version and build. You configure the primary VM first with the following settings:

  • Virtual IP address
  • Peer IP address
  • Shared key

You need to configure the primary and secondary VM. After you configure these settings, you enable high availability on each VM.

If you need to make changes to the primary App Controller, you can force failover to the secondary App Controller. The primary VM has the option to force failover. When you force failover to the secondary VM, the option to force failover appears on the new primary VM and disappears from the new secondary VM.

To configure the primary App Controller

  1. Log on to the primary App Controller by using the command line.
  2. At the command prompt, press 1 to enter high availability and then press ENTER.
  3. At the command prompt, press 1 and then press ENTER to set the VM role preference as the primary.
  4. At the command prompt, press 2 and then press ENTER to set the virtual IP address (on the primary only), peer IP address, and shared key.
  5. Press y to commit the changes.
  6. At the command prompt, press 3 and then press ENTER to enable high availability.

To configure the secondary App Controller

  1. Log on to the secondary App Controller by using the command line.
  2. At the command prompt, press 1 to enter high availability and then press ENTER.
  3. At the command prompt, press 1 and then press ENTER to set the VM role preference as the secondary.
  4. At the command prompt, press 2 and then press ENTER to set the peer IP address and shared key. Make sure the shared key matches with the one configured for the primary.
  5. Press y to commit the changes.
  6. At the command prompt, press 3 and then press ENTER to enable high availability.

When you configure high availability on for the primary App Controller VM, the option to force failover to the secondary VM appears.

To force failover to the secondary appliance

  1. Log on to the primary App Controller by using the command line.
  2. At the command prompt, press 1 and then press ENTER.
  3. At the command prompt, press 5 and then press ENTER to force failover to the secondary App Controller.

Migrating a High Availability Pair to App Controller 2.9

You can upgrade two App Controller virtual machine (VMs) in a high availability pair from App Controller 2.8 to App Controller 2.9. You can migrate each VM by using one of two methods:

  • Upgrading each VM in the pair.
  • Installing two new instances of App Controller on your hypervisor.

App Controller provides 50 gigabytes (GB) of disk space. If you upgrade each VM in the pair, each instance has 50 GB of disk space.

If you install new instances of App Controller, you can use the same IP addresses that you used for AppController 2.6 or App Controller 2.8. When you install new instances, you install and configure the VM by using the instructions in Installing App Controller. Then, you can use the command-line console to create the high availability pair with App Controller 2.9.

To upgrade App Controller in a high availability pair

In this procedure, the primary node is called A and the secondary node is B.

  1. Shut down node B in the high availability pair.
  2. Upgrade node A by using the instructions in Updating App Controller.
  3. When the upgrade is finished, restart node A and then shut down node A.
  4. Start node B, repeat Step 2 for node B and then restart node B. When you restart node B, it becomes the primary node.
  5. Start A node. When you start node A, it becomes the secondary node.

After you upgrade and restart both nodes, the VMs automatically join to create the high availability pair.

Backing Up and Restoring Snapshots in an High Availability Pair

You can back up and restore snapshots in a high availability pair. To do so, you need to make sure the configuration on both App Controller virtual machines (VMs) is the same. You export the snapshot from the current, primary App Controller. Then, you shut down the secondary App Controller. Then, you import the snapshot to the primary node and restart App Controller.

To back up and restore snapshots in a high availability pair

  1. Export the snapshot from the current primary node in the pair.

    For more information, see Creating Snapshots of the App Controller Configuration.

  2. Shut down the secondary node in the pair.
  3. Import the snapshot to the single master node.

    For more information, see To import a snapshot.

  4. Restart App Controller.
  5. On the primary App Controller, log on to the command-line console and verify that the IP address is correct. If the IP address is correct, proceed to Step 7. If not, perform Step 6 and then Step 7.
  6. Disable high availability by using the command-line console.
    1. At the command prompt, type 1 to enter high availability.
    2. At the command prompt, type 3 and then press ENTER to disable high availability.
    3. Type y to confirm you want to disable high availability.
    4. At the command prompt, type 0 and then press ENTER to return to the main menu.
    5. At the command prompt, type 0 and then press ENTER to enter Express Setup.
    6. At the command prompt, type 1 and then press ENTER to configure the IP address and subnet mask.
    7. At the command prompt, type 5 and then press ENTER to save your changes.

      When you press ENTER, App Controller restarts. Log on to the command-line console again to complete the following steps.

    8. At the command prompt, type 0 and then press ENTER to return to the main menu.
    9. At the command prompt, type 1 and then press ENTER to enter high availability.
    10. At the command prompt, type 3 and then press ENTER to enable high availability.
    11. Type y to confirm you want to enable high availability.
  7. Start the secondary App Controller.

    When you start the secondary App Controller, both nodes in the high availability pair are synchronized.