From f3ab706b1ee791030506e9ef392b88fc011d82e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Leybaert?= Date: Tue, 8 Oct 2024 14:50:49 +0200 Subject: [PATCH 1/4] feat(solr): change cfg for solr local config --- buildout.cfg | 2 +- solr.cfg | 4 ++-- versions-base.cfg | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/buildout.cfg b/buildout.cfg index fb21192..f5458ec 100755 --- a/buildout.cfg +++ b/buildout.cfg @@ -2,7 +2,7 @@ # Add the config name you want to use in the extends attribute: dev.cfg, prod.cfg, ... extends = buildout-main.cfg -# solr.cfg + solr.cfg # ldap.cfg # rest.cfg # no-amqp.cfg diff --git a/solr.cfg b/solr.cfg index e57fb32..97ee160 100644 --- a/solr.cfg +++ b/solr.cfg @@ -44,6 +44,6 @@ solr-config = solr port = ${port:solr-port} [sources] -collective.solr = git ${remotes:collective}/collective.solr.git pushurl=${remotes:collective_push}/collective.solr.git branch=8.x.x-upgrade-4-improvments -;collective.solr = git ${remotes:imio}/collective.solr.git pushurl=${remotes:imio_push}/collective.solr.git branch=DMS-954 +;collective.solr = git ${remotes:collective}/collective.solr.git pushurl=${remotes:collective_push}/collective.solr.git branch=8.x.x-upgrade-4-improvments +collective.solr = git ${remotes:imio}/collective.solr.git pushurl=${remotes:imio_push}/collective.solr.git branch=DMS-954 collective.indexing = git ${remotes:sge}/collective.indexing.git pushurl=${remotes:sge_push}/collective.indexing.git diff --git a/versions-base.cfg b/versions-base.cfg index d754909..e93dfd2 100644 --- a/versions-base.cfg +++ b/versions-base.cfg @@ -175,8 +175,10 @@ imio.annex = 2.24 collective.iconifiedcategory = 0.68 collective.js.datatables = 4.1.2 # max version for py2 is 7.x -# plone.restapi = 7.9.0 not working with collective.solr 7.0, ok with 8. -plone.restapi = 4.1.4 +# for solr cluster +plone.restapi = 7.9.0 +# just in case +# plone.restapi = 4.1.4 # all under are dependencies of plone.restapi attrs = 21.2.0 configparser = 4.0.2 From 52cf22f693fed2b975809c29e0657cbff91d1f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Dubois?= Date: Wed, 9 Oct 2024 09:26:43 +0200 Subject: [PATCH 2/4] feat: comment varenv for local tests --- solr.cfg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/solr.cfg b/solr.cfg index 97ee160..c628a12 100644 --- a/solr.cfg +++ b/solr.cfg @@ -16,7 +16,7 @@ Genshi = 0.7.1 collective.indexing = 2.1 collective.js.showmore = 1.0a4 collective.recipe.solrinstance = 5.3.3 -collective.solr = 8.4.2 +;collective.solr = 8.4.2 gocept.download = 0.9.5 hexagonit.recipe.download = 1.7.1 kitconcept.recipe.solr = 1.0.0a5 @@ -26,10 +26,10 @@ eggs+= collective.solr collective.indexing -environment-vars += - COLLECTIVE_SOLR_HOST ${port:solr-host} - COLLECTIVE_SOLR_PORT ${port:solr-port} - COLLECTIVE_SOLR_BASE ${port:solr-base} +# environment-vars += +# COLLECTIVE_SOLR_HOST ${port:solr-host} +# COLLECTIVE_SOLR_PORT ${port:solr-port} +# COLLECTIVE_SOLR_BASE ${port:solr-base} [core-prop] recipe = collective.recipe.template @@ -38,8 +38,8 @@ output = solr/core.properties [solr] recipe = kitconcept.recipe.solr -src = http://archive.apache.org/dist/lucene/solr/8.11.1/solr-8.11.1.tgz -;src = https://archive.apache.org/dist/solr/solr/9.6.0/solr-9.6.0.tgz +;src = http://archive.apache.org/dist/lucene/solr/8.11.1/solr-8.11.1.tgz +src = https://archive.apache.org/dist/solr/solr/9.6.0/solr-9.6.0.tgz solr-config = solr port = ${port:solr-port} From 45bc965ced9f604826ed1242ec2854af1a85af99 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 14 Jan 2026 11:29:19 +0100 Subject: [PATCH 3/4] Configured Solr --- Makefile | 7 +++++++ docker-compose.yml | 7 +++++++ port.cfg | 4 ++++ solr.cfg | 14 +++++++++----- solr/core.properties.tmpl | 2 +- sources-base.cfg | 2 +- 6 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 docker-compose.yml diff --git a/Makefile b/Makefile index a8bed85..9eb1cee 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,13 @@ dv_clean: ## Cleans old dv files @echo "plone: $(plone)" bin/$(instance) -O$(plone) run run-scripts.py 2 +.PHONY: solr +solr: ## Start solr container (foreground) + @if [ -d solr ] && [ "$$(stat -c %a solr)" != "777" ]; then \ + sudo chmod -R 777 solr; \ + fi + docker compose up solr + .PHONY: solr-setup solr-setup: ## Solr setup @echo "plone: $(plone)" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f124f1f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + solr: + image: solr:9-slim + ports: + - "8983:8983" + volumes: + - ./solr:/var/solr/data/plone diff --git a/port.cfg b/port.cfg index 9a6ec02..f1b4c54 100644 --- a/port.cfg +++ b/port.cfg @@ -21,6 +21,10 @@ oo-port = 2002 solr-host = localhost solr-port = 8983 solr-base = /solr/plone +solr-login = solr +solr-password = SolrRocks +solr-https-connection = false +solr-ignore-certificate-check = false python-uno = /usr/bin/python3 zodb-cache-size = 30000 zeo-client-cache-size = 300MB diff --git a/solr.cfg b/solr.cfg index c628a12..bd4e4cf 100644 --- a/solr.cfg +++ b/solr.cfg @@ -26,10 +26,14 @@ eggs+= collective.solr collective.indexing -# environment-vars += -# COLLECTIVE_SOLR_HOST ${port:solr-host} -# COLLECTIVE_SOLR_PORT ${port:solr-port} -# COLLECTIVE_SOLR_BASE ${port:solr-base} +environment-vars += + COLLECTIVE_SOLR_HOST ${port:solr-host} + COLLECTIVE_SOLR_PORT ${port:solr-port} + COLLECTIVE_SOLR_BASE ${port:solr-base} + COLLECTIVE_SOLR_LOGIN ${port:solr-login} + COLLECTIVE_SOLR_PASSWORD ${port:solr-password} + COLLECTIVE_SOLR_HTTPS_CONNECTION ${port:solr-https-connection} + COLLECTIVE_SOLR_IGNORE_CERTIFICATE_CHECK ${port:solr-ignore-certificate-check} [core-prop] recipe = collective.recipe.template @@ -45,5 +49,5 @@ port = ${port:solr-port} [sources] ;collective.solr = git ${remotes:collective}/collective.solr.git pushurl=${remotes:collective_push}/collective.solr.git branch=8.x.x-upgrade-4-improvments -collective.solr = git ${remotes:imio}/collective.solr.git pushurl=${remotes:imio_push}/collective.solr.git branch=DMS-954 +collective.solr = git ${remotes:imio}/collective.solr.git pushurl=${remotes:imio_push}/collective.solr.git branch=DMS-954-rebased collective.indexing = git ${remotes:sge}/collective.indexing.git pushurl=${remotes:sge_push}/collective.indexing.git diff --git a/solr/core.properties.tmpl b/solr/core.properties.tmpl index 08eded8..6e7c6ae 100644 --- a/solr/core.properties.tmpl +++ b/solr/core.properties.tmpl @@ -1,2 +1,2 @@ name=plone -dataDir=${buildout:directory}/var/solr/data/ +dataDir=/var/solr/data/ diff --git a/sources-base.cfg b/sources-base.cfg index ace418c..df71bc4 100644 --- a/sources-base.cfg +++ b/sources-base.cfg @@ -5,7 +5,7 @@ collective.externaleditor = git ${remotes:sge}/collective.externaleditor.git pus collective.portlet.actions = git ${remotes:sge}/collective.portlet.actions.git pushurl=${remotes:sge_push}/collective.portlet.actions.git collective.z3cform.select2 = git ${remotes:sge}/collective.z3cform.select2.git pushurl=${remotes:sge_push}/collective.z3cform.select2.git branch=2.x eea.facetednavigation = git https://github.com/affinitic/eea.facetednavigation.git branch=14.x -imio.dms.mail = git ${remotes:imio}/imio.dms.mail.git pushurl=${remotes:imio_push}/imio.dms.mail.git +imio.dms.mail = git ${remotes:imio}/imio.dms.mail.git pushurl=${remotes:imio_push}/imio.dms.mail.git branch=DMS-954 imio.transmogrifier.contact = git ${remotes:imio}/imio.transmogrifier.contact.git pushurl=${remotes:imio_push}/imio.transmogrifier.contact.git imio.transmogrifier.iadocs = git ${remotes:imio}/imio.transmogrifier.iadocs.git pushurl=${remotes:imio_push}/imio.transmogrifier.iadocs.git # for oupeye where versions have been purged From 1cdba946413d9ebb196960802439ebc3095374b9 Mon Sep 17 00:00:00 2001 From: Stephan Geulette Date: Thu, 15 Jan 2026 11:35:45 +0100 Subject: [PATCH 4/4] Improvements --- Makefile | 4 ++-- buildout.cfg | 2 +- solr.cfg | 1 + sources-base.cfg | 2 +- versions-base.cfg | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9eb1cee..e5c2dbf 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ dv_clean: ## Cleans old dv files @echo "plone: $(plone)" bin/$(instance) -O$(plone) run run-scripts.py 2 -.PHONY: solr -solr: ## Start solr container (foreground) +.PHONY: solr-compose +solr-compose: ## Start solr container (foreground) @if [ -d solr ] && [ "$$(stat -c %a solr)" != "777" ]; then \ sudo chmod -R 777 solr; \ fi diff --git a/buildout.cfg b/buildout.cfg index f5458ec..fb21192 100755 --- a/buildout.cfg +++ b/buildout.cfg @@ -2,7 +2,7 @@ # Add the config name you want to use in the extends attribute: dev.cfg, prod.cfg, ... extends = buildout-main.cfg - solr.cfg +# solr.cfg # ldap.cfg # rest.cfg # no-amqp.cfg diff --git a/solr.cfg b/solr.cfg index bd4e4cf..ce318ae 100644 --- a/solr.cfg +++ b/solr.cfg @@ -16,6 +16,7 @@ Genshi = 0.7.1 collective.indexing = 2.1 collective.js.showmore = 1.0a4 collective.recipe.solrinstance = 5.3.3 +collective.recipe.template = 2.2 ;collective.solr = 8.4.2 gocept.download = 0.9.5 hexagonit.recipe.download = 1.7.1 diff --git a/sources-base.cfg b/sources-base.cfg index df71bc4..ace418c 100644 --- a/sources-base.cfg +++ b/sources-base.cfg @@ -5,7 +5,7 @@ collective.externaleditor = git ${remotes:sge}/collective.externaleditor.git pus collective.portlet.actions = git ${remotes:sge}/collective.portlet.actions.git pushurl=${remotes:sge_push}/collective.portlet.actions.git collective.z3cform.select2 = git ${remotes:sge}/collective.z3cform.select2.git pushurl=${remotes:sge_push}/collective.z3cform.select2.git branch=2.x eea.facetednavigation = git https://github.com/affinitic/eea.facetednavigation.git branch=14.x -imio.dms.mail = git ${remotes:imio}/imio.dms.mail.git pushurl=${remotes:imio_push}/imio.dms.mail.git branch=DMS-954 +imio.dms.mail = git ${remotes:imio}/imio.dms.mail.git pushurl=${remotes:imio_push}/imio.dms.mail.git imio.transmogrifier.contact = git ${remotes:imio}/imio.transmogrifier.contact.git pushurl=${remotes:imio_push}/imio.transmogrifier.contact.git imio.transmogrifier.iadocs = git ${remotes:imio}/imio.transmogrifier.iadocs.git pushurl=${remotes:imio_push}/imio.transmogrifier.iadocs.git # for oupeye where versions have been purged diff --git a/versions-base.cfg b/versions-base.cfg index e93dfd2..8d40eac 100644 --- a/versions-base.cfg +++ b/versions-base.cfg @@ -177,7 +177,7 @@ collective.js.datatables = 4.1.2 # max version for py2 is 7.x # for solr cluster plone.restapi = 7.9.0 -# just in case +# version working with collective.solr 7.0 # plone.restapi = 4.1.4 # all under are dependencies of plone.restapi attrs = 21.2.0