Skip to content

Commit ad874bb

Browse files
authored
feat: add v1.24.3 constraint, update README.md (#52)
1 parent 4512b91 commit ad874bb

File tree

3 files changed

+67
-53
lines changed

3 files changed

+67
-53
lines changed

README.md

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
[![tests](https://github.com/ddev/ddev-drupal-solr/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-drupal-solr/actions/workflows/tests.yml)
1+
[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)
2+
[![tests](https://github.com/ddev/ddev-drupal-solr/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/ddev/ddev-drupal-solr/actions/workflows/tests.yml?query=branch%3Amain)
3+
[![last commit](https://img.shields.io/github/last-commit/ddev/ddev-drupal-solr)](https://github.com/ddev/ddev-drupal-solr/commits)
4+
[![release](https://img.shields.io/github/v/release/ddev/ddev-drupal-solr)](https://github.com/ddev/ddev-drupal-solr/releases/latest)
5+
6+
# DDEV Drupal Solr
27

38
## What is the difference between this and ddev-solr
49

5-
Please consider using [ddev/ddev-solr](https://github.com/ddev/ddev-solr), which runs Solr in the modern "cloud" mode. This offers several advantages. If you are using Drupal, the biggest advantage
6-
is that you can update the Solr Configset from the UI or with a Drush command everytime you update search_api_solr.
10+
Please consider using [ddev/ddev-solr](https://github.com/ddev/ddev-solr), which runs Solr in the modern "Cloud" mode. This offers several advantages. If you are using Drupal, the biggest advantage
11+
is that you can update the Solr Configset from the UI or with a Drush command everytime you update `search_api_solr`.
12+
13+
The current addon runs in "classic standalone" mode. It is probably simpler at first to setup, but comes with the added maintainance steps for configsets. Most Solr hosting service providers run "Solr Cloud" as a backend.
714

8-
The current addon runs in "classic standalone" mode. It is probably simpler at first to setup, but comes with the added maintainance steps for configsets. Most Solr hosting service providers run "Solr Cloud"
9-
as a backend.
15+
## Overview
1016

11-
## What is this?
17+
[Apache Solr](https://solr.apache.org/) is the blazing-fast, open source, multi-modal search platform built on the full-text, vector, and geospatial search capabilities of Apache Lucene™.
1218

13-
This repository allows you to quickly install Apache Solr for Drupal 9+ into a [Ddev](https://ddev.readthedocs.io) project using just `ddev add-on get ddev/ddev-drupal-solr`. It follows the [Setting up Solr (single core) - the classic way](https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/README.md#setting-up-solr-single-core-the-classic-way) recipe.
19+
This add-on integrates Solr for Drupal 9+ into your [DDEV](https://ddev.com/) project. It follows the [Setting up Solr (single core) - the classic way](https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/README.md#setting-up-solr-single-core-the-classic-way) recipe.
1420

1521
## Installation on Drupal 9+
1622

@@ -26,7 +32,6 @@ This repository allows you to quickly install Apache Solr for Drupal 9+ into a [
2632
* Set "Solr host" to `solr`
2733
* Set "solr core" to `dev`
2834
* Under "Advanced server configuration" set the "solr.install.dir" to `/opt/solr`.
29-
3035
6. `ddev restart`
3136

3237
## Outdated Solr config files
@@ -59,13 +64,14 @@ This is the classic Drupal `solr:8` image recipe used for a long time by Drupal
5964

6065
If you want to use a core name other than the default "dev", add a `.ddev/docker-compose.solr-env.yaml` with these contents, using the core name you want to use:
6166

62-
```yml
67+
```yaml
6368
services:
6469
solr:
6570
environment:
66-
- SOLR_CORENAME=somecorename
71+
- SOLR_CORENAME=somecorename
6772
```
68-
1. Change SOLR_CORENAME environment variable in the `environment:` section.
73+
74+
1. Change `SOLR_CORENAME` environment variable in the `environment:` section.
6975
2. Change your Drupal configuration to use the new core.
7076

7177
You can delete the "dev" core from `http://<projectname>.ddev.site:8983/solr/#/~cores/dev` by clicking "Unload".
@@ -75,44 +81,53 @@ You can delete the "dev" core from `http://<projectname>.ddev.site:8983/solr/#/~
7581
If you would like to use more than one Solr core, add a `.ddev/docker-compose.solr_extra.yaml` to override some of the default configuration.
7682

7783
1. Define a mount point for each core you require. Add new mount points for each core, for example:
78-
```yml
79-
services:
80-
solr:
81-
volumes:
82-
- ./solr:/solr-conf
83-
- ./core2:/core2-conf
84-
- ./core3:/core3-conf
85-
```
84+
85+
```yaml
86+
services:
87+
solr:
88+
volumes:
89+
- ./solr:/solr-conf
90+
- ./core2:/core2-conf
91+
- ./core3:/core3-conf
92+
```
8693

8794
2. Create the directories for your new cores' config, and copy the desired solr config in to it, eg:
88-
89-
`cp -R .ddev/solr .ddev/core2`
90-
91-
`cp -R .ddev/solr .ddev/core3`
92-
93-
`cp -R path/to/core2-config/* .ddev/core2/conf/`
94-
95-
`cp -R path/to/core3-config/* .ddev/core3/conf/`
96-
97-
4. Set the 'entrypoint' value to use `precreate-core` instead of `solr-precreate` and add the additional cores, along with a command to start solr afterwards:
98-
```yml
99-
services:
100-
solr:
101-
entrypoint: 'bash -c "VERBOSE=yes docker-entrypoint.sh precreate-core solrconf /solr-conf ; precreate-core core2 /core2-conf ; precreate-core core3 /core3-conf ; exec solr -f "'
102-
```
10395

104-
5. Your finished [`.ddev/docker-compose.solr_extra.yaml`](docker-compose.solr_extra.yaml) file should now look something like this:
105-
```yml
106-
services:
107-
solr:
108-
volumes:
109-
- ./solr:/solr-conf
110-
- ./core2:/core2-conf
111-
- ./core3:/core3-conf
112-
entrypoint: 'bash -c "VERBOSE=yes docker-entrypoint.sh precreate-core solrconf /solr-conf ; precreate-core core2 /core2-conf ; precreate-core core3 /core3-conf ; exec solr -f "'
113-
```
96+
```bash
97+
cp -R .ddev/solr .ddev/core2
98+
cp -R .ddev/solr .ddev/core3
99+
cp -R path/to/core2-config/* .ddev/core2/conf/
100+
cp -R path/to/core3-config/* .ddev/core3/conf/
101+
```
102+
103+
3. Set the `entrypoint` value to use `precreate-core` instead of `solr-precreate` and add the additional cores, along with a command to start solr afterwards:
104+
105+
```yaml
106+
services:
107+
solr:
108+
entrypoint: 'bash -c "VERBOSE=yes docker-entrypoint.sh precreate-core solrconf /solr-conf ; precreate-core core2 /core2-conf ; precreate-core core3 /core3-conf ; exec solr -f "'
109+
```
110+
111+
4. Your finished `.ddev/docker-compose.solr_extra.yaml` file should now look something like this:
112+
113+
```yaml
114+
services:
115+
solr:
116+
volumes:
117+
- ./solr:/solr-conf
118+
- ./core2:/core2-conf
119+
- ./core3:/core3-conf
120+
entrypoint: 'bash -c "VERBOSE=yes docker-entrypoint.sh precreate-core solrconf /solr-conf ; precreate-core core2 /core2-conf ; precreate-core core3 /core3-conf ; exec solr -f "'
121+
```
122+
114123
5. Finally, `ddev restart` to pick up the changes and create the new cores.
115-
124+
116125
## Caveats
117126

118-
* This recipe won't work with versions of Solr before `solr:8`, and Acquia's hosting [requires Solr 7](https://docs.acquia.com/acquia-search/). You'll want to see the [contributed recipes](https://github.com/ddev/ddev-contrib) for older versions of Solr.
127+
* This recipe won't work with versions of Solr before `solr:8`, and Acquia's hosting [requires Solr 7](https://docs.acquia.com/acquia-cloud-platform/docs/features/acquia-search). You'll want to see the [contributed recipes](https://github.com/ddev/ddev-contrib) for older versions of Solr.
128+
129+
## Credits
130+
131+
**Contributed by [@rfay](https://github.com/rfay)**
132+
133+
**Maintained by [@mkalkbrenner](https://github.com/mkalkbrenner), [@bserem](https://github.com/bserem), and the [DDEV team](https://ddev.com/support-ddev/)**

doc/Silverstripe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation and usage on Silverstripe 4+
22

3-
1. `ddev get ddev/ddev-drupal9-solr && ddev restart`
3+
1. `ddev add-on get ddev/ddev-drupal9-solr && ddev restart`
44
2. Install the required/relevant Silverstripe requirements: `ddev composer require firesphere/solr-search`
55
* Note that there are currently some known issues around Guzzle dependencies in the module, that are currently in the process of being resolved.
66
3. Solr is set to use the FileConfigStore. Ensure its data location is at `.ddev/solr` and the host is set to `solr`:

install.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: solr
22

3-
pre_install_actions:
4-
5-
# files and directories listed here are copied into .ddev
63
project_files:
7-
- solr/conf
8-
- solr/docker-entrypoint-initdb.d/solr-configupdate.sh
9-
- docker-compose.solr.yaml
4+
- solr/conf
5+
- solr/docker-entrypoint-initdb.d/solr-configupdate.sh
6+
- docker-compose.solr.yaml
107

118
post_install_actions:
129
- |
1310
#ddev-description:Make sure solr-configupdate.sh is executable
1411
chmod +x solr/docker-entrypoint-initdb.d/solr-configupdate.sh
12+
13+
ddev_version_constraint: '>= v1.24.3'

0 commit comments

Comments
 (0)