solr_standalone
Solr installation
Summary
This role:
- Installs Solr standalone on Centos 7, Ubuntu or Windows host.
- Configures SSL for Solr 7.x and 8.x
- Configures Authentication for Solr 7.x and 8.x
- Configures Solr
- Supported Solr versions: 6.x - 8.x. The latest tested is 8.0.0
For additional configuration, such as master or slave mode use roles:
- solr-master (lean-delivery.ansible-role-solr-master)
- solr-slave (lean-delivery.ansible-role-solr-slave)
- solr-cloud (lean-delivery.ansible-role-solr-cloud)
- to integrate SAP-Hyrbis and solr with hybris extras (lean-delivery.ansible-role-solr-hybris-config)
Requirements
- Minimal Version of the ansible for installation: 2.7
- Java 8
- Supported OS:
- CentOS
- 7
- Ubuntu
- Debian
- Windows
- "Windows Server 2008"
- "Windows Server 2008 R2"
- "Windows Server 2012"
- "Windows Server 2012 R2"
- "Windows Server 2016"
- "Windows Server 2019"
- "Windows 7"
- "Windows 8.1"
- "Windows 10"
- CentOS
Role Variables
solr_version
- matches available version on https://archive.apache.org/dist/lucene/solr/. Tested versions 6.x-8.xdefault:
8.0.0
solr_use_java_version_8
- if True Solr installed on java version 8 and earlier. If using later versions - set to Falsedefault:
True
solr_url
- root url to download solrdefault:
http://archive.apache.org/dist/lucene/solr
solr_distr_url
- url to zip filedefault:
{{ solr_url }}/{{ solr_version }}/solr-{{ solr_version }}.zip
solr_host
- solr server namedefault:
{{ ansible_fqdn }}
solr_dest_main_path
- root directory to store solr folderdefault:
/opt
for Linux OSdefault:
C:\Solr
for Windows OSsolr_dest_path
- solr folder pathdefault:
{{ solr_dest_main_path }}/solr-{{ solr_version }}
solr_change_default_password
- to change default password to solr user (will be solr_auth_pass)default:
True
solr_auth_configure
- Enable authenticationdefault:
True
solr_auth_type
- authentication typedefault:
basic
solr_auth_user
- default solr userdefault:
solrserver
solr_auth_pass
- default solr user passworddefault:
server123
solr_default_auth_user
- default solr userdefault:
solr
solr_default_auth_pass
- default solr user passworddefault:
SolrRocks
solr_authentication_opts
- solr authentication optionsdefault:
-Dbasicauth={{ solr_auth_user }}:{{ solr_auth_pass }}
solr_insh_default
- solr in.sh folderdefault:
/etc/default/solr.in.sh
solr_java_xms
- heap sizedefault:
512m
solr_java_xmx
- heap sizedefault:
512m
solr_master_enable_jmx
- enable jmx on solrdefault:
false
solr_additional_opts
- solr optionsdefault:
-Xss256k
solr_user
- os user to run solr servicedefault:
solr
solr_group
- os group for userdefault:
solr
solr_port
- port for solr startdefault:
8983
solr_service_name
- solr service namedefault:
solr
solr_base_path
- path to solr basedefault:
/var/solr
solr_home
- path to SOLR_HOMEdefault:
{{ solr_base_path }}/data
solr_with_systemd
- to run solr as a servicedefault:
True
solr_logs_dir
- path to store logsdefault:
{{ solr_base_path }}/logs
solr_wait_for_zk
- timeout to reconnect to zookeeper (in seconds)default:
30
solr_client_timeout
- ZooKeeper client timeout (for SolrCloud mode)default:
15000
solr_timezone
- timezone for solr serverdefault:
UTC
solr_service_restart
- solr service restart optiondefault:
always
solr_service_start
- to start solr service in the end of role/Playbookdefault:
True
solr_service_autostart
- Add solr service to automatically start.default:
True
solr_copy_default_configsets
- copy OOTB configsets to {{ solr_home }}/configsets folderdefault: False
https://lucene.apache.org/solr/guide/7_1/enabling-ssl.html
solr_local_keystore
- if True - to search for keystore on ansible host on {{ solr_local_keystore_path }}. If False - to check keystore on remote hostdefault:
True
solr_local_keystore_path
- path to local keystore file (in order not to create self-signed)default:
{{ role_path }}/files/{{ solr_ssl_key_store_name }}
solr_ssl_configure
- configure SSLdefault:
True
solr_ssl_key_size
- certificate key sizedefault: 4096
solr_ssl_key_store_path
- directory to store keystoredefault:
{{ solr_dest_path }}/server/solr
solr_ssl_key_store_name
- keystore name. If file with such name exists in role folder/files - it will be used as keystore.default:
solr-ssl.keystore.jks
solr_ssl_key_store
- path to solr keystore.default:
{{ solr_ssl_key_store_path }}/{{ solr_ssl_key_store_name }}
solr_ssl_key_store_password
- keystore passworddefault:
123456
solr_ssl_trust_store
- path to trust keystoredefault:
{{ solr_ssl_key_store_path }}/{{ solr_ssl_key_store_name }}
solr_ssl_trust_store_password
- trusted keystore passworddefault:
123456
solr_ssl_need_client_auth
- Client Authentication Settingsdefault:
false
solr_ssl_want_client_auth
- Client Authentication Settingsdefault:
false
solr_ssl_key_store_type
- keystore typedefault:
JKS
solr_ssl_trust_store_type
- trusted keystore pathdefault:
JKS
solr_ssl_check_peer_name
- Setting this to false can be useful to disable these checks when re-using a certificate on many hostsdefault:
true
solr_ssl_certificate_provider
- only for Linux os. https://docs.ansible.com/ansible/latest/openssl_certificate_module.htmldefault:
selfsigned
solr_ca_domain
- certificate domain namedefault:
example.com
local_cert_file_path
- path to private certdefault:
/etc/pki/tls/private
for RHEL baseddefault:
/etc/ssl/private
for Debian basedsolr_local_pkey_file_name
- private cert namedefault:
{{ ansible_hostname }}.ca-pkey.pem
local_cert_file_path
- path to public certdefault:
/etc/pki/tls/certs
for RHEL baseddefault:
/etc/ssl/certs
for Debian basedsolr_local_cert_file_name
-public cert namedefault:
{{ ansible_hostname }}.ca-cert.pem
solr_set_limits
- to set limitsdefault:
True
solr_open_files_limit
- linux open files limit valuedefault:
65000
solr_max_processes_limit
- linux max processes limit valuedefault:
65000
Windows variables
solr_win_temp_dir
- temporary directorydefault:
C:\Windows\Temp
solr_win_ssl_subj
- CSR subjectdefault:
/C=BY/ST=Minsk/L=Minsk/O=O/OU=IT/CN={{ solr_ca_domain }}
Example Inventory
[solr]
solr.example.com
[solrwin]
solrwin.example.com
[solrwin:vars]
ansible_user=admin
ansible_password=password
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
Example Playbook
- name: Install and Configure Solr
hosts: solr
vars:
solr_change_default_password: False
roles:
- role: lean_delivery.java
- role: lean_delivery.solr_standalone
License
Apache
Author Information
authors:
- Lean Delivery Team team@lean-delivery.com
ansible-galaxy install lean-delivery/ansible-role-solr-standalone