Forge Home

solr

Installs and configures the Solr search platform

9,145 downloads

781 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 3.1.1 (latest)
  • 3.1.0
  • 3.0.0
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.0.0
released Nov 1st 2022
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0 < 8.0.0
  • , , ,
This module has been deprecated by its author since Jul 11th 2023.

The reason given was: new maintainer

The author has suggested markt-solr as its replacement.

Start using this module

Documentation

fraenki/solr — version 3.1.1 Nov 1st 2022

puppet-solr

Build Status Puppet Forge Puppet Forge - downloads

Table of Contents

  1. Overview
  2. Requirements
  3. Usage
  4. Reference
  5. Reference
  6. Development
  7. License and Copyright

Overview

This module will install and configure the Solr search platform.

Requirements

  • Puppet 6 or higher
  • Java 8 or higher (depending on the Solr version)
  • Tested with Solr 7, 8 and 9

It is recommended to use puppetlabs/java to manage the Java installation.

Usage

Beginning with Solr

Install Solr with default settings and start the service afterwards:

class { 'solr':
    version => '9.0.0',
}

Furthermore, a number of simple options are available:

class { 'solr':
    version => '9.0.0',

    # Allow automatic upgrades (when changing $version)
    upgrade => true,

    # Network settings
    solr_port => 8983,
    solr_host => $facts['networking']['fqdn'],

    # Use custom installation and data directories
    extract_dir => '/opt',
    install_dir => '/opt/solr-9.0.0',
    var_dir     => '/opt/solr-home',
    log_dir     => '/opt/solr-home/log',
    solr_home   => '/opt/solr-home/data',

    # Change Solr runtime parameters
    java_mem  => '-Xms2g -Xmx8g',
    solr_time => 'Europe/Berlin',
    solr_opts => [
      '-Duser.language=de',
      '-Duser.country=DE',
    ],

    # Use an alternative download location (for old versions)
    mirror => 'https://archive.apache.org/dist/lucene/solr/',
}

Test Solr

Use cURL to test if Solr is running:

curl -v http://localhost:8983/solr/

(Or use your browser for more convenience.)

Solr Cloud

This module makes it pretty easy to configure Solr Cloud:

class { 'solr':
    version     => '9.0.0',
    # Setup Solr cloud
    cloud       => true,
    zk_chroot   => 'foo',
    zk_ensemble => 'zookeeper1.example.com:2181,zookeeper2.example.com:2181,zookeeper3.example.com:2181',
    zk_timeout  => 15000,
}

It is recommended to use deric/puppet-zookeeper to manage the ZooKeeper nodes.

Custom Plugins

When using Solr Cloud, you may use this module to manage your custom plugins with Puppet (instead of using the API):

class { 'solr':
    version     => '9.0.0',
    # Setup Solr cloud
    cloud       => true,
    ...
    # Manage custom plugins
    manage_custom_plugins => true,
    custom_plugin_id      => 'solr.custom_plugins.dir',
    custom_plugins        => [
      {
        source        => 'https://my.example.com/company_solr_plugins.tgz',
        extract       => true,
        creates       => 'company-search-enhancer-1.0.jar',
        checksum_type => 'md5',
        checksum      => 'a5d3ae0781765a702ca274191a4d7c97',
      },
      {
        source        => 'https://my.example.com/more_solr_plugins.tgz',
        extract       => true,
        creates       => 'my-private-plugin-2.0.jar',
        checksum_type => 'md5',
        checksum      => '7a4e95b26ac41250f8a65c4bf4dd1d25',
      }
    ]
}

As you can see, the $custom_plugins parameter expects options in a format that is compatible with voxpupuli/archive.

All custom plugins will automatically be installed and Solr will then be restarted. A new environment variable is added to Solr's startup options which points to the custom plugins directory. The name of this variable can be adjusted by altering the $custom_plugin_id parameter.

Note that you need to reference the $custom_plugin_id environment variable in your configuration in order to actually load the custom plugins in your Solr Core:

<config>
  <lib dir="${solr.custom_plugins.dir}" />
  ...
</config>

Reference

Classes and parameters are documented in REFERENCE.md.

Development

Contributing

Please use the GitHub issues functionality to report any bugs or requests for new features. Feel free to fork and submit pull requests for potential contributions.

License and Copyright

Copyright (C) 2016-2022 Frank Wall github@moov.de

Copyright (C) 2015-2016 Paul Bailey

See the LICENSE file at the top-level directory of this distribution.