Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NodeIP addressingPort / Protocol
Apache LB10.60.13.1080 or 443
ZooKeeper node10.60.13.102181
API node1192.168.2.1008010
UI node1192.168.2.10080
API node2192.168.2.1018010
UI node2192.168.2.10180

...

Code Block
abiquo.server.api.location = https://abiquouiabiquo.example.com/api

You will need to edit file /opt/abiquo/tomcat/conf/Catalina/localhost/api.xml and set the values for the MySQL kinton database:

...

Code Block
"config.endpoint": "https://abiquouiabiquo.example.com/api",

*** In this setup, maybe it would be nice that by default each UI users the API hosted in the same node and in case of API failure, balance petitions to other nodes. This should be configurable at LB level I guess. *** 

Tomcat configuration

First of all, we will configure a couple of Tomcats to listen to regular HTTP and AJP connections. Make sure the jvmRoute parameter is different in each host as this will be used by Apache tomcat to route requests to each host.
To do that, edit the conf/server.xml file inside the tomcat directory and edit the following values:

Code Block
<Connector<Engine portname="8009Catalina" protocoldefaultHost="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
 
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
 
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node1">
Make sure the jvmRoute parameter is different in each host as this will be used by Apache tomcat to route requests to each host.
localhost" jvmRoute="node1">

 

Restart tomcat after the change to apply new configuration.

...

First, you need to make sure that Apache's required modules are loaded. Be sure to include the following lines in your Apache config file:

Code Block
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_balancer_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_balancerconnect.so
LoadModule proxy_ftpajp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Now in the node running apache create a new config file in /etc/httpd/conf.d/api-balancer.conf with the following contents:

Code Block
_ajp.so

Now in the node running apache create a new config file in /etc/httpd/conf.d/api-balancer.conf with the following contents:

Code Block
<VirtualHost *:443>
	ServerName abiquo.example.com
	SSLEngine on
	SSLProtocol all -SSLv2
	SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
	SSLCertificateFile /etc/pki/tls/certs/abiquo.example.com.crt
	SSLCertificateKeyFile /etc/pki/tls/private/abiquo.example.com.key
	# Enable the balancer manager console in the server root
<Location />
    SetHandler balancer-manager
</Location>


	<Location />
		SetHandler balancer-manager
	</Location>
	# Configure the API AJP cluster nodes
	<Proxy balancer://api-cluster>
		BalancerMember ajp://10.60.13.39:8010 route=node1 ping=1
		BalancerMember ajp://10.60.13.39:8010 route=node2 ping=1
	</Proxy>
	# Configure the UI HTTP cluster nodes
	<Proxy balancer://ui-cluster>
  
 		BalancerMember ajphttp://19210.16860.213.100:801039 route=node1 ping=1
    		BalancerMember ajphttp://19210.16860.213.101:801025 route=node2 ping=1
	</Proxy>

	# Configure the modules we want to load balance
	ProxyPass /api/			    balancer://api-cluster/api/
	ProxyPass /client-premiumui/			balancer://ui-cluster/client-premiumui/ stickysession=JSESSIONID|jsessionid
</VirtualHost>

Restart or reload your Apache server to apply new configuration.

...