Adding solr cloud service to babel - #239
Conversation
| environment: | ||
| - ZK_HOST=zoo1:2181 | ||
| - SOLR_OPTS=-XX:-UseLargePages | ||
| depends_on: |
There was a problem hiding this comment.
Not sure if depends_on: zoo1 is actually doing anything once it goes through extends: in the main compose file (Compose doesn't carry depends_on through extends, it has to be redeclared where you extend it). Does zoo1 come up before solr?
|
In Solr Admin/ZK Status I get the warning
Not sure if this is expected. Also, after performing the steps outlined in lss_solr_configs, core-x_shard1_replica_n1 shows 0 documents. Maybe its the ZK status thing. I guess it doesn't matter since one of the next steps is to have a sample index integrated so we don't have to do this manually. |
moseshll
left a comment
There was a problem hiding this comment.
I was able to (re)index the sample and bring up Solr as described. Errors encountered in previous iteration are gone now. APPROVE
|
@aelkiss @moseshll @kron-spar and @eumalin, please check the changes I've applied to have access to Solr 6 and Solr 9. I've tested, and it is working fine with Solr 6; I'm not sure it works with Solr 9. Everything starts out fine with Solr 9, with no errors, but the queries return empty results. It could be related to an incompatibility with Perl code, not to these changes. I have updated some config files in Babel to have access to Solr 6 and Solr 9. By default, when running the commands, the application will start with Solr 6. Running it will start up and access Solr 9. I have defined Solr6 and Solr 9 services in the
I've seen some warnings in the Apache logs that I fixed too; please check if the fix makes sense Error: Fix: Error: Fix |
|
@liseli Using Claude, I tried this out end to end. I brought up zoo1 and Solr 9, ran perl-dev and apache, and made a request through Apache to check the environment variables. Everything works: PassEnv is passing the Solr URLs through correctly, and local.conf is being used (docker-compose.yml copies docker-local.conf over it, so your edits do apply). I think the empty results have two separate causes:
The Institutions.pm fix looks good to me, simple, safe way to stop the warning. One thing I couldn't find: the catalog/.htaccess fix (commenting out php_value magic_quotes_gpc) isn't in this PR. Did that get committed somewhere else, or did it not make it in? |
|
I note that with a temp hack to the way ls/slip-lib handle basic auth, I can run a query but Solr responds with " |
|
@moseshll Good finding, that tracks. Production has the pattern for this on a different core (slip-lib/Config/run-20.conf:101): The ctrlnum error after that is probably a separate schema issue on the Solr 9 side. @liseli, it's worth checking whether core-x's config set matches the production mbooks schema. |
|
@eumalin I had identified an issue with I found that after I excised the fields Obviously the dismax yaml files need to be left intact for the time being, so I anticipate having e.g. |
|
|
||
| my $host = $ENV{'HTTP_HOST'} || 'localhost'; | ||
| my $idp_url = $hash_ref->{template}; | ||
| my $idp_url = $hash_ref->{template} // ''; |
There was a problem hiding this comment.
This will help declutter the logs, because I am certain this is one of the sites of "uninitialized value" warnings cited in ETT-1776. This is the proper mitigation.
|
In light of Lianet's recommended approach I am adding |
|
|
||
| my $url = $self->__get_Solr_select_url($C, $query_string, $AB); | ||
| my $req = $self->__get_request_object($url); | ||
| my $req = $self->__get_request_object($url, $C); |
There was a problem hiding this comment.
So the mdp-config with Solr auth token can be retrieved.
| - SDRDATAROOT=/sdr1 | ||
| - LSS_SOLR_ENGINE_URL_A=http://${LSS_SOLR_HOST:-solr-lss-dev}:8983/solr/core-x | ||
| - LSS_SOLR_ENGINE_URL_B=http://${LSS_SOLR_HOST:-solr-lss-dev}:8983/solr/core-y | ||
| - LSS_SOLR_BASIC_AUTH=YWRtaW46c29sclJvY2tz |
There was a problem hiding this comment.
May be worth a comment that this is the default 'admin:solrRocks' credential
|
|
||
| my $host = $ENV{'HTTP_HOST'} || 'localhost'; | ||
| my $idp_url = $hash_ref->{template}; | ||
| my $idp_url = $hash_ref->{template} // ''; |
There was a problem hiding this comment.
@moseshll I thought we had determined a long time ago that template wasn't actually being used, and so we haven't been keeping it up to date or even populated at all for some institutions. Is this code running but the result is never used anywhere?
|
I'm able to run solr 9 and index documents into it, but if I try to query I get no results and this error in the error log: I'll poke around and see what I can figure out. |
@aelkiss, I fixed this issue. Could you please pull the branch again? It should disappear. |
In the Solr 9 log, we expect to see the error. That is something we will handle as part of a separate task, as we will need to update the code. |
I had an old commit; the newer one with should fix that. With that, querying for One other thing I noticed is that the solr 9 container seems to exit after some point; I'm not 100% sure why, but it looks like something is trying to recreate the collection when it already exists: We'll need to figure that out soon, but regardless, I think this is good enough as a proof-of-concept for now, and we can work out the rest later. |
…ig can be queried for Solr auth token
3cf8937 to
014ebfc
Compare
This PR is to integrate Solr 8 in the babel repository, with these changes we are ready to apply changes on
lsand test them by accessing the Solr 8 cluster.You will start up the services following the instructions in the README.md file.
Once Solr is up and running, access http://localhost:8981/solr/#/~cloud?view=graph, and you will see
The Solr cluster will start and create the collection, but we must manually index the sample data to run queries on the front end. I've created the ticket ETT-1678 to generate an image with the sample data, and then we can add these services to the Docker environment to automatically start Solr with data for testing.
Meanwhile, the process for indexing data is explained here. I've tested it, and it works, but you will need to clone the
lss_solr_configsrepository to your machine and follow the steps to run the scriptindexing_data.sh.After indexing the sample data, you will run queries and see the results