-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Indexer service use Solr authentication to index documents & unites c…
…hanged to avoid Solr authentication Profiles have been added to the docker-compose to start and test each of the service (retriever, generator, indexer) indendently & The Solr service has been updated to accept authentication and created the collection. Updated documentation
- Loading branch information
Showing
6 changed files
with
157 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,12 +71,26 @@ systems involved in the flow to index documents in Full-text search index. The q | |
In your workdir: | ||
|
||
1. Clone the repository: | ||
|
||
```git clone [email protected]:hathitrust/ht_indexer.git``` | ||
2. Go to the folder ``cd ht_indexer`` | ||
3. Create the image | ||
|
||
`docker build -t document_generator .` | ||
4. Run the container | ||
`docker compose up document_retriever -d` | ||
|
||
4. Run the services | ||
|
||
1. Retriever service | ||
|
||
`docker compose --profile retriever up document_retriever -d` | ||
|
||
2. Generator service | ||
|
||
`docker compose --profile generator up document_generator -d` | ||
|
||
3. Indexer service | ||
|
||
`docker compose --profile indexer up document_indexer -d` | ||
|
||
If you want to run the application in your local environment and outside the docker container, you should | ||
follow the steps mentioned in the section [How to set up your python environment](#project-set-up-local-environment) | ||
|
@@ -241,7 +255,7 @@ docker compose exec document_retriever python document_retriever_service/run_ret | |
* **Generator service** | ||
|
||
``` | ||
docker compose up document_generator -d | ||
docker compose --profile generator up document_generator -d | ||
``` | ||
|
||
This container will automatically start the script `python document_generator/document_generator_service.py` that will | ||
|
@@ -250,7 +264,7 @@ be retrieving the documents from the retriever_queue and will be published a new | |
* **Indexer service** | ||
|
||
``` | ||
docker compose up document_indexer -d | ||
docker compose --profile indexer up document_indexer -d | ||
``` | ||
|
||
This container will automatically start the script `python document_indexer_service/document_indexer_service.py` that | ||
|
@@ -296,21 +310,27 @@ In the working directory, | |
|
||
* Run document_retriever_service container and test it | ||
|
||
```docker compose up document_retriever -d``` | ||
```docker compose --profile retriever up document_retriever -d``` | ||
|
||
```docker compose exec document_retriever pytest document_retriever_service catalog_metadata ht_utils ``` | ||
|
||
* Run document_generator_service container and test it | ||
|
||
```docker compose up document_generator -d``` | ||
```docker compose --profile generator up document_generator -d``` | ||
|
||
```docker compose exec document_generator pytest document_generator ht_document ht_queue_service ht_utils``` | ||
|
||
* Run document_indexer_service container and test it | ||
|
||
```docker compose up document_indexer -d``` | ||
Solr server required authentication, so you should set up the environment variables SOLR_USER and SOLR_PASSWORD before | ||
starting the container. | ||
|
||
export SOLR_USER=your_solr_username | ||
export SOLR_PASS=your_solr_password | ||
|
||
```docker compose --profile indexer up document_indexer -d``` | ||
|
||
```docker compose exec document_indexer pytest ht_indexer_api ht_queue_service``` | ||
```docker compose exec document_indexer pytest document_indexer_service ht_indexer_api ht_queue_service``` | ||
|
||
## Hosting | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.