Set up AE servers for HA
AE can work with HA if the following setup is made to create AE cluster.
To enable AE HA, make the following configuration changes:
Common domain prerequisite
All machines involved in HA should be in the same domain. The Operating System Log On users managing the services should also be in the same domain.
AE Engine (aeengine) application
- Prerequisite: The clocks on all server machines in the cluster should be synchronized. A maximum permissible time deviation is 15 seconds.
- As per the setup, two AE Engine applications, running on two different machines, will share the database and the working directory. The AE server needs a system variable AE_HOME to point to the working directory.
- For HA setup, ensure to have shared working directory for all the servers in the cluster. The AE_HOME variables on all AE machines should point to the shared directory.
- Database can be deployed on one of the machines where AE Engine applications are deployed. The Log On user of the AutomationEdge Tomcat services must have write permission on Shared Directories.
- Open and edit
<AE_HOME>/conf/ae.properties
file. Update following properties with the appropriate values as per your environment:- ae.clusters.members: Comma separated list of AE Server(s) IP/Host in the cluster.
- ae.clusters.port: A port number used by AE for synchronizing hosts within the cluster, default and preferred value is 5900.
- To allow non-local connections to PostgreSQL DB, you need to add more host records in the PostgreSQL configuration file named pg_hba.conf. You can find it in the following directory:
<POSTGRES_HOME>/data/
. - Open pg_hba.conf file and add following lines under # IPv4 local connections
----
----
TYPE DATABASE USER ADDRESS METHOD
#IPv4 local connections:
Host all all 127.0.0.1/32 md5
Host all postgres 10.41.16.72 md5
Host all postgres 10.41.4.50 md5
----
PostgreSQL will allow connection to postgres user on 10.41.16.72 and 10.41.4.50, where AutomationEdge Engine applications are deployed
- Update database.properties file in the AE_HOME/conf directory with the IP address of the machine where the DB is installed.
- Create a shared working directory in the network or a use shared storage location. Map the shared working directory as a network drive or a network shared location. On all the machines in the cluster, AE_HOME variable should point to the mapped network drive.
AE Agent
- Sign in to AE as a System Administrator.
- In the Settings tab, add or edit the server URL to point to the machine where Nginx server is running.
For example, if Nginx server is running on a machine with the IP address 10.41.4.81 and port 80, the server URL will be: http://10.41.4.81:80
Agent downloaded after this setting will point to the Nginx server automatically.
Downloading AE Agent may take a longer time in some HA instances that use shared drive between the HA nodes. Following are the corrective actions:
- Good Network connectivity should be present between HA nodes and the shared drive.
- Set proxy_send_timeout configuration parameter value considering the maximum time taken to fulfill any request through nginx.
- For complete list of configuration, see Nginx resources.