Skip to content

Latest commit

 

History

History
87 lines (76 loc) · 3.06 KB

README.md

File metadata and controls

87 lines (76 loc) · 3.06 KB

Ansible role for installing multicore Apache Solr

This playbook is based on a great tutorial written by 2bits.

http://2bits.com/articles/configuring-apache-solr-4x-drupal-password-authentication.html

Thanks guys!

Disclaimer

Even if the script does some security related configuration I don't guarantee that your Solr instance or your server will be secure. You have ensure this yourself. Read the license!

Provides

  • Ansible playbook for running the role
  • Closest mirror fetching for Solr
  • Editable settings including
    • Solr version (default: 4.7.2)
    • System level user name
    • Installation path
    • Configuring core names and types (default/drupal)
  • Support for Drupal's Solr modules (apachesolr/search_api_solr)
    • Solr version 4.x only
    • Config files are fetched from search_api_solr/solr-conf/4.x
  • Vagrantfile for testing and development
  • Ansible hosts file that points to the Vagrant box

Requires

Usage - Vagrant

  1. Clone the repository
  2. Cd to the cloned folder and run:
$ vagrant up
  1. Run
$ ansible-playbook -i hosts play.yml --private-key=~/.vagrant.d/insecure_private_key
  1. After the script is run wait for a while for Apache Solr to start
  2. Navigate to http://192.168.56.107:8983/solr with your browser

Usage - Remote server

  1. Clone the repository
  2. Cd to the cloned folder
  3. Edit the hosts inventory file to point to your server
  4. Change the remote_user in the play.yml file
  5. Run
$ ansible-playbook -i hosts play.yml ...
  • You'll probably need to add -K to the end for prompting the sudo password
  • If you don't use SSH keys for logging in you may need to add other parameters also. Try -c paramiko and -k. See all the available options with ansible-playbook -h.

Tips

Start/stop/restart Solr
Login to the server using ssh. Then...

$ sudo service solr start/stop/restart

Settings

Default settings are stored in roles/jiv_e.solr/default/main.yml and you can find plenty of documentation there also.

You can change the settings by editing a default settings file but it's better to override them. See below list for some places you can do that.

  1. At the command line after ansible-playbook -e parameter
  2. In the hosts file
  3. In files host_vars/hostname or group_vars/groupname