Skip to content

Commit 040c059

Browse files
authored
Clustering with DDEV: use ddev/ddev-solr (#2960)
1 parent c2ecc8b commit 040c059

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ A [search engine](search_engines.md) can be added to the cluster.
3535

3636
The following sequence of commands:
3737

38-
1. Adds the Elasticsearch container.
39-
2. Sets Elasticsearch as the search engine.
40-
3. Restarts the DDEV cluster and clears application cache.
41-
4. Injects the schema and reindexes the content.
38+
1. Adds the Elasticsearch container
39+
2. Sets Elasticsearch as the search engine
40+
3. Restarts the DDEV cluster and clears application cache
41+
4. Injects the schema and reindexes the content
4242

4343
```bash
4444
ddev add-on get ddev/ddev-elasticsearch
@@ -68,22 +68,44 @@ See [Elasticsearch REST API reference](https://www.elastic.co/docs/reference/ela
6868

6969
### Solr
7070

71-
To simplify the installation of Solr, you can use the `ibexa/ddev-solr` add-on:
71+
The following sequence of commands:
72+
73+
1. Adds the Solr container
74+
2. Sets Solr as the search engine
75+
3. Start the DDEV cluster to creates core config by combining default files and those provided by [[= product_name =]]
76+
4. Restarts the DDEV cluster and clears application cache
77+
5. Reindexes the content
7278

7379
```bash
74-
ddev add-on get ibexa/ddev-solr
80+
ddev add-on get ddev/ddev-solr
81+
ddev config --web-environment-add SEARCH_ENGINE=solr
82+
ddev config --web-environment-add SOLR_DSN=http://solr:8983/solr
83+
ddev config --web-environment-add SOLR_CORE=collection1
84+
ddev start
85+
mkdir .ddev/solr/configsets/collection1
86+
ddev exec -s solr cp -R /opt/solr/server/solr/configsets/_default/conf/* /mnt/ddev_config/solr/configsets/collection1/
87+
cp -R vendor/ibexa/solr/src/lib/Resources/config/solr/* .ddev/solr/configsets/collection1/
7588
ddev restart
89+
ddev php bin/console cache:clear
90+
ddev php bin/console ibexa:reindex
7691
```
7792

7893
You can now check whether Solr works.
7994

80-
For example, the `ddev exec curl -s http://solr:8983/api/cores/` command:
95+
For example, the `ddev exec curl -s http://solr:SolrRocks@solr:8983/api/cores/` command:
8196

8297
- checks whether the `web` server can access the `solr` server
8398
- checks whether `collection1` exists and its status
8499
- displays `collection1`'s `numDocs` that shouldn't be zero if indexing worked correctly
85100

86-
You can access the Solr admin UI from the host by using port 8983 on the same `.ddev.site` subdomain as the front. Use `ddev describe` to get that URL.
101+
You can access the Solr admin UI from the host by:
102+
103+
- running `ddev solr-admin` command
104+
- accessing port 8983 on the same `.ddev.site` subdomain than the web server (you can use `ddev describe` to get this URL)
105+
106+
Use the credentials username `solr` and password `SolrRocks`.
107+
108+
For more information on topics such as available versions of Solr, see [ddev/ddev-solr README](https://github.com/ddev/ddev-solr).
87109

88110
## Share cache and sessions
89111

0 commit comments

Comments
 (0)