https://github.com/kitconcept/kitconcept.recipe.solr
Buildout recipe for Solr
https://github.com/kitconcept/kitconcept.recipe.solr
Last synced: over 1 year ago
JSON representation
Buildout recipe for Solr
- Host: GitHub
- URL: https://github.com/kitconcept/kitconcept.recipe.solr
- Owner: kitconcept
- Created: 2018-03-07T10:09:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-27T22:12:52.000Z (over 4 years ago)
- Last Synced: 2025-03-09T23:32:08.945Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
Awesome Lists containing this project
README
Introduction
============
.. image:: https://github.com/kitconcept/kitconcept.recipe.solr/actions/workflows/tests.yml/badge.svg
:target: https://github.com/kitconcept/kitconcept.recipe.solr/actions/workflows/tests.yml
|
.. image:: https://raw.githubusercontent.com/kitconcept/kitconcept.recipe.solr/master/kitconcept.png
:alt: kitconcept
:target: https://kitconcept.com/
Buildout recipe for Solr.
Supported options
=================
The recipe supports the following options:
src (required)
Source of the Solr download (e.g. "http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.zip").
port (default: 8983)
Solr port
solr-config
Path to a Solr configuration directory that contains a "core.properties" file and a "data" and "conf" directory.
solr-core-name (default: plone)
Name of the Solr core. Default is 'plone'.
Example usage
=============
Minimal Buildout
----------------
We'll start by creating a minimal buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = solr
...
... [solr]
... recipe = kitconcept.recipe.solr
... src = %(src)s
... """ % {
... 'src' : 'http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.zip',
... })
The only required attribute is `src` that contains a URL of the Solr tgz file.
Running the buildout gives us::
>>> buildout_output_lower = system(buildout).lower()
>>> "installing solr" in buildout_output_lower
True
>>> import os
>>> current_path = os.path.dirname(os.path.realpath(__file__))
>>> full_path = os.path.join(current_path, 'parts/solr/bin/solr')
>>> os.path.exists(full_path)
True
>>> full_path = os.path.join(current_path, 'parts/solr/server/solr/plone')
>>> os.path.exists(full_path)
True
Complete Buildout
-----------------
We'll start by creating a buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = solr
...
... [solr]
... recipe = kitconcept.recipe.solr
... src = %(src)s
... port = %(port)s
... solr-config = %(solr-config)s
... solr-core-name = %(solr-core-name)s
... """ % {
... 'src' : 'http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.zip',
... 'port' : '8983',
... 'solr-config': 'config',
... 'solr-core-name': 'solr-core-plone',
... })
Running the buildout gives us::
>>> buildout_output_lower = system(buildout).lower()
>>> "installing solr" in buildout_output_lower
True
>>> import os
>>> current_path = os.path.dirname(os.path.realpath(__file__))
>>> full_path = os.path.join(current_path, 'parts/solr/bin/solr')
>>> os.path.exists(full_path)
True
>>> full_path = os.path.join(current_path, 'parts/solr/server/solr/plone')
>>> os.path.exists(full_path)
True