AppFormix MultiCluster Proxy
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.
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.
appformix_proxy_add_cluster.yml—Playbook to add cluster to the MultiCluster Proxy enabled AppFormix.
appformix_proxy_delete_cluster.yml—Playbook to delete cluster from the MultiCluster Proxy enabled AppFormix.
appformix_multicluster_config—Role to add or remove clusters from AppFormix Controller.
Requires the following variables be defined:
cluster_passwordcan not be set concurrently with
cluster_token. If the license for a cluster supports authentication with username/password, then
cluster_passwordcan be set.
cluster_passwordare set, set
cluster_tokento empty string (“”).
cluster_tokenis set, sets both
cluster_passwordto empty string (“”).
cluster_name: <name of cluster> cluster_controller_host: <hostname or ip> cluster_controller_port: 9000 #(unless configured) cluster_auth_type: appformix cluster_username: “” cluster_password “” cluster_token: <appformix_token> #(can be found in controller_node: #/opt/appformix/etc/appformix_token.rst) is_master_cluster: <True/False> #(True for adding master node only)
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:
Install AppFormix on all the clusters.
We recommend installing the same AppFormix version to all clusters.
Master cluster is required to be deployed with a “multicluster proxy” enabled software license.
inventory/group_vars/all, provide the information for master node first. Refer to Ansible Roles for the sample inventory entry. Confirm that
is_master_clusteris set to True.
Run the playbook
appformix_proxy_add_cluster.ymlto add this cluster as master cluster. Refer to Ansible Playbooks.
For adding other clusters, make an inventory entry as shown in Ansible Roles (with
is_master_clusterset to False). After each entry, run the playbook
appformix_proxy_add_cluster.ymlto add this cluster. Refer to Ansible Playbooks.
Open the Dashboard for the MultiCluster setup in a Web browser. For example:
Deleting a cluster:
- Keep the inventory entry of the cluster that needs to be deleted, having the other clusters’ inventory entry commented out.
- Run the playbook
appformix_proxy_delete_cluster.ymlto delete the cluster. See Ansible Playbooks.
Removing the master cluster, removes the proxy container as well.
Overview of v2 API URLS
Make GET Query with Appformix MultiCluster Proxy
/appformix/controller/v2.0/clusters to identify which cluster you would like to query. Take note of
Make the GET queries by entering the following commands:
curl -X GET -H 'Content-Type: application/json' -H 'X-Auth-Type: appformix' -H 'X-Auth-Token: appformix_master_auth_token_for_cluster1' http://<master-cluster-IP>:18081/cluster/<cluster_Id>/appformix/controller/v2.0/<any_v2_end_point>
To get hosts from a cluster with ID
b50adf04-4c07-11e9-b016-0242ac120005, whose AppFormix
d90f9d18-4c07-11e9-9545-0242ac120005, with a MultiCluster
master IP as 10.1.1.2, do the following:
curl -X GET -H 'Content-Type: application/json' -H 'X-Auth-Type: appformix' -H 'X-Auth-Token: d90f9d18-4c07-11e9-9545-0242ac120005' http://10.1.1.2:18081/cluster/b50adf04-4c07-11e9-b016-0242ac120005/appformix/controller/v2.0/hosts
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.