Logic of config.yml and JSON config files

Hi @ak00001! Indeed, there is some misunderstanding here. Let’s break down how tutor config save --interactive works:

  1. You are being asked a couple basic questions about your platform: this sets a few tutor configuration parameters (LMS_HOST, CMS_HOST, ACTIVATE_HTTPS, etc.)
  2. The configuration parameters collected in step 1 are aggregated with the default settings from this file and from the various plugin settings: https://github.com/overhangio/tutor/blob/master/tutor/templates/config.yml
  3. The settings that differ from the default are stored in $(tutor config printroot)/config.yml. It is important to understand that, at this stage, the settings stored in this file do not directly configure your Open edX platform. Instead…
  4. … the configuration parameters from config.yml are used to render many configuration templates, stored in the following template folder: https://github.com/overhangio/tutor/tree/master/tutor/templates These templates include, among others, the lms.env.json, cms.auth.json and lms.auth.json (see common template), the lms and cms production django settings, the nginx and mysql configuration files, the Dockerfile for all containers, etc.
  5. The rendered configuration files from step 4 are stored in $(tutor config printroot)/env. Collectively, these files represent the platform “environment”.

Then, when you (re)start an Open edX platform, the files from the platform environment are used to configure the various services.

Thus, you should understand that adding arbitrary values to config.yml will not affect how your platform work. Instead, you should patch the configuration templates. To do so, you could (but shouldn’t) fork tutor and directly modify the templates. This is not the recommended approach, as it makes it difficult for you to easily upgrade Tutor. Instead, you should create a tutor plugin, as explained here: https://docs.tutor.overhang.io/plugins.html#api-v0

You will install and enable your own plugin that will patch the right files, in the right places with the right values. Some major players are running tutor this way, without having to fork tutor.

3 Likes