lean_delivery.solr_hybris_config
Solr Configuration for SAP Hybris
Summary
This role:
- Configures Solr on Centos 7, Ubuntu or Windows host to work with hybris.
Requirements
- Minimal Version of the ansible for installation: 2.7
- Java 8
- Solr installed
- Supported OS:
- CentOS
- 7
- Ubuntu
- Debian
- 9
- 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 5.3-7.5.xdefault:
7.5.0solr_contrib_hybris_patch_name- Hybris patch name (stored in files and prepared by sh scripts in files dir)default:
solr-contrib-HYBRISCOMM180800P_1-70003534.zipsolr_data_hybris_patch_name- Hybris patch name (stored in files and prepared by sh scripts in files dir)default:
solr-data-HYBRISCOMM180800P_1-70003534.zipsolr_patch_transport- solr patch source transportdefault:
localAvailable:
web- fetch patch from custom web urilocal- local patchs3- fetch patch from s3 bucket
solr_patch_transport_web- URI for http/https patchdefault:
http://my-storage.example.comsolr_patch_transport_local- path for local patch directorydefault:
/tmpsolr_patch_transport_s3_bucket- s3 bucket namedefault:
s3_bucketsolr_patch_transport_s3_path- path to patch folder in bucketdefault:
/foldertransport_s3_aws_access_key- aws key. Need to set in role or set as parameter or set env variables according https://docs.ansible.com/ansible/latest/modules/aws_s3_module.htmldefault:
undefinedtransport_s3_aws_secret_key- aws secret key. Need to set in role or set as parameter or set env variables according https://docs.ansible.com/ansible/latest/modules/aws_s3_module.htmldefault:
undefineddownload_path- local folder for downloading patchdefault:
/tmpfor Linux OSdefault:
C:\Solrfor Windows OSsolr_dest_main_path- root directory to store solr folderdefault:
/optfor Linuxdefault:
C:\Solrfor Windowssolr_dest_path- solr folder pathdefault:
{{ dest_main_path }}/solr-{{ solr_version }}solr_user- os user to run solr servicedefault:
solrsolr_group- os group for userdefault:
solrsolr_service_name- solr service namedefault:
solrsolr_base_path- path to solr basedefault:
/var/solrsolr_home- path to SOLR_HOMEdefault:
{{ solr_base_path }}/datasolr_with_systemd- to run solr as a servicedefault:
truesolr_service_start- to start solr service in the end of role/Playbookdefault:
true
Maven Role Variables
solr_maven_libs_configure- install additional solr libraries from a Maven repositorydefault:
falsesolr_maven_libs_classifier_configure- install additional solr libraries with classifier from a Maven repositorydefault:
falsesolr_maven_libs_version- the version of Maven artifactdefault:
2.1.1solr_maven_group_id- the Maven group IDdefault:
org.lionsoulsolr_maven_repository_url- the URL of the Maven Repository to download fromdefault:
https://repo1.maven.org/maven2solr_maven_classifier- the Maven classifier, see note about classifier belowdefault:
javadocsolr_maven_libs_list- the list of Maven artifactsdefault:
- jcseg-analyzer - jcseg-core - jcseg-elasticsearch - jcseg-serversolr_maven_libs_dest- path on the local filesystem for downloaded Maven artifactsdefault:
{{ solr_dest_path }}/server/solr-webapp/webapp/WEB-INF/lib
Note about Classifier
The classifier distinguishes artifacts that were built from the same POM but differ in content.
It is some optional and arbitrary string.
If this sting is present, it will be appended to the artifact name just after the version number.
Patch Creation
Bash script files/create-solr-extras.sh can be used to create patch file.
Run with following parameters:
-a - folder or web source with hybris archive. Patches will be stored here too
Default is /opt/installs
-p - Hybris package name
Default is HYBRISCOMM180800P_0-70003534
-e - Hybris package extension
Default is ZIP
-c - Contrib patch file name
Default is solr-contrib-$package
-d - Elasticsearch index name
Default is solr-data-$package
After patch creation please upload it to destination and set transport parameters.
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: Configure Solr for SAP Hybris
hosts: solr
roles:
- role: lean_delivery.java
- role: lean_delivery.solr_standalone
- role: lean_delivery.solr_hybris_config
Example Playbook with Maven enabled
- name: Configure Solr for SAP Hybris with additional solr libraries form Maven
hosts: solr
roles:
- role: lean_delivery.java
- role: lean_delivery.solr_standalone
- role: lean_delivery.solr_hybris_config
solr_maven_libs_configure: true
solr_maven_libs_classifier_configure: true
solr_maven_libs_version: 2.1.1
solr_maven_group_id: 'org.lionsoul'
solr_maven_repository_url: 'https://repo1.maven.org/maven2'
solr_maven_classifier: 'javadoc'
solr_maven_libs_list:
- 'jcseg-analyzer'
- 'jcseg-core'
- 'jcseg-elasticsearch'
- 'jcseg-server'
solr_maven_libs_dest: '{{ solr_dest_path }}/server/solr-webapp/webapp/WEB-INF/lib'
License
Apache
Author Information
authors:
- Lean Delivery Team team@lean-delivery.com
Lean Delivery Solr configuration for usage with SAP Hybris
ansible-galaxy install lean_delivery.solr_hybris_config