-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test using Docker based Solr rather than solr_wrapper #2012
Conversation
A question about this approach, do we need to offer a way that Blacklight adopters can easily run Blacklight + Solr locally for their development? |
@mejackreed I think this still preserves generating the solr_wrapper into the host application gemfile, it just doesn't use solr_wrapper for |
I think it will be easier on adopters to use docker compose. And running our application can be done using Here is an example compose file that I've been using successfully for the last year: https://github.com/tulibraries/tul_cob/blob/master/docker-compose.yml Note that I prefer not to bind the ports so that I can load multiple applications at once. But this is not necessary. Also I've configured to be able to work with traefik with which is not something most users will care about. |
Where does This is getting a solr to run from... an image maintained by someone else? How does it have the schema that BL expects, or does BL no longer expect a non-default solr schema? If new versions of solr are released, will this automatically get them? (Present solution does, theoretically. I am not at all opposed to giving that up though). |
@jrochkind The image is pulled from the repository here: https://hub.docker.com/_/solr/ The config is sent to solr with the command here: |
Ah, I see, thanks. The present solution does that checksum-checking thing, which is an area that has lately been full of bugs/churn. This solution does not do that at all (which I think is fine), which avoids that whole thing being a problem. (Present solution could also have checksum-checking turned off). |
FWIW, as a result of this conversation I decided to test out this docker solr approach for our CI and it worked great. We were having some issues getting solr_wrapper to run, and this worked pretty much right away. So, for CI, this seems like the easier option (speaking as a person fairly new to BL). |
Great @cdmo ! One more quick question, is there a way that running I'm trying to understand the CI vs local development modes here and how they might be used. |
It might be that docker is just available and running in the travis environment. But locally a user would either have to have it running or enable it before running it. Someone in slack pointed this out as a possible hurdle to adoption; and I guess I agree. |
👏 It'd be nice to make it easy to run tests locally that isn't:
I wonder if we ought to wrap that in a rake task? (Actually, saying that, I wonder if we could add a flag to solr_wrapper to have it use docker instead of downloading and running solr from source? Maybe that'd address some of the hurdles to adoption?) |
@cbeer I was thinking the same thing and just made a quick attempt here. But, it actually works pretty well, including the |
Adding a +1 to this ticket. As newcomer to Blacklight, I show up understanding Docker (and Solr in Docker) but having to learn solr_wrapper. |
Approved by group consensus at blacklight-summit 2019 |
It seems like we need to add some documentation about how to run the |
No description provided.