Skip to content

Latest commit

 

History

History
640 lines (351 loc) · 12.1 KB

REFERENCE.md

File metadata and controls

640 lines (351 loc) · 12.1 KB

Reference

Table of Contents

Classes

  • solr: Installs solr using the embedded version of jetty.
  • solr::config: Full description of class solr here.
  • solr::install: Installs the packages and software that support solr.
  • solr::params: Dynamic parameters for the solr class.
  • solr::service: Manages the service for solr.

Defined types

  • solr::core: Sets up a core based on the example core installed by default.
  • solr::shared_lib: Downloads and installs a file into solr's lib directory.

Classes

solr

Configures solr and starts the service.

If using Centos, the firewall rules need to be configured as shown:

 add IP Tables
 /sbin/iptables -I INPUT 1 -p tcp --dport 8983 -j ACCEPT
 /sbin/service iptables save
 service iptables restart

Examples

include solr

Parameters

The following parameters are available in the solr class.

version

Data type: String

The version to install.

Default value: '6.6.6'

url

Data type: String

The url of the source repository for apache solr.

Default value: 'http://archive.apache.org/dist/lucene/solr/'

url_user

Data type: Optional[String]

If the URL is password protected, the user name.

Default value: undef

url_pass

Data type: Optional[String]

If the URL is password protected, the password.

Default value: undef

manage_user

Data type: Boolean

Whether to manage the solr user or not

Default value: true

solr_user

Data type: String

Run Solr as this user ID. Note, creates this user.

Default value: 'solr'

solr_host

Data type: String

Listen to connections from this network host Use 0.0.0.0 as solr_host to accept all connections.

Default value: '127.0.0.1'

solr_port

Data type: String

The network port used by Jetty

Default value: '8983'

solr_timezone

Data type: String

The timezone used by Jetty

Default value: 'UTC'

solr_heap

Data type: String

The heap size used by jetty.

Default value: '512m'

solr_java_mem

Data type: Optional[String]

If you want finer control over memory options, specify them directly with this variable. Arguments should be in the following format: "-Xms512m -Xmx512m" Note, the solr_heap parameter will not be used.

Default value: undef

solr_downloads

Data type: String

Contains the solr tarballs and extracted dirs.

Default value: '/opt/solr_downloads'

install_dir

Data type: String

The install directory (-i) parameter passed to the solr installer.

Default value: '/opt'

install_dir_mg

Data type: Boolean

Sets if this module should manage the install directory. True if this module should manage and false otherwise.

Default value: false

install_options

Data type: String

String of options to be passed to install_solr_service.sh script. The default option -n does not start Solr service after install, and does not abort on missing Java. Only valid for Solr version 6.3.0+. For versions less than 6.3.0, set to empty string.

Default value: '-n'

solr_home

Data type: String

The home directory for solr.

Default value: '/opt/solr/server/solr'

solr_options

Data type: Optional[Array]

Additional options added to java start command line in addition to other options.

Default value: undef

var_dir

Data type: String

The var directory for solr.

Default value: '/var/solr'

solr_logs

Data type: String

The directory for the solr logs.

Default value: '/var/log/solr'

java_home

Data type: String

The directory that contains the jvm. Default: (os specific)

  • Debian/Ubuntu: '/usr/lib/jvm/java-8-openjdk-amd64/jre'
  • CentOS/RHEL: '/usr/lib/jvm/jre-1.8.0'

Default value: $solr::params::java_home

manage_java

Data type: Boolean

True if this class should manage java and false if java is managed outside of this class.

Default value: true

solr_environment

Data type: Optional[Array]

Bash style environment variables passed at the end of the solr server environment.

Default value: undef

limit_nofile

Data type: Integer

Sets number of open files limit in systemd service file.

Default value: 65000

limit_nproc

Data type: Integer

Sets number of processes limit in systemd service file.

Default value: 65000

cores

Data type: Hash

An array of hashes that define a core which will be created with the create_resources function. See type solr::core for details.

Default value: {}

required_packages

Data type: Array

Specified in params and is platform dependent.

Default value: $solr::params::required_packages

zk_hosts

Data type: Optional[Array]

For configuring ZooKeeper ensemble.

Default value: undef

zk_service

Data type: Optional[String]

If Zookeeper is running on this node, ensure the Solr service starts before zk_service.

Default value: undef

log4j_maxfilesize

Data type: String

Maximum allowed log file size (in bytes) before rolling over. Suffixes "KB", "MB" and "GB" are allowed.

Default value: '4MB'

log4j_maxbackupindex

Data type: String

Maximum number of log backup files to keep.

Default value: '9'

log4j_rootlogger_loglevel

Data type: Variant[ Enum['ALL', 'DEBUG', 'ERROR', 'FATAL', 'INFO', 'OFF', 'TRACE', 'TRACE_INT', 'WARN', ], String ]

