DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Follow the steps given below to set up the LVS load balancer:
Follow the steps given below to spawn the instance:
Define the virtual IP and the subnet mask under the subscribable information property in the Application cartridge JSON file, if the cartridge needs to use LVS.
For more information on the cartridge resource definition, see Cartridge Resource Definition.
Example:
Identify the virtual IP and the subnet mask from the lvsVirtualIP:192.168.30.30|255.255.255.0.
To get a better understanding, try out the sample applications.
For more information on how to deploy the sample application via the script, see Deploying a Sample Application with the Script.
The Apache Stratos LVS Extension is used to integrate the LVS load balancer with Apache Stratos. Follow the steps given below to proceed with the installation:
Install Keepalived and IPVSADM.
apt-get install keepalived ipvsadm
Extract the org.apache.stratos.lvs.extension-4.1.x-SNAPSHOT.zip file, which is in the <STRATOS_SOURCE_HOME>/extensions/load-balancer/lvs-extension/target directory, to a desired location such as
<LVS-EXTENSION-HOME>.
Update the following system properties found in the l vs-extension.sh file, which is in the <LVS-EXTENSION-HOME>/bin directory.
It is required that you set-up two LVS servers. One server will be used to pass the server.state to the LVS Master, while the other will be used as a backup.
# Keepalived configuration file location: -Dconf.file.path=/etc/keepalived/keepalived.conf # Enable/disable cep statistics publisher: -Dcep.stats.publisher.enabled=false # If cep statistics publisher is enabled define the following properties: -Dthrift.receiver.ip=127.0.0.1 -Dthrift.receiver.port=7615 -Dnetwork.partition.id=network-partition-1 # LVS server Virtual IP set for services -Dlvs.service.virtualip.set=tomcat2|192.168.56.40,tomcat1|192.168.56.41,tomcat|192.168.56.40 # Server state (MASTER|BACKUP) -Dserver.state=MASTER
Update the fields under message broker in the jndi.properties file, which is in the <LVS-EXTENSION-HOME>/conf file.
java.naming.provider.url=tcp://<STRATOS_HOST>:<STRATOS_HTTPS_PORT>
<STRATOS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.<STRATOS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.Navigate to the <lvs-extension-home>/bin directory and start the LVS load balancer.
Only a user having the super tenant user permissions, can excuse the following command.
./lvs-extension.sh
The following sample information will be displayed in the console having the LVS extension.
[2015-05-27 18:31:06,693] INFO - [LoadBalancerCommonTopologyEventReceiver] Load balancer topology receiver thread started [2015-05-27 18:31:06,693] INFO - [LoadBalancerExtension] Topology receiver thread started [2015-05-27 18:31:06,693] INFO - [TopologyEventMessageDelegator] Topology event message delegator started [2015-05-27 18:31:06,706] INFO - [LoadBalancerExtension] Application signup event receiver thread started [2015-05-27 18:31:06,706] INFO - [ApplicationSignUpEventMessageDelegator] Application signup event message delegator started [2015-05-27 18:31:06,714] INFO - [LoadBalancerExtension] Domain mapping event receiver thread started [2015-05-27 18:31:06,714] WARN - [LoadBalancerExtension] Load balancer statistics reader not found [2015-05-27 18:31:06,715] INFO - [DomainMappingEventMessageDelegator] Domain mapping event message delegator started [2015-05-27 18:31:06,715] INFO - [LoadBalancerExtension] Waiting for complete topology event... [2015-05-27 18:31:34,912] INFO - [CompleteTopologyMessageProcessor] Topology initialized [2015-05-27 18:31:34,913] INFO - [TopologyProvider] Service added: [service] php [2015-05-27 18:31:34,914] INFO - [TopologyProvider] Cluster added to service: [service] php [cluster] single-cartridge-app.my-php.php.domain [hostnames] [single-cartridge-app.my-php.php.stratos.org] [2015-05-27 18:31:34,914] INFO - [TopologyProvider] Member added to cluster: [cluster] single-cartridge-app.my-php.php.domain [member] 10.0.0.5 [2015-05-27 18:31:34,914] INFO - [TopologyProvider] Member added to cluster: [cluster] single-cartridge-app.my-php.php.domain [member] 10.0.0.4 [2015-05-27 18:31:34,915] INFO - [TopologyProvider] Member added to cluster: [cluster] single-cartridge-app.my-php.php.domain [member] 10.0.0.3 [2015-05-27 18:31:34,915] INFO - [TopologyProvider] Member added to cluster: [cluster] single-cartridge-app.my-php.php.domain [member] 10.0.0.6 [2015-05-27 18:31:34,915] INFO - [LVS] Generating lvs configuration... [2015-05-27 18:31:34,992] INFO - [Main] Configuration written to file: /etc/keepalived/keepalived.conf [2015-05-27 18:31:34,992] INFO - [LVS] Starting lvs instance... [2015-05-27 18:31:36,008] INFO - [LVS] lvs instance started