YAML plugin template

Hello everyone,
Here is our YAML plugins template. That’s indicates which code changes and overrides which file in Tutor. Of course it’s our experience, if something is wrong just feedback or change it :slight_smile:

Regards,

Murat

================================================

name: myplugin 
version: 0.1.0 
patches: 
      openedx-common-settings: | 
               "GOES TO ": "cms and lms/production.py" , "cms and lms/development.py" 
      openedx-lms-common-settings: | 
               "GOES TO ": "lms/production.py" , "lms/development.py" 
      common-env-features: | 
              "GOES TO ": "lms.env.json/features" , "cms.env.json/features" 
      openedx-auth: | 
              "GOES TO ": "lms.auth.json" , "cms.auth.json" 
      cms-env: | 
              "GOES TO ": "cms.env.json" 
      lms-env: | 
              "GOES TO ": "lms.env.json"              
      openedx-cms-development-settings: | 
              "GOES TO ": "cms and lms/production.py" "cms and lms/development.py" 
      openedx-cms-production-settings: | 
              "GOES TO ": "cms and lms/production.py" "cms and lms/development.py" 
      openedx-cms-common-settings: 
      openedx-lms-development-settings: 
              "GOES TO ": "cms and lms/production.py" "cms and lms/development.py" 
     local-docker-compose-dev-services: | 
             "GOES TO ": "tutor/local/docker-compose.yml" 
      kustomization-resources:            
      kustomization-commonlabels: 
      k8s-ingress-rules: 
      k8s-ingress-tls-hosts: 
      local-docker-compose-nginx-aliases: 
      local-docker-compose-nginx-volumes: 
      nginx-extra: 
      k8s-deployments-nginx-init-containers: 
      k8s-deployments-nginx-volume-mounts: 
      https-create: 
      k8s-volume: 
      proxy-apache: 
      proxy-nginx: 
      k8s-services:

For Installations process please visit [HERE](https://docs.tutor.overhang.io/plugins/gettingstarted.html#yaml-file)

1 Like

What version of tutor are you using?

Because I try this one and doesn’t add anything :confused:

Hi @bryancr89 !
and thanks for your feedback. Yes, I see some differences from Ironwood and Juniper. This YAML file has been used mostly with Ironwood. Now I can not see “lms.auth.json” , “cms.auth.json” on Juniper. ?
Try

openedx-common-settings: |

Instead ?
Thanks…

My understanding is that the openedx-auth file is only created if you have https turned on.

You can find the template here: https://github.com/overhangio/tutor/blob/master/tutor/templates/apps/openedx/config/partials/auth.json

You could try just creating the file alongside the LMS and CMS env files and see if the config setting are saved then.

Hello i try to install your plugin
Install the plugin: tutor plugins install yaml.yml
and i’ve got this error
in “/root/.local/share/tutor-plugins/yaml.yml”, line 22, column 55
[4180] Failed to execute script main

I also use juniper release

Hi @stefanidi
Please check your indentations in your YAML file, and follow this steps below, it should work.

$ cd “$(tutor plugins printroot)” #and edit your yaml file

$ tutor plugins list

$ tutor plugins enable yaml==0.1 #your yaml plugin

$ tutor config save

$ tutor local quickstart

Hi @qali,

As an exercise, I created a plugin that should update an existing LMS feature setting. But instead of updating the feature, it added the plugin setting before the original feature setting. How do we go about updating an already existing LMS feature?

For example, the original feature:

“FEATURES”: {

"CERTIFICATES_HTML_VIEW": true,
"PREVIEW_LMS_BASE": "**********",
"ENABLE_CORS_HEADERS": true,
"ENABLE_COURSE_DISCOVERY": true,   <<<=======original
"ENABLE_COURSEWARE_SEARCH": true

}

But after enabling and saving the plugin setting, it now looks like:

“FEATURES”: {

"CERTIFICATES_HTML_VIEW": true,
"ENABLE_COURSE_DISCOVERY": false,   <<<======duplicate!
"PREVIEW_LMS_BASE": "**********",
"ENABLE_CORS_HEADERS": true,
"ENABLE_COURSE_DISCOVERY": true,   <<<=======original
"ENABLE_COURSEWARE_SEARCH": true

}