Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

AppFormix MultiCluster Proxy

 

Overview

With the MultiCluster Proxy feature, the master AppFormix Controller is capable of redirecting requests through a proxy container so that requests to different clusters in the MultiCluster environment can be made through the master cluster.

The use case for this MultiCluster Proxy mode is when not all clusters in the MultiCluster environment can be accessed by the user directly. This mode can be enabled so that all requests go through a proxy container exposed on the master AppFormix Controller node. This proxy container will then reroute the request to the appropriate cluster and deliver back the response to the client.

The default MultiCluster View does not support this proxy behavior and can only be used in situations where the client/browser have access to all clusters in the MultiCluster environment. MultiCluster Proxy is a second mode of MultiCluster that allows this limited connectivity to work where the client only needs access to the master cluster.

Requirements

  • AppFormix installed on all of the clusters.

  • Deploy Master AppFormix Controller node with a MultiClusterProxy enabled license.

  • Master AppFormix Controller node must have connectivity to all of the clusters that are a part of the MultiCluster environment.

Ansible

Ansible Playbooks

appformix_proxy_add_cluster.ymlPlaybook to add cluster to the MultiCluster Proxy enabled AppFormix.
appformix_proxy_delete_cluster.ymlPlaybook to delete cluster from the MultiCluster Proxy enabled AppFormix.

Ansible Roles

  • appformix_multicluster_config—Role to add or remove clusters from AppFormix Controller.

    Requires the following variables be defined:

    • cluster_name

    • cluster_controller_host

    • cluster_controller_port

    • cluster_auth_type

    • cluster_username

    • cluster_password

    • cluster_token

    • is_master_cluster

    The cluster_username and cluster_password can not be set concurrently with cluster_token. If the license for a cluster supports authentication with username/password, then cluster_username and cluster_password can be set.

    • If cluster_username and cluster_password are set, set cluster_token to empty string (“”).

    • If cluster_token is set, sets both cluster_username and cluster_password to empty string (“”).

    Example:

  • appformix_multicluster_haproxy—Role to configure or modify proxy container each time a cluster is added or removed.

MultiCluster Proxy Deployment Workflow

Deploying the MultiCluster Proxy feature consists of the following steps:

  1. Install AppFormix on all the clusters.

    1. We recommend installing the same AppFormix version to all clusters.

    2. Master cluster is required to be deployed with a “multicluster proxy” enabled software license.

  2. In inventory/group_vars/all, provide the information for master node first. Refer to Ansible Roles for the sample inventory entry. Confirm that is_master_cluster is set to True.

  3. Run the playbook appformix_proxy_add_cluster.yml to add this cluster as master cluster. Refer to Ansible Playbooks.

  4. For adding other clusters, make an inventory entry as shown in Ansible Roles (with is_master_cluster set to False). After each entry, run the playbook appformix_proxy_add_cluster.yml to add this cluster. Refer to Ansible Playbooks.

  5. Open the Dashboard for the MultiCluster setup in a Web browser. For example:

    http://<master-cluster-IP>:18081

Deleting a cluster:

  1. Keep the inventory entry of the cluster that needs to be deleted, having the other clusters’ inventory entry commented out.
  2. Run the playbook appformix_proxy_delete_cluster.yml to delete the cluster. See Ansible Playbooks.Note

    Removing the master cluster, removes the proxy container as well.

Overview of v2 API URLS

GET /appformix/analytics/v2.0/cluster_statsReturns cluster statistics for the cluster.
GET /appformix/controller/v2.0/clustersReturns a list of all clusters added to Appformix MultiCluster.
GET /appformix/controller/v2.0/clusters/<cluster_id>Returns information of a cluster added to Appformix MultiCluster with cluster_id.

Make GET Query with Appformix MultiCluster Proxy

Call GET /appformix/controller/v2.0/clusters to identify which cluster you would like to query. Take note of the ClusterId.

Make the GET queries by entering the following commands:

URL format:

Then enter:

Example:

To get hosts from a cluster with ID b50adf04-4c07-11e9-b016-0242ac120005, whose AppFormix master_auth_token is d90f9d18-4c07-11e9-9545-0242ac120005, with a MultiCluster master IP as 10.1.1.2, do the following:

Note

Make sure that you use the correct AppFormix token for corresponding clusters. The AppFormix token can be found at /opt/appformix/etc/appformix_token.rst in AppFormix controller node of that cluster.