Change EDX-Devlopment mode to EDX-Production mode

619 views
Skip to first unread message

Dhastha

unread,
Aug 19, 2013, 5:29:24 AM8/19/13
to edx-...@googlegroups.com
Hi all,

We are currently installing and testing edx on development mode. If I
need to change development mode to production mode(Use mysql), how to
do that?

--




Cheers,

Dhasthagheer
Jr. Software Engineer
Fundamental Research Group
Indian Institute of Technology, Bombay

Andres Lucena

unread,
Aug 19, 2013, 10:44:54 AM8/19/13
to edx-...@googlegroups.com
Hi,

You should study the files in lms/envs/ and cms/envs/

There is where you configure your instance with your settings, it's the Django's classic settings.py files but splited in different files for your needs. The most similar to a production enviroment is the aws.py files.

Then you have 2 choices:

1- Deploy to AWS with the configuration repository: https://github.com/edx/configuration

2- Deploy to your own server, but then you'll need to figure out the nginx/gunicorn/mongo/mysql/virtualenv/pip/envs/etc configurations

Also you should know about the production deployment of Django applications (MODE_DEBUG and how to serve statics).

Bye,
Andrés

Douglas Tang

unread,
May 6, 2014, 11:26:28 PM5/6/14
to edx-...@googlegroups.com
Could you describe it more detail?And show a steps. thanks

在 2013年8月19日星期一UTC+8下午10时44分54秒,Andres Lucena写道:

Yarko Tymciurak

unread,
May 7, 2014, 1:50:32 AM5/7/14
to Dhastha, edx-...@googlegroups.com
First compare vagrant devstack vs. vagrant fullstack instructions.   Fullstack configures the production servers.

Then I suggest you bring up a fullstack VM, and read the /edx/bin/update shell script (which resides in /edx/app/edx_ansible) - in particular, note the form of the ansible-playbook command formed here (which sets tag deploy, used throughout) vs. the form in devstack/Vagrantfile (which uses vagrant-devstack.yml).

Note that you can try to run the respective ansible-playbook commands manually with check-mode to see what they would do:

As for a second thing to keep in mind w.r.t. the django servers,   note that the environment settings are built up in edx, in an orderly way.   For example:

edx-platform/lms/envs:

common.py -  holds default values;
aws.py - includes (overrides and/or adds to) common.py, and then check's  /edx/app/edxapp/lms.env.json environment (or command line / execution environment) for any settings to override the defaults.

Note that the ansible-playbooks are where the lms.env.json file is constructed.
If you edit that file manually, it should be only to test / inform yourself of what works (development time), and what you need set in the ansible playbook chain of events.

Additionally, for devstack, devstack.py includes aws.py, overriding or appending those settings.

Note that, through the good graces of the edX engineers, there are many ansible variables which are appropriately settable as overrides (extra-vars, in ansible terminology).   Extra vars apply last, and override whatever settings may come of the ansible-playbook chain.   This is a good way to set server specific settings and configuration without needing to dive into writing or editing ansible roles and tasks.   You can see examples of such settings set by ansible playbook for your easy editing in (at least) vagrant fullstack's  /edx/app/edx_ansible/server-vars.yml (which is searched for by the update script).

If you have a setting which you want to override - say a port number, it's good to search thru the github.com/edx/configuration repository for that setting to see if you can find an associated deployment variable which you can override in your server-vars.yml.

Hope this helps you get a reasonable start!

Regards,
- Yarko



Reply all
Reply to author
Forward
0 new messages