-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: shared elasticsearch #13
feat: shared elasticsearch #13
Conversation
Thanks for the pull request, @keithgg! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
d7e7323
to
9152acf
Compare
@bradenmacdonald are you the appropriate reviewer? |
@e0d yes I am planning to review this. But for this particular project we had said we'd like to have each PR reviewed by at least one other provider, so before it merges I'd like to have a review from someone outside of OpenCraft. @MoisesGSalas would you be interested in reviewing this? |
@bradenmacdonald sure, I will take a look as soon as possible. |
@keithgg Maybe I'm missing something, but we need to avoid including any instance-specific setup in the chart and its |
@bradenmacdonald Ah good shout. In my head I was thinking in terms of Grove we you had an extra layer of software that will do the config for you. Now that I think about it, it might be possible to add the users via the ES API as part of an init task. I'll check and revert back. |
Hey @keithgg, any updates on when you're planning to get back to this PR? |
@itsjeyd I'll be working on it over the next two days. |
5ed20a1
to
51baa3a
Compare
@bradenmacdonald I've made the changes to simplify the setup. I created a command to set up the ElasticSearch auth that the operator will need to run once. There wasn't a tutor hook that I could use to run it automatically, since all the current hooks are set up to run within a specific container or against a specific namespace. |
How does this work for using shared MySQL, do you have to create the instance-specific credentials manually in that case? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keithgg awesome work here 💯
Thanks for figuring this out and for working through the related issues in tutor and edx-search.
I'm happy with the code, just had some minor requests/comments. There are now quite a few merge conflicts so if you could please rebase it, I'll do a quick test on the rebased version then it's good to go from my perspective.
Then I'll approve it and hand it over to @MoisesGSalas for a final review.
Thanks for the review @bradenmacdonald. I'll go through your comments and make the necessary changes tomorrow. |
4440ccf
to
f50d89d
Compare
@bradenmacdonald I've made the requested changes. Please take a look when time allows.
I'm not sure what you mean here? There isn't a shared MySQL implementation (unless I'm mistaken). |
f50d89d
to
1d1cc92
Compare
What I meant was that you can use Tutor with an existing shared MySQL cluster as described in the docs, and it requires a root user/password ( Can we not do the same thing? It doesn't really matter which container or namespace the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @keithgg , I think this is a great start.
README.md
Outdated
|
||
#### Caveats | ||
|
||
- In order for SSL to work without warnings the CA certificate needs to be mounted in the relevant pods. This is out of scope for this PR as it needs to be an instance level change, which requires more work than intended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be confusing to say "out of scope of this PR" in the README since it won't be part of a PR once merged... maybe say "this isn't yet implemented" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @bradenmacdonald, make sense. I've clarified the wording.
@MoisesGSalas Once you are back and have time, could you please do the final review on this? We can merge it once you've approved it too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response @keithgg, I left a few comments so you can take a look when you have a chance.
5607268
to
104568c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it's working fine now. Thanks a lot @keithgg.
104568c
to
1b9920f
Compare
Thank you for the review @MoisesGSalas!
@bradenmacdonald we can, but that means we'll need to add explicit steps for the user to retrieve the admin password and add it to their If you're happy, I'll add this as part #23, since we'll need to retrieve the CA cert from the |
@keithgg Is this PR blocked on #23 now, or could we merge it once tests are green (since @bradenmacdonald and @MoisesGSalas already approved the changes)? |
@itsjeyd this can be merged. The remaining work will take place in #23. I don't have permissions to merge though. @bradenmacdonald are you able to? |
Done! |
@keithgg 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
This PR adds the helm chart to deploy a standalone Elasticsearch cluster. Ref overhangio/tutor-forum#4
When
elasticsearch.enabled
is true it will deploy a cluster with 3 replicas by default.Operators will need to add/update the following setting in each of their instances.
Caveats
patchStrategicMerge
doesn't work with jobs overhangio/tutor#791Testing instructions
tutor image build openedx
).DOCKER_IMAGE_OPENEDX: docker.io/keithgg/openedx:15.1.2
tutor config save --set K8S_HARMONY_ENABLE_SHARED_ELASTICSEARCH=true --set RUN_ELASTICSEARCH=false
tutor harmony create-elasticsearch-user
to set up your user on the ES clustertutor k8s start && tutor k8s init
Anything ES-related should work as normal, specifically importing a course and doing a search. You can then check that the indexes are created by running the following on one of the ES pods:
$ curl --insecure -u elastic:${ELASTIC_PASSWORD} https://localhost:9200/_cat/indices green open .geoip_databases 22H5xGxATfexbL9sos_jQA 1 1 41 0 78.7mb 39.3mb green open openedx-02-course_info m4cKRBuqReOhKMt2OLWzTA 1 1 0 0 452b 226