Role Detail

geerlingguy.solr

Apache Solr for Linux.
Downloads
26806
Type Container Enabled
Minimum Ansible Version 2.2
Installation $ ansible-container install geerlingguy.solr
Tags
apache
container
development
lucene
search
solr
text
Last Commit 2017-09-28 04:26:04 AM UTC
Last Imported 2017-11-15 19:05:07 PM UTC
Version History
Version Release Date
3.6.3 2017-08-01 13:20:01 PM
3.6.2 2017-07-12 19:59:07 PM
3.6.1 2017-07-10 00:46:12 AM
3.6.0 2017-06-30 04:16:04 AM
3.5.5 2017-04-14 17:35:05 PM
3.5.4 2017-04-06 13:48:01 PM
3.5.3 2017-04-04 14:25:02 PM
3.5.2 2017-03-30 21:01:09 PM
3.5.1 2017-02-16 04:35:04 AM
3.5.0 2017-02-15 05:27:05 AM
3.4.2 2017-01-19 16:01:04 PM
3.4.1 2016-12-16 17:04:05 PM
3.4.0 2016-11-30 22:02:10 PM
3.3.1 2016-11-24 16:07:04 PM
3.3.0 2016-11-24 16:06:04 PM
3.2.4 2016-11-24 16:04:04 PM
3.2.3 2016-11-23 18:03:06 PM
3.2.2 2016-11-14 15:16:03 PM
3.2.1 2016-09-25 20:51:08 PM
3.2.0 2016-09-16 18:59:06 PM
3.1.3 2016-07-24 23:37:11 PM
3.1.2 2016-07-24 04:41:04 AM
3.1.1 2016-07-24 04:27:04 AM
3.1.0 2016-06-02 18:10:06 PM
3.0.0 2016-05-31 03:21:03 AM
2.1.0 2016-04-11 15:23:03 PM
2.0.5 2016-03-08 16:15:04 PM
2.0.4 2015-12-03 16:32:04 PM
2.0.3 2015-11-10 16:51:04 PM
2.0.2 2015-11-10 16:25:04 PM
2.0.1 2015-04-22 02:42:02 AM
2.0.0 2015-03-28 13:33:01 PM
1.0.8 2014-11-11 16:47:04 PM
1.0.7 2014-08-06 17:40:05 PM
1.0.6 2014-08-01 20:43:08 PM
1.0.5 2014-07-14 14:24:02 PM
1.0.4 2014-05-08 15:01:03 PM
1.0.3 2014-03-18 02:40:02 AM
1.0.2 2014-03-17 02:44:02 AM
1.0.1 2014-03-17 02:43:02 AM
1.0.0 2014-03-05 15:13:03 PM
Supported Platforms
Platform Version
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 6
EL 7
Ubuntu artful
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
2017-11-15 19:05:07 PM UTC SUCCESS
2017-11-08 19:05:07 PM UTC SUCCESS
2017-11-02 09:36:09 AM UTC SUCCESS
2017-11-02 09:16:09 AM UTC SUCCESS
2017-11-02 09:08:09 AM UTC SUCCESS
2017-11-01 19:05:07 PM UTC SUCCESS
2017-10-25 19:15:07 PM UTC SUCCESS
2017-10-18 19:16:07 PM UTC SUCCESS
2017-10-11 19:03:07 PM UTC SUCCESS
2017-10-04 19:02:07 PM UTC SUCCESS

Ansible Role: Apache Solr

Build Status

Installs Apache Solr on Linux servers.

Requirements

Java must be available on the server. You can easily install Java using the geerlingguy.java role. Make sure the Java version installed meets the minimum requirements of Solr (e.g. Java 8 for Solr 6+).

This role is currently tested and working with Solr 3.x, 4.x, 5.x and 6.x.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

solr_workspace: /root

Files will be downloaded to this path on the remote server before being moved into place.

solr_create_user: true
solr_user: solr

Solr will be run under the solr_user. Set solr_create_user to false if solr_user is created before this role runs, or if you're using Solr 5+ and want Solr's own installation script to set up the user.

solr_version: "6.2.0"

The Apache Solr version to install. For a full list, see available Apache Solr versions.

solr_mirror: "https://archive.apache.org/dist"

The Apache Project mirror from which the Solr tarball will be downloaded. In case of slow download speed or timeouts it is useful to set the mirror to the one suggested by Apache's mirror download site.

solr_remove_cruft: false

Whether to remove unneccessary documentation and examples from the solr directory.

solr_service_manage: true
solr_service_name: solr
solr_service_state: started

By default, this role will manage the solr service, ensuring it is enabled at system boot and is running. You can ensure Solr is stopped by setting solr_service_state: stopped, or you can disable this role's management of the solr service entirely by setting solr_service_manage: true. You may also want to set solr_restart_handler_enabled: false (documented later) in this case.

solr_install_dir: /opt
solr_install_path: /opt/solr

The path where Apache Solr will be installed. For Solr 5+, the solr_install_dir will be used by Solr's installation script. For Solr < 5, the Solr installation files will be copied in place in the solr_install_path.

solr_home: /var/solr

The path where local Solr data (search collections and configuration) will be stored. Should typically be outside of the solr_path, to make Solr upgrades easier.

solr_port: "8983"

The port on which Solr will run.

solr_xms: "256M"
solr_xmx: "512M"

Memory settings for the JVM. These should be set as high as you can allow for best performance and to reduce the chance of Solr restarting itself due to OOM situations.

solr_timezone: "UTC"

Default timezone of JVM running solr. You can override this if needed when using dataimport and delta imports (ex: comparing against a MySQL external data source). Read through Apache Solr's Working with Dates documentation for more background.

solr_cores:
  - collection1

A list of cores / collections which should exist on the server. Each one will be created (if it doesn't exist already) using the default example configuration that ships with Solr. Note that this variable only applies when using Solr 5+.

solr_connect_host: localhost

The hostname or IP address on which Solr will be reachable. localhost should work in most circumstances, but there are special cases where you may only be able to access the local Solr instance via another IP or hostname.

solr_restart_handler_enabled: true

Whether the restart solr handler should be used or not. If you're building containers or AMIs, you might need to disable the restart handler for a provisioning run.

Variables used only for Solr < 5.

The following variables are currently only applied to installations of Solr 4 and below:

solr_log_file_path: /var/log/solr.log

Path where Solr log file will be created.

solr_host: "0.0.0.0"

The hostname or IP address to which Solr will bind. Defaults to 0.0.0.0 which allows Solr to listen on all interfaces.

Dependencies

None.

Example Playbook

- hosts: solr-servers
  roles:
    - geerlingguy.java
    - geerlingguy.solr

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

# See: https://github.com/geerlingguy/solr-container
solr:
  from: "debian:9"
  ports:
    - "8983:8983"
  command: ["/opt/solr/bin/solr", "start", "-f", "-force"]
  roles:
    - geerlingguy.java
    - geerlingguy.solr