liferay 6.1 and solr 4 in cluster

19
Installing Liferay 6.1 and SOLR 4 in cluster Israel Olalla @iolalla

Upload: israel-olalla

Post on 13-Dec-2014

2.746 views

Category:

Technology


6 download

DESCRIPTION

Liferay 6.1 and solr 4 in cluster

TRANSCRIPT

Page 1: Liferay 6.1 and solr 4 in cluster

Installing Liferay 6.1 and SOLR 4 in cluster

Israel Olalla

@iolalla

Page 2: Liferay 6.1 and solr 4 in cluster

2

Looking for inspiration

“Only a life lived for others is a life worthwhile.”

Albert Einstein

Page 3: Liferay 6.1 and solr 4 in cluster

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

Page 4: Liferay 6.1 and solr 4 in cluster

4

OLD Liferay Reference Architecture

Page 5: Liferay 6.1 and solr 4 in cluster

5

New Liferay Reference Architecture

Page 6: Liferay 6.1 and solr 4 in cluster

6

Configuring Zookeeper and SOLR

1. Configure the zookeeper cluster: http://zookeeper.apache.org/

Page 7: Liferay 6.1 and solr 4 in cluster

7

Configuring Zookeeper and SOLR

1. Configure the zookeeper cluster: http://zookeeper.apache.org/

2. Adapt solrconfig.xml to the new replication scenario

Page 8: Liferay 6.1 and solr 4 in cluster

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

Page 9: Liferay 6.1 and solr 4 in cluster

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

Page 10: Liferay 6.1 and solr 4 in 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

Page 11: Liferay 6.1 and solr 4 in 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

Page 12: Liferay 6.1 and solr 4 in 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

Page 13: Liferay 6.1 and solr 4 in cluster

13

Configuring Zookeeper and SOLR

Page 14: Liferay 6.1 and solr 4 in cluster

14

Configuring Liferay

1. Choose the right solr-web plugin, yes the one that supports zookeeper

Page 15: Liferay 6.1 and solr 4 in cluster

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

Page 16: Liferay 6.1 and solr 4 in 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.

Page 17: Liferay 6.1 and solr 4 in 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

Page 18: Liferay 6.1 and solr 4 in cluster

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.

Page 19: Liferay 6.1 and solr 4 in cluster

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