The loglevel to set for log4j.

Default value: 'INFO'

log4j_console

Data type: String

The log4j console configuration.

Default value: 'org.apache.log4j.ConsoleAppender'

log4j_console_layout

Data type: String

The log4j console layout configuration.

Default value: 'org.apache.log4j.EnhancedPatternLayout'

log4j_console_layout_conversion

Data type: String

The log4j console layout conversion pattern configuration.

Default value: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n'

enable_remote_jmx

Data type: Boolean

Uses enable_remote_jmx_opts in the configuration.

Default value: false

remote_jmx_port

Data type: Optional[String]

The port to use for remote jmx connections.

Default value: undef

schema_name

Data type: Optional[String]

The Solr cores' schema name. This should be set to schema.xml if using the classic schema.xml method. If using a managed schema, set this to Solr's "managedSchemaResourceName" setting, typically 'manage-schema'. Refer to Solr's documentation for core.properties for details. Default: varies by version: Solr >= 5.6.0 will use 'manage-schema' Solr < 5.6.0 will default to 'schema.xml'

Default value: undef

ssl_key_store

Data type: Optional[String]

The path to the key store. If the key store is in the solr's home/etc directory, than can be etc/KEY_STORE_FILE

Default value: undef

ssl_key_store_password

Data type: Optional[String]

The secret password of the key store. Required if ssl_key_store is set.

Default value: undef

ssl_key_store_type

Data type: String

The type of key store.

Default value: 'JKS'

ssl_trust_store

Data type: Optional[String]

If ssl_key_store is set and ssl_trust_store is undef, the settings will use the key store as the trust store. This can be set to an indepenent trust store.

Default value: undef

ssl_trust_store_password

Data type: Optional[String]

The password to the trust store. If undef and ssl_key_store_password is set, the trust store password will use the key store's password.

Default value: undef

ssl_trust_store_type

Data type: String

The type of trust store.

Default value: 'JKS'

ssl_need_client_auth

Data type: Optional[Boolean]

Set to true if the client requires authentication.

Default value: undef

ssl_want_client_auth

Data type: Optional[Boolean]

Enables the client to authenticate but is not required.

Default value: undef

ssl_client_key_store

Data type: Optional[String]

If undef, will use values set for ssl_key_store for clients.

Default value: undef

ssl_client_key_store_password

Data type: Optional[String]

If undef, will use values set for ssl_key_store_password for clients.

Default value: undef

ssl_client_trust_store

Data type: Optional[String]

If undef, will use values set for ssl_trust_store for clients.

Default value: undef

ssl_client_trust_store_password

Data type: Optional[String]

If undef, will use values set for ssl_trust_store_password for clients.

Default value: undef

solr::config

Full description of class solr here.

solr::install

Installs the packages and software that support solr.

solr::params

Dynamic parameters for the solr class.

solr::service

Manages the service for solr.

Defined types

solr::core

Sets up a core based on the example core installed by default.

Parameters

The following parameters are available in the solr::core defined type.

core_name

Data type: String

The name of the core (must be unique).

Default value: $title

replace

Data type: Boolean

Whether or not files should be updated if they are different from the source specified.

Default value: true

currency_src_file

Data type: Optional[String]

The currency file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: undef

other_files

Data type: Array

An array of hashes to create file resources.

Default value: []

protwords_src_file

Data type: String

The schema file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: "${solr::basic_dir}/protwords.txt"

schema_src_file

Data type: String

The schema file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: "${solr::basic_dir}/${solr::schema_filename}"

solrconfig_src_file

Data type: String

The schema file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: "${solr::basic_dir}/solrconfig.xml"

stopwords_src_file

Data type: String

The schema file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: "${solr::basic_dir}/stopwords.txt"

synonyms_src_file

Data type: String

The schema file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: "${solr::basic_dir}/synonyms.txt"

elevate_src_file

Data type: Optional[String]

The elevate file for the core. It can either be a local file (managed outside of this module) or a remote file served through a puppet file server (puppet:///).

Default value: undef

solr::shared_lib

Downloads and installs a file into solr's lib directory.

Parameters

The following parameters are available in the solr::shared_lib defined type.

url

Data type: String

A file to download and install to the solr's lib directory.

filename

Data type: Optional[String]

If the name of the file is to be different than the filename from the the url, the name of the file can be set.

Default value: undef

path

Data type: String

The path to copy the file. If setting a custom path, this module does not handle maintaining the path, this is up to the calling module.

Default value: $solr::solr_lib_dir

web_user

Data type: Optional[String]

The user name of the url to download.

Default value: undef

web_password

Data type: Optional[String]

The user's password to download the file.

Default value: undef