-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest Quepid... Requires Mysql8, and removes RRE (#163)
* quepid now wants mysql 8, but smui is 5 I think. * workaround to make SMUI work with mysql 8... * RRE won't run due to Maven not finding some jars so removed :-(.
- Loading branch information
Showing
21 changed files
with
78 additions
and
525 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ volumes/solr* | |
solr/configsets/ecommerce.zip | ||
solr/data/*.json | ||
solr/data/*.gz | ||
rre/target | ||
.idea | ||
*.iml | ||
__pycache__ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
| MySQL | root | password | docker-compose.yml | | ||
|
||
|
||
`blockUnknown` is false as we want to let RRE run against the `ecommerce` collection. We have locked down in `security.json` to allow anonymous users only to hit the /ecommerce/select/ end point | ||
`blockUnknown` is false as we want to let RRE (now removed from Chorus) run against the `ecommerce` collection. We have locked down in `security.json` to allow anonymous users only to hit the /ecommerce/select/ end point | ||
|
||
When you bring up Solr Admin and then are redirected to Keycloak, when you register and sent back to Solr you are given the `solr-admin` role. | ||
|
||
|
@@ -48,13 +48,6 @@ docker-compose run quepid thor user:create -a [email protected] "Demo User" passw | |
|
||
For Quepid case, pick `name` for title, and `id` for identifier. Add `thumb:imageUrl` to the list of fields. | ||
|
||
## Setting up RRE | ||
|
||
```sh | ||
docker-compose run rre mvn rre:evaluate | ||
docker-compose run rre mvn rre-report:report | ||
``` | ||
|
||
## Monitoring Details | ||
|
||
Prometheus and Grafana setup heavily inspired by https://github.com/vegasbrianc/prometheus and https://github.com/chatman/solr-grafana-docker | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,9 +54,6 @@ done | |
# Function check_prerequisites makes sure that you have curl, jq, docker-compose, and zip installed. See helpers.sh for details. | ||
check_prerequisites | ||
|
||
services="blacklight solr1 solr2 solr3 keycloak smui" | ||
|
||
|
||
services="blacklight solr1 solr2 solr3 keycloak" | ||
|
||
if $observability; then | ||
|
@@ -68,7 +65,7 @@ else | |
fi | ||
|
||
if $offline_lab; then | ||
services="${services} quepid rre" | ||
services="${services} quepid" | ||
fi | ||
|
||
if $vector_search; then | ||
|
@@ -81,9 +78,7 @@ if $vector_search; then | |
fi | ||
fi | ||
|
||
if $active_search_management; then | ||
services="${services} smui" | ||
fi | ||
|
||
|
||
if ! $local_deploy; then | ||
echo -e "${MAJOR}Updating configuration files for online deploy${RESET}" | ||
|
@@ -101,6 +96,15 @@ if $shutdown; then | |
exit | ||
fi | ||
|
||
if $active_search_management; then | ||
# need to start MySQL and verify it is up and running before starting SMUI. | ||
#log_major "Starting MySQL first to ensure fully available prior to starting SMUI." | ||
docker compose up -d mysql | ||
./mysql/wait-for-mysql.sh | ||
services="${services} smui" | ||
|
||
fi | ||
|
||
docker-compose up -d --build ${services} | ||
|
||
echo -e "${MAJOR}Waiting for Solr cluster to start up and all three nodes to be online.${RESET}" | ||
|
@@ -123,7 +127,7 @@ docker exec solr1 solr zk cp /security.json zk:security.json -z zoo1:2181 | |
log_minor "waiting for security.json to be available to all Solr nodes" | ||
./solr/wait-for-zk-200.sh | ||
|
||
echo -e "${MAJOR}Packaging ecommerce configset.${RESET}" | ||
log_major "Packaging ecommerce configset." | ||
(cd solr/configsets/ecommerce/conf && zip -r - *) > ./solr/configsets/ecommerce.zip | ||
log_minor "posting ecommerce.zip configset" | ||
curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/cluster/configs/ecommerce" | ||
|
@@ -209,7 +213,7 @@ if $vector_search; then | |
fi | ||
|
||
|
||
echo -e "${MAJOR}Defining relevancy algorithms using ParamSets.${RESET}" | ||
log_major "Defining relevancy algorithms using ParamSets." | ||
curl --user solr:SolrRocks -X POST http://localhost:8983/solr/ecommerce/config/params -H 'Content-type:application/json' -d '{ | ||
"set": { | ||
"visible_products":{ | ||
|
@@ -385,7 +389,7 @@ fi | |
|
||
|
||
if $active_search_management; then | ||
echo -e "${MAJOR}Setting up SMUI${RESET}" | ||
log_major "Setting up SMUI" | ||
SOLR_INDEX_ID=`curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"ecommerce", "description":"Chorus Webshop"}' http://localhost:9000/api/v1/solr-index | jq -r .returnId` | ||
curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"product_type"}' http://localhost:9000/api/v1/${SOLR_INDEX_ID}/suggested-solr-field | ||
curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"title"}' http://localhost:9000/api/v1/${SOLR_INDEX_ID}/suggested-solr-field | ||
|
@@ -396,27 +400,23 @@ if $offline_lab; then | |
log_major "Setting up Quepid" | ||
./mysql/wait-for-mysql.sh | ||
|
||
docker-compose run --rm quepid bin/rake db:setup | ||
docker-compose run quepid thor user:create -a [email protected] "Chorus Admin" password | ||
docker-compose run --rm quepid bundle exec bin/rake db:setup | ||
docker-compose run quepid bundle exec thor user:create -a [email protected] "Chorus Admin" password | ||
log_minor "Setting up Chorus Baseline Relevance case" | ||
if $local_deploy; then | ||
solr_collection_url=http://localhost:8983/solr/ecommerce/select | ||
else | ||
solr_collection_url=http://chorus.dev.o19s.com:8983/solr/ecommerce/select | ||
fi | ||
docker-compose run quepid thor case:create "Chorus Baseline Relevance" solr ${solr_collection_url} JSONP "id:id, title:title, thumb:img_500x500, name, brand, product_type" "q=#\$query##&useParams=visible_products,querqy_algo" nDCG@10 [email protected] | ||
docker-compose run quepid bundle exec thor case:create "Chorus Baseline Relevance" solr ${solr_collection_url} JSONP "id:id, title:title, thumb:img_500x500, name, brand, product_type" "q=#\$query##&useParams=visible_products,querqy_algo" nDCG@10 [email protected] | ||
|
||
docker cp ./katas/Broad_Query_Set_rated.csv quepid:/srv/app/Broad_Query_Set_rated.csv | ||
docker exec quepid thor ratings:import 1 /srv/app/Broad_Query_Set_rated.csv >> /dev/null | ||
|
||
docker exec quepid bundle exec thor ratings:import 1 /srv/app/Broad_Query_Set_rated.csv >> /dev/null | ||
|
||
log_major "Setting up RRE" | ||
docker-compose run rre mvn rre:evaluate | ||
docker-compose run rre mvn rre-report:report | ||
fi | ||
|
||
if $observability; then | ||
echo -e "${MAJOR}Setting up Grafana${RESET}" | ||
log_major "Setting up Grafana" | ||
curl -u admin:password -S -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]", "name":"Chorus Admin", "role":"admin", "login":"[email protected]", "password":"password", "theme":"light"}' http://localhost:9091/api/admin/users | ||
curl -u admin:password -S -X PUT -H "Content-Type: application/json" -d '{"isGrafanaAdmin": true}' http://localhost:9091/api/admin/users/2/permissions | ||
curl -u admin:password -S -X POST -H "Content-Type: application/json" http://localhost:9091/api/users/2/using/1 | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.