Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

  1. First, determine whether your setting should be a dynamically modifiable django admin model setting instead?  If so, it is stored in a django model and available via the django Admin interface.  Changing its values would not require any code changes.  So it is preferable over a code-based django setting unless it is security-sensitive or you anticipate it not changing often for a given openedX deployment.
  2. Determine whether your setting is security-sensitive.
    1. Does it contain any secret keys, private keys, IP addresses, etc?
    2. If so, it is an Auth setting.
    3. Otherwise, it is an Env setting.
  3. Add your setting to your repo's envs python file.  For edx-platform, it would be: 
    1. https://github.com/edx/edx-platform/blob/master/lms/envs/aws.py, or
    2. https://github.com/edx/edx-platform/blob/master/cms/envs/aws.py


      MY_SETTINGS = ENV_TOKENS.get('MY_SETTINGS', MY_DEFAULT_VALUE)
  4. Update the playbook for the appropriate role of the edx/configuration repo.
    1. Add a default at the top of the file: https://github.com/edx/configuration/blob/master/playbooks/roles/edxapp/defaults/main.yml

      EDXAPP_MY_SETTINGS: MY_DEFAULT_VALUE
    2. Add a mapping between the ansible name and the name used in your python file.

      MY_SETTINGS: "{{ EDXAPP_MY_SETTINGS }}"
  5.  To provide overrides of your setting for edx.org deployments, update the YAML files in the following locations:
    1. https://github.com/edx/edx-internal/tree/master/ansible/vars
    2. https://github.com/edx/edge-internal/tree/master/ansible/vars
  • No labels