Sumac deployment fails with `RUN_MEILISEARCH: false`
Bug description
Tutor deployment, running the Sumac release, fails with ConnectionError: Unable to connect to Meilisearch when RUN_MEILISEARCH: false is set.
I believe there are three steps in the platform launch where the RUN_MEILISEARCH setting is not honoured:
- https://github.com/overhangio/tutor/blob/release/tutor/commands/jobs.py#L49
- https://github.com/overhangio/tutor/blob/release/tutor/templates/jobs/init/lms.sh#L14
- https://github.com/overhangio/tutor/blob/release/tutor/templates/jobs/init/cms.sh#L24
How to reproduce
- Set
RUN_MEILISEARCH: falseinconfig.yml - Run
tutor config save - Launch the platform as usual
Environment
Seeing the same failure with tutor local and tutor k8s
I think you may be mistaken in the meaning of the RUN_MEILISEARCH setting. Meilisearch is a required component of the Open edX stack with Tutor in Sumac. Setting RUN_MEILISEARCH=false merely configures Tutor to point to an externally-hosted instance of Meilisearch. Thus, if you set RUN_MEILISEARCH=false, then you also need to set MEILISEARCH_URL and other settings.
@regisb What do you think about flagging a configuration error, and refusing to start, if RUN_MEILISEARCH is set to false while MEILISEARCH_URL is simultaneously set to its default?
I think you may be mistaken in the meaning of the RUN_MEILISEARCH setting. Meilisearch is a required component of the Open edX stack with Tutor in Sumac. Setting RUN_MEILISEARCH=false merely configures Tutor to point to an externally-hosted instance of Meilisearch. Thus, if you set RUN_MEILISEARCH=false, then you also need to set MEILISEARCH_URL and other settings.
I see, in that case I misunderstood the setting indeed. From the release notes I read:
Two recent features, Studio Course Search and the new Content Libraries (beta), require Meilisearch and will be hidden from the UI if Meilisearch is not available. (For the Content Libraries beta, this affects only the UI - developers can still use the APIs without Meilisearch.)
Which made me believe that running without Meilisearch is an option for the platform as a whole (And, I assumed possible with Tutor)
This part of the release notes seems to be incorrect. I guess that the issue that you are pointing out is a bug both in the Sumac release notes and the Tutor documentation.
What do you think about flagging a configuration error, and refusing to start, if RUN_MEILISEARCH is set to false while MEILISEARCH_URL is simultaneously set to its default?
Yes, that would help. I'm all for it. Except that we should (probably) not refuse to start, but instead log a big fat warning in stderr. There might be good reasons to keep the default meilisearch URL, such as custom DNS, running a separate k8s service, etc.