Liferay 6.1 and solr 4 in cluster
-
Upload
israel-olalla -
Category
Technology
-
view
2.746 -
download
6
description
Transcript of Liferay 6.1 and solr 4 in cluster
Installing Liferay 6.1 and SOLR 4 in cluster
Israel Olalla
@iolalla
2
Looking for inspiration
“Only a life lived for others is a life worthwhile.”
Albert Einstein
3
What we want to get?
• Index and search all the content from Liferay• No single point of failure• Simple to manage: simple to add new machines, stop one and add
one to the cluster• As cheap as possible: No Expensive HW or software to control the
cluster.• Manage index and configuration with the same system
4
OLD Liferay Reference Architecture
5
New Liferay Reference Architecture
6
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
7
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
8
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
3. Adapt schema.xml to support Liferay
9
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
3. Adapt schema.xml to support Liferay
4. Configure Tomcat to connect to the zookeeper cluster
5. Start the zookeeper cluster
10
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
3. Adapt schema.xml to support Liferay
4. Configure Tomcat to connect to the zookeeper cluster
11
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
3. Adapt schema.xml to support Liferay
4. Configure Tomcat to connect to the zookeeper cluster
5. Start the zookeeper cluster
12
Configuring Zookeeper and SOLR
1. Configure the zookeeper cluster: http://zookeeper.apache.org/
2. Adapt solrconfig.xml to the new replication scenario
3. Adapt schema.xml to support Liferay
4. Configure Tomcat to connect to the zookeeper cluster
5. Start the zookeeper cluster
6. Start the SOLR Cluster
13
Configuring Zookeeper and SOLR
14
Configuring Liferay
1. Choose the right solr-web plugin, yes the one that supports zookeeper
15
Configuring Liferay
1. Choose the right solr-web plugin, yes the one that supports zookeeper
2. Configure the solr-spring.xml to point to the zookeeper cluster
16
Configuring Liferay
1. Choose the right solr-web plugin, yes the one that supports zookeeper
2. Configure the solr-spring.xml to point to the zookeeper cluster
3. Start the liferay cluster.
17
Where we can get it?
• At the writing of this presentation, the plugin to work with zookeeper is not integrated yet with the liferay plugins head maybe in the future will end there but know you have to use this fork: https://github.com/iolalla/liferay-plugins/tree/master/webs/solr-web
• If you want to find more instructions to compile/modify the code or just the final war, please read this post: http://israelolalla.blogspot.com.es/2012/11/liferay-61-solr-4-zookeeper-massive.html
18
Summary
Pros:• Architecture is 100% active, all machines are
candidates for Master, in the index or search process.• 100% shared nothing architecture, no need for
network shares, NFS, etc..• We can manage the configuration files centrally.• Architecture that is self Multi Master, ie if the Master
fall, cluster itself choose the new Master.• Very efficient replication copies files and indices.
Cons:• There is a bit more RAM and CPU consumption by the
new process.
19
Want to innovate?
Contact with iSOCOWhere we are?
Barcelona
Tel +34 935 677 200
Av. Torre Blanca, 57
Edificio ESADE CREAPOLIS
Oficina 3C 15
08172 Sant Cugat del Vallès
Barcelona
Madrid
Tel +34 913 349 797
Av. del Partenón, 16-18, 1º7ª
Campo de las Naciones
28042 Madrid
Valencia
Tel +34 963 467 143
Oficina 107
C/ Prof. Beltrán Báguena, 4
46009 Valencia
Pamplona
Tel +34 948 102 408
Parque Tomás
Caballero, 2, 6º4ª
31006 Pamplona