Edx platform template modification

6,420 views
Skip to first unread message

Tom Morten Berge

unread,
Feb 9, 2014, 6:36:22 PM2/9/14
to edx-...@googlegroups.com
Hi,

Just installed Edx on an EC2 instance today. And finally looks to be working. :)   Looking really good!
I'm pretty new to this, but I have manged to setup a class. Now I was wondering if there is a way to change the EdX logo? Also is there a way to remove the demo course that is there, or atleast hide it?
Also there are some footer links (like job, press, faq), is there a way to modify/remove these?
So far I have been looking at the manual found here: http://edx.readthedocs.org/projects/ca/en/latest/read_me.html
Maybe the answers are in there, might just not have found them yet. If not, is there any other resources out there?


Thanks,

tom

Yarko Tymciurak

unread,
Feb 10, 2014, 4:06:36 AM2/10/14
to Tom Morten Berge, edx-...@googlegroups.com
On Sun, Feb 9, 2014 at 5:36 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Just installed Edx on an EC2 instance today. And finally looks to be working. :)   Looking really good!
I'm pretty new to this, but I have manged to setup a class. Now I was wondering if there is a way to change the EdX logo? Also is there a way to remove the demo course that is there, or atleast hide it?

Hi Tom -

Welcome to the fun!

For logo / skinning you might start by implementing / getting the Sanford-Online/edx-theme installed.

Do you want a lay of the land also, or just the nitty-gritty?

Lay of the land:
- assets are build with a pipeline of mako (templating engine), coffee[script], and sass (scss processor), and in a somewhat usual django manner, the static assets are collected and placed in one static area.

The "typical" way to hack / try it out is to replace files in the collected space - but this is fools-gold (things will get overridden);
The "quickie" way is to realize that mako, coffee, and sass include edx-platform in their build/search paths (so you could conceivably include a theme in the root of edx-platform for a quick try - but that will get overwritten by any "update" command, so that is a "quicky" - but doesn't buy you much.

The way to do this "for real" involves setting / overriding a couple of ansible variables -
  • THEME_ACCT: Stanford-Online # Theme repos
  • edxapp_use_custom_theme: true # false => to disable & use std. theme
  • edxapp_theme_name: stanford
  • edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git
  • edxapp_theme_version: master

Right now, in a fullstack / deployment, the extra variable which are passed on to ansible are in server-vars.yml, which update reads.
You can add the above items to /edx/var/edx_ansible/server-vars.yml and run "update edx-platform"  I think you should pull this all in - you can check by looking for the theme in /edx/app/edxapp/themes (which should be created, and contain "stanford").

At the moment (as of last Thursday) I can share these two things from my experience:
  • regarding the edx-platform relase-2014-02-05 release, one item from the edx-theme (Stanford's) was not showing (I don't think this is a terribly huge deal;  I have raised the issue on the edx-theme repo, even though the fix may be on edx-platform, or... TBD).
  • the required variables / env settings which django sees are not being passed on correctly to rake tasks;
    • if you add the small changes to 2 files in https://github.com/edx/edx-platform/pull/2387  this should help you (and not otherwise adversly impact anything);
    • #2387 is either short-lived, or temporary, as paver is in the wings to replace rake, so I will need to test the equivalent in the paver pull request;
    • this method (see https://gist.github.com/yarko/8818633) works for devstack / vagrant development, so ideally you will create one build_version.yml file which you develop in devstack, test in fullstack, and use in deployment.   For that to work, update will need a rewrite (I'm working on my take on that this week, along with the related pulls)
The good news:

You will be able to manipulate and develop a build_version.yml spec which definitively defines your box, which you can version, and inspect on your deployment.

RIght now, for the vagrant bring-ups, one issue is specifying the configuration version also.  My current thought is that for devstack, the shell script provisioner which runs on the VM will be better served with a simply python script replacement, which can parse your build_version.yml file and provision with the configuration version you intend.  This will be sweet.  And require testing.   And result in a completely spec'd build.

Let me know if / how this works (or if you find something simpler / easier / better).

Regards,
Yarko

Yarko Tymciurak

unread,
Feb 10, 2014, 1:04:23 PM2/10/14
to edx-...@googlegroups.com, Tom Morten Berge
The good news is - looking at https://github.com/edx/edx-platform/pull/2520, the paver update appears to check for existence of a *.env.json file - so, indirectly, checking that SERVICE_VARIANT is set to at least a default (lms or cms).

The bad news:   I'm now slogging thru all the places in configuration / edx-platform which set SERVICE_VARIANT to figure out [1] from what context, and [2] to try and grok if a default is ensured by each path thru the configuration.



On Monday, February 10, 2014 3:06:36 AM UTC-6, Yarko Tymciurak wrote:

Tom Morten Berge

unread,
Feb 10, 2014, 2:32:11 PM2/10/14
to edx-...@googlegroups.com, Tom Morten Berge
Hi,

Thanks for all your help so far.
I got the standford theme pulled in and loaded. got abit lost after that :)
 So is it safe to start changing the html and css?  What will happen if I pull again later on? will my changes be overwritten?  Would it be safe to copy this theme to "mytheme" and then load it as a custom theme?
Alot of noob questions I guess, but trying to learn :)

Yarko Tymciurak

unread,
Feb 10, 2014, 3:49:37 PM2/10/14
to Tom Morten Berge, edx-...@googlegroups.com

Sorry. Forgot reply-all

On Feb 10, 2014 1:56 PM, "Yarko Tymciurak" wrote:


>
>
> On Feb 10, 2014 1:32 PM, "Tom Morten Berge" wrote:
> >
> > Hi,
> >

> > Thanks for all your help so far.
> > I got the standford theme pulled in and loaded. got abit lost after that :)
>

> If by loaded, you mean you fired up lms, and saw the Stanford theme - great!
>
> You can check it visually against http:/online.Stanford.edu (I'm on mobile, so I think that's the URL; plus I think Stanford changes specific details on their deploy).  On current edx-platform, I was not seeing the background image - but these things get fixed up quickly.  (see https://github.com/Stanford-Online/edx-theme/issues/3 for details).


>
> >  So is it safe to start changing the html and css?  What will happen if I pull again later on? will my changes be overwritten?  Would it be safe to copy this theme to "mytheme" and then load it as a custom theme?
>

> So, once you have the basics looking right, it means you've nailed the edx configuration for theming basics.
>
> Next steps:
> Fork Stanford-Online/edx-theme to your own repo, and perhaps create a development branch.
>
> Before you change any theme code, you can check your fork+branch which you're now working off of:
>
> Change the appropriate variables in the ansible extra vars which you (for now) copied into server-vars.yml
>
> E.g. change THEME_ACCT to your github acct, and the version to your branch name.
>
> You might as well change the theme name - this should just change the name of where it gets pulled into under /edx/app/edxapp/themes
>
> Do another update and check the themes directory for evidence, and bring 'er up!
>
> If all well, start making changes.


>
> > Alot of noob questions I guess, but trying to learn :)
> >
>

> No worries - no one has done any more than hack in the themes to date, I think (save Stanford, and MIT).
>
> We, the independent edx devs, are just trying to get this into place.
>
> Welcome,and let's have lots of fun!
>
> - Yarko

Yarko Tymciurak

unread,
Feb 10, 2014, 3:50:57 PM2/10/14
to Tom Morten Berge, edx-...@googlegroups.com

Sorry - forgot reply-all.

On Feb 10, 2014 2:06 PM, "Yarko Tymciurak"  wrote:
>
> The thing to remember:
>
> You want to change the *.scss (or *.scss.mako), files, as these get processed by rake (soon to be paver) commands.
>
> For the HTML, you want to update mako templates (*.HTML files in the templates directory).  If you want to update templates which are in edx-platform, copy those to your theme and change them there.


>
> On Feb 10, 2014 1:56 PM, "Yarko Tymciurak"  wrote:
>>
>>

>> On Feb 10, 2014 1:32 PM, "Tom Morten Berge" wrote:
>> >
>> > Hi,
>> >

>> > Thanks for all your help so far.
>> > I got the standford theme pulled in and loaded. got abit lost after that :)
>>

>> If by loaded, you mean you fired up lms, and saw the Stanford theme - great!
>>
>> You can check it visually against http:/online.Stanford.edu (I'm on mobile, so I think that's the URL; plus I think Stanford changes specific details on their deploy).  On current edx-platform, I was not seeing the background image - but these things get fixed up quickly.  (see https://github.com/Stanford-Online/edx-theme/issues/3 for details).
>>

>> >  So is it safe to start changing the html and css?  What will happen if I pull again later on? will my changes be overwritten?  Would it be safe to copy this theme to "mytheme" and then load it as a custom theme?
>>

>> So, once you have the basics looking right, it means you've nailed the edx configuration for theming basics.
>>
>> Next steps:
>> Fork Stanford-Online/edx-theme to your own repo, and perhaps create a development branch.
>>
>> Before you change any theme code, you can check your fork+branch which you're now working off of:
>>
>> Change the appropriate variables in the ansible extra vars which you (for now) copied into server-vars.yml
>>
>> E.g. change THEME_ACCT to your github acct, and the version to your branch name.
>>
>> You might as well change the theme name - this should just change the name of where it gets pulled into under /edx/app/edxapp/themes
>>
>> Do another update and check the themes directory for evidence, and bring 'er up!
>>
>> If all well, start making changes.
>>

>> > Alot of noob questions I guess, but trying to learn :)
>> >
>>

>> No worries - no one has done any more than hack in the themes to date, I think (save Stanford, and MIT).
>>
>> We, the independent edx devs, are just trying to get this into place.
>>
>> Welcome,and let's have lots of fun!
>>
>> - Yarko
>>
>> >
>> >

Tom Morten Berge

unread,
Feb 10, 2014, 4:53:48 PM2/10/14
to edx-...@googlegroups.com, Tom Morten Berge
Hi,

One step done, one step fail :)
so I deleted the stanford folder under themes, then forked https://github.com/Stanford-Online/edx-theme into my own github account.
Then clones it (no new branch, operating on master), so I have now a theme edx-theme under the themes direcotry. Then added https://github.com/Stanford-Online/edx-theme to my upstream, and checked in my git config file that origin points to my github.
In server-vars.yml, I now have the following:
THEME_ACCT: norsecode/edx-theme # Theme repos
edxapp_use_custom_theme: true # false => to disable & use std. theme
edxapp_theme_name: edx-theme

edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git
edxapp_theme_version: master

This looks ok to me. Now I wanted to try the update script: /update edx-platform master
This step that fails is this: TASK: [edxapp | gather  static assets with rake]
getting the following errors (seems to be related to the theme I tried to clone in form my fork)
failed: [localhost] => (item=lms) => {"changed": true, "cmd": "SERVICE_VARIANT=lms rake lms:gather_assets:aws ", "delta": "0:00:24.875345", "end": "2014-02-10 21:34:05.029888", "item": "lms", "rc": 1, "start": "2014-02-10 21:33:40.154543"}
stderr: mkdir -p /edx/app/edxapp/edx-platform/.ws_migrations_complete
./manage.py lms --settings aws preprocess_assets --traceback
xmodule_assets common/static/xmodule
2014-02-10 16:33:43,791 INFO 4812 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
node_modules/.bin/coffee --compile `find lms/ cms/ common/ -type f -name *.coffee`
sass --style compressed --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/edx-theme/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/edx-theme/static/sass
rake aborted!
Command failed with status (1): [sass --style compressed --cache-location /...]
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/edx/app/edxapp/edx-platform/rakelib/assets.rake:87:in `block (3 levels) in <top (required)>'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:215:in `block (2 levels) in invoke_prerequisites_concurrently'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `chore'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:45:in `work'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:103:in `process_queue_item'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:117:in `block (2 levels) in start_thread'
Tasks: TOP => gather_assets => assets => assets:all => assets:sass
(See full trace by running task with --trace)
stdout:   overwrite cms/static/sass/style-app-extend1.css
  overwrite cms/static/sass/style-app.css
  overwrite cms/static/sass/style-xmodule.css
      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/application-extend2.scss (Line 23: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/application.scss (Line 22: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/course.scss (Line 14: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
  overwrite lms/static/sass/ie.css
failed: [localhost] => (item=cms) => {"changed": true, "cmd": "SERVICE_VARIANT=cms rake cms:gather_assets:aws ", "delta": "0:00:17.682840", "end": "2014-02-10 21:34:23.155955", "item": "cms", "rc": 1, "start": "2014-02-10 21:34:05.473115"}
stderr: ./manage.py cms --settings aws preprocess_assets --traceback
xmodule_assets common/static/xmodule
2014-02-10 16:34:08,994 INFO 4895 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
sass --style compressed --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/edx-theme/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/edx-theme/static/sass
node_modules/.bin/coffee --compile `find lms/ cms/ common/ -type f -name *.coffee`
rake aborted!
Command failed with status (1): [sass --style compressed --cache-location /...]
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/edx/app/edxapp/edx-platform/rakelib/assets.rake:87:in `block (3 levels) in <top (required)>'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:215:in `block (2 levels) in invoke_prerequisites_concurrently'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `call'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `chore'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/promise.rb:45:in `work'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:103:in `process_queue_item'
/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:117:in `block (2 levels) in start_thread'
Tasks: TOP => gather_assets => assets => assets:all => assets:sass
(See full trace by running task with --trace)
stdout:       error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/application-extend2.scss (Line 23: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/application.scss (Line 22: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)
      error lms/static/sass/course.scss (Line 14: File to import not found or unreadable: edx-theme.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static
  /edx/app/edxapp/themes/edx-theme/static/sass)

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/ubuntu/edxapp.retry


Any ideas what I have missed?

Yarko Tymciurak

unread,
Feb 10, 2014, 5:23:35 PM2/10/14
to edx-...@googlegroups.com, Tom Morten Berge


On Monday, February 10, 2014 3:53:48 PM UTC-6, Tom Morten Berge wrote:
Hi,

One step done, one step fail :)
so I deleted the stanford folder under themes, then forked https://github.com/Stanford-Online/edx-theme into my own github account.
Then clones it (no new branch, operating on master), so I have now a theme edx-theme under the themes direcotry. Then added https://github.com/Stanford-Online/edx-theme to my upstream, and checked in my git config file that origin points to my github.
In server-vars.yml, I now have the following:
THEME_ACCT: norsecode/edx-theme # Theme repos

this (THEME_ACCT) should only be:   norsecode,  without the edx-theme part.
 
edxapp_use_custom_theme: true # false => to disable & use std. theme
edxapp_theme_name: edx-theme

Probably want this some name that makes more sense / less confusing - like  'toms_theme' (without the quotes), or 'built_on_stanfords_theme' - it should be something which logically distinguishes is.

For example,  naming the stanford theme "stanford" was nowhere, but in my choice to name it so, here.
 

edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git

COMMON_GIT_MIRROR is (by default, in the ansible tree) set to "github.com", so (the way you defined THEME_ACCT) this would create:

http://github.com/norsecode/edx-theme/edx-theme.git --- which (if you check your repo page) is not what your repo's clone link is - it is (I just copied from your repo page):


Changing THEME_ACCT to just norsecode  will fix that.
This makes sense - the git repository wasn't found (as the name was formed) so this failed too..
 
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/themes/edx-theme/static/sass

This one didn't exist, because your theme clone failed;

Anyway, that change to THEME_ACCT should solve it for you.
Keep us up to date on your progress!

Regards,
- Yarko

Yarko Tymciurak

unread,
Feb 10, 2014, 5:36:59 PM2/10/14
to edx-...@googlegroups.com, Tom Morten Berge


On Monday, February 10, 2014 4:23:35 PM UTC-6, Yarko Tymciurak wrote:


On Monday, February 10, 2014 3:53:48 PM UTC-6, Tom Morten Berge wrote:
Hi,

One step done, one step fail :)
so I deleted the stanford folder under themes, then forked https://github.com/Stanford-Online/edx-theme into my own github account.
Then clones it (no new branch, operating on master), so I have now a theme edx-theme under the themes direcotry. Then added https://github.com/Stanford-Online/edx-theme to my upstream, and checked in my git config file that origin points to my github.
In server-vars.yml, I now have the following:
THEME_ACCT: norsecode/edx-theme # Theme repos

this (THEME_ACCT) should only be:   norsecode,  without the edx-theme part.
 
edxapp_use_custom_theme: true # false => to disable & use std. theme
edxapp_theme_name: edx-theme

Probably want this some name that makes more sense / less confusing - like  'toms_theme' (without the quotes), or 'built_on_stanfords_theme' - it should be something which logically distinguishes is.

For example,  naming the stanford theme "stanford" was nowhere, but in my choice to name it so, here.

So, the way I think of this:

the theme is named edxapp_theme_name (stanford - anything you want to identify it as, which will read nicely) on my server,
which was created from the edxapp_theme_version (master in this case; can be branch, tag, or specific version)
of the edxapp_theme_source_repo (https://github.com/norsecode/edx-theme.git in this case).

Tom Morten Berge

unread,
Feb 11, 2014, 9:45:36 AM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge
Hi,

Thanks again for everything.

I am still using  edxapp_theme_name as stanford, not able to get it to work with any other name. When I use another name, I see the clones repo, but there is a name dependency somewhere which I have not been able to locate yet. In the theme itself, the template name is used, so I did a sed replace with the new name but that still didn't work. So maybe there is another dependency somewhere. For now though, I am moving ahead with the stanford name.
I have started to modify the theme, so far so good :)
However I have another issue. I seem to still be using localhost, instead of the IP of my E2C instance. I saw this when I got my confirmation email when signing up for a studio account. I substituted my ip into the confirmation link at it worked, but I need to make the switch somewhere. I'm assuming this is the reason why the Live view button in studio is not working either. Been googling, and found this:
You need to put the server name in the PREVIEW_LMS_BASE variable, found in the cms.env.json and lms.env.json files.
So I tried to override it in my server-vars.yml like this: PREVIEW_LMS_BASE = xx.xx.xxx.xxx, or is it ok to edit the json files directly?
Does not look like it had the desired effect. Any more smart ideas?   :) 
In the meanwhile I'm going to play around with the json files.

Ovnicraft

unread,
Feb 11, 2014, 9:53:29 AM2/11/14
to Tom Morten Berge, edx-...@googlegroups.com
On Tue, Feb 11, 2014 at 9:45 AM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Thanks again for everything.

What about USE_CUSTOM_THEME var set to True ?

Regards, 



--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Feb 11, 2014, 11:09:32 AM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge


On Tuesday, February 11, 2014 8:45:36 AM UTC-6, Tom Morten Berge wrote:
Hi,

Thanks again for everything.

I am still using  edxapp_theme_name as stanford, not able to get it to work with any other name. When I use another name, I see the clones repo, but there is a name dependency somewhere which I have not been able to locate yet. In the theme itself, the template name is used, so I did a sed replace with the new name but that still didn't work. So maybe there is another dependency somewhere. For now though, I am moving ahead with the stanford name.
I have started to modify the theme, so far so good :)

Tom - thanks for this.

Remember - we, independent Open edX developers are blazing the trail here, making the path.  It is entirely possible (in fact is has been) that there are hard-coded values peppered throughout configuration and platform.   We need to find and clean these up wherever they cause problems for us Open edX (independent) developers.

However I have another issue. I seem to still be using localhost, instead of the IP of my E2C instance. I saw this when I got my confirmation email when signing up for a studio account. I substituted my ip into the confirmation link at it worked, but I need to make the switch somewhere. I'm assuming this is the reason why the Live view button in studio is not working either. Been googling, and found this:
You need to put the server name in the PREVIEW_LMS_BASE variable, found in the cms.env.json and lms.env.json files.
So I tried to override it in my server-vars.yml like this: PREVIEW_LMS_BASE = xx.xx.xxx.xxx, or is it ok to edit the json files directly?
Does not look like it had the desired effect. Any more smart ideas?   :) 
In the meanwhile I'm going to play around with the json files.

You should be able to set this in server-vars.yml, but remember you have to do an "update" for this to be read, and ansible to process this (these are "extra-vars" - variable overrides - for ansible processing).

If you want to spare yourself the agony of a constantly churning edx-platform code-base while you're doing this, be sure to also set edx_platform_version to your current version, or perhaps a recent release tag. You can add this to server-vars.yml also (see https://gist.github.com/yarko/8818633 for examples in the commented out portions, but be sure to also check the tags in https://github.com/edx/edx-platform --- right now it looks like the latest is release-2014-02-05, but I know there is a release-candidate in the pipeline also, so this may change soon).

If you play around with the json files, note they are generated by ansible, and other things besides the json files are too (it will be easy to miss something).

However, you can try that. You may need to watch which rake commands you are willing to run, to be sure you don't use one which might trigger an ansible-playbook command (?) which would then overwrite your *.json files. (The json files are created, I think, by the various to_nice_json filters in ansible - http://docs.ansible.com/playbooks_variables.html#filters-for-formatting-data --- and perhaps more).

You may be put in a situation of finding the individual commands which rake (soon to be paver) will run, and manually cherry-pick which ones you want to try.
Doing that might be handy for experimental development, but I wouldn't want to build a final server that way (it would be hard to be sure you could reproduce the results, I think).

Thanks.
Keep us up to date on your progress.

We "independent open source" edx folks need to help push the cleanups to allow our (not edx.org) development - so lets find what needs those pull requests, and get them in!

Regards,

Yarko Tymciurak

unread,
Feb 11, 2014, 11:13:45 AM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge


On Tuesday, February 11, 2014 8:53:29 AM UTC-6, Cristian Salamea wrote:



On Tue, Feb 11, 2014 at 9:45 AM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Thanks again for everything.

What about USE_CUSTOM_THEME var set to True ?

Tom -

I'm assuming you must have this set, or you wouldn't have reported "name" set to "stanford" working.

At some point, for these discussions, to help you, it would be useful for you to share the server-vars.yml file you're currently using (cleaned up of any private / IP info, of course).

Thanks,
- Yarko

Ovnicraft

unread,
Feb 11, 2014, 11:24:28 AM2/11/14
to Yarko Tymciurak, edx-...@googlegroups.com, Tom Morten Berge
On Tue, Feb 11, 2014 at 11:13 AM, Yarko Tymciurak <yar...@gmail.com> wrote:


On Tuesday, February 11, 2014 8:53:29 AM UTC-6, Cristian Salamea wrote:



On Tue, Feb 11, 2014 at 9:45 AM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Thanks again for everything.

What about USE_CUSTOM_THEME var set to True ?

Tom -

I'm assuming you must have this set, or you wouldn't have reported "name" set to "stanford" working.

At some point, for these discussions, to help you, it would be useful for you to share the server-vars.yml file you're currently using (cleaned up of any private / IP info, of course).

About this, there is any guide to run theme in devstack mode ? 

Regards, 



--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Feb 11, 2014, 11:45:01 AM2/11/14
to Ovnicraft, edx-...@googlegroups.com, Tom Morten Berge
On Tue, Feb 11, 2014 at 10:24 AM, Ovnicraft <ovni...@gmail.com> wrote:



On Tue, Feb 11, 2014 at 11:13 AM, Yarko Tymciurak <yar...@gmail.com> wrote:


On Tuesday, February 11, 2014 8:53:29 AM UTC-6, Cristian Salamea wrote:



On Tue, Feb 11, 2014 at 9:45 AM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Thanks again for everything.

What about USE_CUSTOM_THEME var set to True ?

Tom -

I'm assuming you must have this set, or you wouldn't have reported "name" set to "stanford" working.

At some point, for these discussions, to help you, it would be useful for you to share the server-vars.yml file you're currently using (cleaned up of any private / IP info, of course).

About this, there is any guide to run theme in devstack mode ? 

Regards, 

 
The way I am proposing is what I described in my first reply to this thread.

I am strongly for the concept of a build_version.yml file which specifies versions and repositories of components (including themes) which you would evolve, version, and use in all the stacks (devstack, fullstack, deployment).

Being able to do that is still in flux;  I have a few pull requests to complete the package;  there are things "as yet undiscovered" (dependencies on hard-coded "stanford" theme name???), and some things in flux (for example: I think my pull #2387 - necessary now - will be obsoleted by the paver updates which are well along).

If you like the idea of a versioned, build specification file used to provision, like I'm working towards - then stay tuned (I'd guess a couple of weeks, but something more every couple of days, as I put time into it).

- Yarko

Tom Morten Berge

unread,
Feb 11, 2014, 1:09:05 PM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge
Hi,

I'm testing now. However, (you might be hinting at this above) every time I run update it seems to pull in my edx-theme.git repo, and overwrite any local changes. Doesn't seem to matter what I do (add or commit). Is there a way to avoid this? I know I can push them ofcourse, but I really don't want to push every single change I do :)

Yarko Tymciurak

unread,
Feb 11, 2014, 1:21:16 PM2/11/14
to edx-...@googlegroups.com
forgot to "reply-all"...

---------- Forwarded message ----------
From: Yarko Tymciurak
Date: Tue, Feb 11, 2014 at 12:16 PM
Subject: Re: [edx-code] Edx platform template modification
To: Tom Morten Berge 





On Tue, Feb 11, 2014 at 12:09 PM, Tom Morten Berge wrote:
Hi,

I'm testing now. However, (you might be hinting at this above) every time I run update it seems to pull in my edx-theme.git repo, and overwrite any local changes. Doesn't seem to matter what I do (add or commit). Is there a way to avoid this? I know I can push them ofcourse, but I really don't want to push every single change I do :)

Oh!  This is fundamental in development for edx (there are too many moving parts) - yes, you need to push every single change you make off the server being changed.  That's what branches are great for.  You can squash later.  Commit / push.  Commit / push.   Get your fingers used to it.
I have 3 remotes on my local repositories potentially - my personal fork;  the target fork that I'm developing for;  the edx repo to pull needed changes, merge when I decide.

The only way I can see you getting "around" that is to have a local "repo" which you push to - but then why would you do that?
Keeping a "repo" on your server is ... well, think about the general case of deploying to multiple servers - it's not a development process.

Here's the store (remote pushed to):
Here's the factory (deployment server);
Now we build (ansible);
Now we adjust the process (save to remote);
- repeat;

Yarko Tymciurak

unread,
Feb 11, 2014, 1:21:59 PM2/11/14
to edx-...@googlegroups.com
forgot to "reply-all"...

---------- Forwarded message ----------
From: Yarko Tymciurak
Date: Tue, Feb 11, 2014 at 12:20 PM
Subject: Re: [edx-code] Edx platform template modification
To: Tom Morten Berge 




On Tue, Feb 11, 2014 at 12:16 PM, Yarko Tymciurak  wrote:



On Tue, Feb 11, 2014 at 12:09 PM, Tom Morten Berge wrote:
Hi,

I'm testing now. However, (you might be hinting at this above) every time I run update it seems to pull in my edx-theme.git repo, and overwrite any local changes. Doesn't seem to matter what I do (add or commit). Is there a way to avoid this? I know I can push them ofcourse, but I really don't want to push every single change I do :)
Oh!  This is fundamental in development for edx (there are too many moving parts) - yes, you need to push every single change you make off the server being changed.  That's what branches are great for.  You can squash later.  Commit / push.  Commit / push.   Get your fingers used to it.
I have 3 remotes on my local repositories potentially - my personal fork;  the target fork that I'm developing for;  the edx repo to pull needed changes, merge when I decide.
 

The only way I can see you getting "around" that is to have a local "repo" which you push to - but then why would you do that?
Keeping a "repo" on your server is ... well, think about the general case of deploying to multiple servers - it's not a development process.

Here's the store (remote pushed to):
Here's the factory (deployment server);
Now we build (ansible);
Now we adjust the process (save to remote);
- repeat;

BTW - that may not be "fact" - it is what I have come to realize for myself:  there is no other / better way around it.  

This really looks like the only workable pattern.

And it matches what you need to make pull requests to edx too.

So, I think you might as well get accustomed to it.

Of course, I'm open to other insights.
As long as structured.

Yarko Tymciurak

unread,
Feb 11, 2014, 1:28:32 PM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge


On Tuesday, February 11, 2014 12:09:05 PM UTC-6, Tom Morten Berge wrote:
Hi,

I'm testing now. However, (you might be hinting at this above) every time I run update it seems to pull in my edx-theme.git repo, and overwrite any local changes. Doesn't seem to matter what I do (add or commit). Is there a way to avoid this? I know I can push them ofcourse, but I really don't want to push every single change I do :)

BTW - this is what happens throughout the development chain, the way that ansible is working (intentionally) so you can deploy from "a known, specific source".
It happens (and there is a warning in the wiki) in devstack also - provisioning, well... provisions... and that overwrites / updates things.

The only thing the current wiki / process doesn't clearly incorporate yet (since there isn't yet a method fully in place) is the clarity that would come if you begin to specify repositories other than edx's (i.e. your own), and versions other than master (since the edx repositories are _really_ the edx.org development tree now, this is really inconvenient if you are developing not for edx.org!).

Once you start thinking about "getting a current edx release" and "applying / merging your changes to that image" and "saving that image for a test / sandbox" and then "deploying your results - a combination of edx tree, and your work" --- then this all starts to make perfect sense.

Tom Morten Berge

unread,
Feb 11, 2014, 5:26:07 PM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge
Hi,

Found one thing edx-platform/lms/templates/courseware/courses.html that I need to change, so I decided to fork edx-platform to and make a dev_1 branch.
to get update to work I was hoping it would be enough to add edx_platform_repo: https://{{ COMMON_GIT_MIRROR }}/norsecode/edx-platform.git to  server-vars.yml
Seems to be able to get the files, however it fails later on
TASK: [edxapp | Updating requirement files for git mirror] ********************
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible-1392157396.41-186054391354481 && chmod a+rx /tmp/ansible-1392157396.41-186054391354481 && echo /tmp/ansible-1392157396.41-186054391354481']
<localhost> REMOTE_MODULE command /bin/sed -i -e 's/github\.com/github.com/g' /edx/app/edxapp/edx-platform/requirements/edx/pre.txt /edx/app/edxapp/edx-platform/requirements/edx/post.txt /edx/app/edxapp/edx-platform/requirements/edx/base.txt /edx/app/edxapp/edx-platform/requirements/edx/repo.txt /edx/app/edxapp/edx-platform/requirements/edx/github.txt /edx/app/edxapp/edx-platform/requirements/edx-sandbox/post.txt /edx/app/edxapp/edx-platform/requirements/edx-sandbox/local.txt /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt
<localhost> PUT /tmp/tmp2ou3Ce TO /tmp/ansible-1392157396.41-186054391354481/command
<localhost> EXEC ['/bin/sh', '-c', 'chmod a+r /tmp/ansible-1392157396.41-186054391354481/command']
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=xmhkulnwewcvyfqlohvrtcwwyunfncrs] password: " -u edxapp /bin/sh -c '"'"'echo SUDO-SUCCESS-xmhkulnwewcvyfqlohvrtcwwyunfncrs; /usr/bin/python /tmp/ansible-1392157396.41-186054391354481/command'"'"''
<localhost> EXEC ['/bin/sh', '-c', 'rm -rf /tmp/ansible-1392157396.41-186054391354481/ >/dev/null 2>&1']
failed: [localhost] => {"changed": true, "cmd": ["/bin/sed", "-i", "-e", "s/github\\.com/github.com/g", "/edx/app/edxapp/edx-platform/requirements/edx/pre.txt", "/edx/app/edxapp/edx-platform/requirements/edx/post.txt", "/edx/app/edxapp/edx-platform/requirements/edx/base.txt", "/edx/app/edxapp/edx-platform/requirements/edx/repo.txt", "/edx/app/edxapp/edx-platform/requirements/edx/github.txt", "/edx/app/edxapp/edx-platform/requirements/edx-sandbox/post.txt", "/edx/app/edxapp/edx-platform/requirements/edx-sandbox/local.txt", "/edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt"], "delta": "0:00:00.007397", "end": "2014-02-11 22:23:16.604883", "item": "", "rc": 4, "start": "2014-02-11 22:23:16.597486"}
stderr: /bin/sed: couldn't open temporary file /edx/app/edxapp/edx-platform/requirements/edx/sedMFpfDU: Permission denied

FATAL: all hosts have already failed -- aborting

Not able to interpret what goes wrong. seems to complain about file missing? or permission problems?  

Yarko Tymciurak

unread,
Feb 11, 2014, 5:42:51 PM2/11/14
to Tom Morten Berge, edx-...@googlegroups.com
On Tue, Feb 11, 2014 at 4:26 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Found one thing edx-platform/lms/templates/courseware/courses.html that I need to change, so I decided to fork edx-platform to and make a dev_1 branch.

So - for a template item, I think you should be able to copy this to your theme's:

.../edx-theme/templates/courseware/courses.html

and change it there (have it be part of your theme; not need to clone the entire repo for a single template file)
 
to get update to work I was hoping it would be enough to add edx_platform_repo: https://{{ COMMON_GIT_MIRROR }}/norsecode/edx-platform.git to  server-vars.yml

... you don't mention the command line you used;   I think the "update" script is not ready for what we're doing, but should work properly with your repo specified, and a command line / invoked something like this:

sudo /edx/bin/update edx-platform dev_1

where edx-platform will pick up your repository, and dev_1 will be passed in as the "version" (tag/branch/specific commit) - I think this should work.

... would you share your server-vars.yml file (appropriately sanitized)?

Yarko Tymciurak

unread,
Feb 11, 2014, 5:44:12 PM2/11/14
to Tom Morten Berge, edx-...@googlegroups.com
but - again - I don't think you need another repo; I think you can copy this file into your theme (make any subdirectories to templates as needed), and change that copy.

Tom Morten Berge

unread,
Feb 11, 2014, 6:08:52 PM2/11/14
to edx-...@googlegroups.com, Tom Morten Berge
I am trying that. So I deleted my edx-platform repo (overkill probably), and cloned a new one like this: 

then tried to run update, but still getting the same error as before. Do I have to do anything more then the cloning?
my server-vars.yml now looks like this:

EDXAPP_LMS_NGINX_PORT: '80'
always_run: false
changed_when: null
delegate_to: null
failed_when: null
ignore_errors: false
item: ''
migrate_db: 'yes'
openid_workaround: true
playbook_dir: .
register: null
THEME_ACCT: norsecode # Theme repos
edxapp_use_custom_theme: true # false => to disable & use std. theme
edxapp_theme_name: stanford  #change to this later 

edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git
edxapp_theme_version: dev_1

PREVIEW_LMS_BASE: xx.xx.xxx.xxx

Yarko Tymciurak

unread,
Feb 11, 2014, 6:35:23 PM2/11/14
to edx-...@googlegroups.com
once again, forgot "reply-all"...

---------- Forwarded message ----------
From: Yarko Tymciurak
Date: Tue, Feb 11, 2014 at 5:34 PM
Subject: Re: [edx-code] Edx platform template modification
To: Tom Morten Berge


On Tue, Feb 11, 2014 at 5:08 PM, Tom Morten Berge wrote:
I am trying that. So I deleted my edx-platform repo (overkill probably), and cloned a new one like this: 

Not sure what this is / why you are doing it;

The update script should be doing this.

I'm wondering where you are when you clone this?

If (for example) you are in /edx/app/edxapp  when you "sudo git clone ...." this, none of the settings or ansible preprocessing will happen;
the user settings won't be correct, and ... not sure what else.

If this is what you've done - I'm not sure what the best way out of it is.   Perhaps to delete /edx/app/edxapp/edx-platform entirely, and then do an update using the update script?


then tried to run update, but still getting the same error as before. Do I have to do anything more then the cloning?

If you are manually cloning, this makes a little more sense - the error is a permissions error, and the edx-platform was not created by ansible (which is setting user/file ownership, environments, etc.).

Néstor Mendoza

unread,
Feb 12, 2014, 12:45:45 PM2/12/14
to edx-...@googlegroups.com
Hi, I did the following steps to load the theme:

1.- In /edx/var/edx_ansible/server-vars.yml add:
  • THEME_ACCT: iaen-edu
  • edxapp_use_custom_theme: true
  • edxapp_theme_name: stanford
  • edx_app_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/upex-theme.git
  • edxapp_theme_version: master
2.- update the platform with sudo /edx/bin/update edx-platform master


3.- finally rake devstack[lms] 

But i have this error:

  overwrite cms/static/sass/style-app-extend1.css
  overwrite cms/static/sass/style-app.css
  overwrite cms/static/sass/style-xmodule.css
      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application-extend2.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application.scss (Line 22: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/course.scss (Line 14: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
  overwrite lms/static/sass/ie.css
rake aborted!


can you help me ?

Yarko Tymciurak

unread,
Feb 12, 2014, 1:13:35 PM2/12/14
to edx-...@googlegroups.com
On Wednesday, February 12, 2014 11:45:45 AM UTC-6, Néstor Mendoza wrote:
Hi, I did the following steps to load the theme:

1.- In /edx/var/edx_ansible/server-vars.yml add:
  • THEME_ACCT: iaen-edu
  • edxapp_use_custom_theme: true
  • edxapp_theme_name: stanford
  • edx_app_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/upex-theme.git
  • edxapp_theme_version: master
2.- update the platform with sudo /edx/bin/update edx-platform master

Great!   It really should be this simple.

If all works as I expect, soon you won't even edit server-vars.yml, but have your own "build_version.yml" which holds all the assembly vars, keeps them separate from deploy / server-vars.yml

Here's what is missing - and this is (I think) temporary.   (I have yet to test what edx folks are doing in the migration from rake to paver, but I think it will cover this / not require this pull):

You also need to add / merge (or simply copy in) these changes
If you run cms under a server with USE_CUSTOM_THEME  enabled, right now, you will also need to copy  edx-platform/lms/startup.py to edx-platform/cms/startup.py (save the old one, just to be safe).

Then you should be ready to use rake.
The pull request mentioned makes sure that rake gets the environment created & saved in /edx/app/edxapp/lms.env.json  -  this error is because that's missed now.

Tom Morten Berge

unread,
Feb 13, 2014, 10:35:54 AM2/13/14
to edx-...@googlegroups.com
tried to EDXAPP_PREVIEW_LMS_BASE override you posted in server-vars.yml.
Is there an easy way to check if this worked?  I notices the localhost was used in the confirmation link email when register an account. Not sure how to delete an account yet, so was hoping to test this without creating new accounts everytime. Is there a way to resend the confirmation email, that would be one way I guess :)
I'm  also trying to update the PLATFORM_NAME varaible (probably others to), by running this:
/edx/app/edxapp/edx-platform$ ./manage.py lms --settings mysettings

mysettings.py is located in lms/envs/mysettings.py  and only contains: PLATFORM_NAME="Test Name"
I think this is how I should override it :)
I get the following error:
Traceback (most recent call last):
  File "./manage.py", line 90, in <module>
    startup = importlib.import_module(edx_args.startup)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/lms/startup.py", line 5, in <module>
    from django.conf import settings
ImportError: No module named django.conf

I have no idea about django, so hopefully you have an idea. I get this even when I run --help

Yarko Tymciurak

unread,
Feb 13, 2014, 10:46:44 AM2/13/14
to edx-...@googlegroups.com

neglected "reply all"...

---------- Forwarded message ----------
From: "Yarko Tymciurak" <yar...@gmail.com>
Date: Feb 12, 2014 12:49 PM
Subject: Re: [edx-code] Edx platform template modification
To: "Tom Morten Berge" <tomb...@gmail.com>
Cc:




On Wed, Feb 12, 2014 at 12:23 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Got the update script working now. Just as you said, just delete it first.
To fix my other problem, I tried to copy the courses.html template to a subfoler in my theme and change it there.
How does it know to pick that html file up as oppose to the original one?  Do I need to do anything else?


Specifically, watch the command which rake runs which is a "manage.py" or "django-admin" command;

(rake is just a "make" tool which executes commands).

You want to orient yourself to what degrees of freedom are available.

You will be looking for at least two things, I think:
  • gather_assets (rake name) or collect_static (I think that's the django command)  only update;
    • the path of your theme I expect will be picked-up the various paths to find what it's looking for (courses.html);
    • caveat: I'm a bit of a novice here: edx does things a little custom w.r.t. templates / themes;
  • look at the command which the rake "gather_assets" runs.
  • Mimic it's form - the "lms" and "--settings" parts,  but manually run the "--help" (two dashes) option.
    • this should list all the available admin commands for lms - look for "clear gathered assets" (or collected)
    • I don't know if you need it, but if you run this, you will be sure to have a "fresh, full" gather (i.e. run gather_assets after);
  • run rake -T and see if you can find the equivalent "rake" command (it may add / do other things, may be more complete);
The other "cache" which might get in your way will be (of course) the browser cache - be sure to force-reload when you first try to look at your new theme.

I tried to copy the html file and then modify the text, ( and then run update), but it seems like it still uses the original courses.html in lms/templates/courseware/courses.html
 
thanks again for all your help :)

No worries!

Happy it seems to be working, happy to able to help.

Waiting to hear how this next part works for you.

Yarko Tymciurak

unread,
Feb 13, 2014, 10:47:40 AM2/13/14
to edx-...@googlegroups.com

neglected "reply all"...

---------- Forwarded message ----------
From: "Yarko Tymciurak" <yar...@gmail.com>
Date: Feb 12, 2014 7:21 PM
Subject: Re: [edx-code] Edx platform template modification
To: "Tom Morten Berge" <tomb...@gmail.com>
Cc:

ah!   digging a little more, I think you want to set this:


in your server-vars.yml:   EDXAPP_PREVIEW_LMS_BASE

This makes sense


On Wed, Feb 12, 2014 at 7:19 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
Hi Tom -

I noticed the last few from you were only for me.

Would you mind if I cc'd the last few, and moved this to google groups?

I think others might benefit.




On Wed, Feb 12, 2014 at 6:46 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

things are moving along :)
However, I have not understood how to configure localhost (Would like to set it to the server IP.) and get Live View button in studio to work. Live view address is missing IP in front when I look in browser, so think they are related.
Is there a parameter I can overwrite.
Tried to do this: PREVIEW_LMS_BASE: <IPaddress>  in  server-vars.yml, but no effect.

I'm not sure this will have effect in server-yaml, since this is not an ANSIBLE variable, but rather a django settings.FEATURES  setting (i.e. see:  https://github.com/edx/edx-platform/search?q=PREVIEW_LMS_BASE&type=Code  for the spattering of examples).

Also - I don't imagine you want to use IP addresses, rather DNS names.

Reasons are multiple, but mostly that between nginx and gnunicorn, I think everything is served for localhost, and rewritten to the outside by gnunicorn (I don't have experience w/ setting this up on edx, configuring gnunicorn, but this is what I expect).

With "preview" you are internally linking the cms django instance (server), telling it where the lms local instance is.

Look at the (for example) devstack or test cms/envs/devstack.py (etc.) files for a pattern, and change your... I forget - were you configured to use cms/envs/dev.py, or cms/envs/aws.py?   --- regardless, you should be able to set in aws, since dev includes/ inherits from that (unless you _only_ want it on a dev instance).


BTW - as a django settings feature, somewhere "magic" (that is - I haven't yet bothered to exactly trace it out)  the /edx/app/edxapp/cms.env.json gets created so as to share the django settings with other things (such as rake commands).   At least, that is the "logic" that looks like it must be in place to me...

 
Any ideas?

Thanks,
Tom


On Wed, Feb 12, 2014 at 7:49 PM, Yarko Tymciurak <yar...@gmail.com> wrote:



On Wed, Feb 12, 2014 at 12:23 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Got the update script working now. Just as you said, just delete it first.
To fix my other problem, I tried to copy the courses.html template to a subfoler in my theme and change it there.
How does it know to pick that html file up as oppose to the original one?  Do I need to do anything else?


Specifically, watch the command which rake runs which is a "manage.py" or "django-admin" command;

(rake is just a "make" tool which executes commands).

You want to orient yourself to what degrees of freedom are available.

You will be looking for at least two things, I think:
  • gather_assets (rake name) or collect_static (I think that's the django command)  only update;
    • the path of your theme I expect will be picked-up the various paths to find what it's looking for (courses.html);
    • caveat: I'm a bit of a novice here: edx does things a little custom w.r.t. templates / themes;
  • look at the command which the rake "gather_assets" runs.
  • Mimic it's form - the "lms" and "--settings" parts,  but manually run the "--help" (two dashes) option.
    • this should list all the available admin commands for lms - look for "clear gathered assets" (or collected)
    • I don't know if you need it, but if you run this, you will be sure to have a "fresh, full" gather (i.e. run gather_assets after);
  • run rake -T and see if you can find the equivalent "rake" command (it may add / do other things, may be more complete);
The other "cache" which might get in your way will be (of course) the browser cache - be sure to force-reload when you first try to look at your new theme.

I tried to copy the html file and then modify the text, ( and then run update), but it seems like it still uses the original courses.html in lms/templates/courseware/courses.html
 
thanks again for all your help :)

No worries!

Happy it seems to be working, happy to able to help.

Waiting to hear how this next part works for you.

 


On Tue, Feb 11, 2014 at 11:44 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
but - again - I don't think you need another repo; I think you can copy this file into your theme (make any subdirectories to templates as needed), and change that copy.

Yarko Tymciurak

unread,
Feb 13, 2014, 10:48:06 AM2/13/14
to edx-...@googlegroups.com

neglected "reply all"...

---------- Forwarded message ----------
From: "Yarko Tymciurak" <yar...@gmail.com>
Date: Feb 12, 2014 7:22 PM
Subject: Re: [edx-code] Edx platform template modification
To: "Tom Morten Berge" <tomb...@gmail.com>
Cc:

... the comment in one of the envs files that "this gets set from environment", and this:


is what strongly suggests that is the correct way to do this.



On Wed, Feb 12, 2014 at 7:21 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
ah!   digging a little more, I think you want to set this:


in your server-vars.yml:   EDXAPP_PREVIEW_LMS_BASE

This makes sense
On Wed, Feb 12, 2014 at 7:19 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
Hi Tom -

I noticed the last few from you were only for me.

Would you mind if I cc'd the last few, and moved this to google groups?

I think others might benefit.


On Wed, Feb 12, 2014 at 6:46 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

things are moving along :)
However, I have not understood how to configure localhost (Would like to set it to the server IP.) and get Live View button in studio to work. Live view address is missing IP in front when I look in browser, so think they are related.
Is there a parameter I can overwrite.
Tried to do this: PREVIEW_LMS_BASE: <IPaddress>  in  server-vars.yml, but no effect.

I'm not sure this will have effect in server-yaml, since this is not an ANSIBLE variable, but rather a django settings.FEATURES  setting (i.e. see:  https://github.com/edx/edx-platform/search?q=PREVIEW_LMS_BASE&type=Code  for the spattering of examples).

Also - I don't imagine you want to use IP addresses, rather DNS names.

Reasons are multiple, but mostly that between nginx and gnunicorn, I think everything is served for localhost, and rewritten to the outside by gnunicorn (I don't have experience w/ setting this up on edx, configuring gnunicorn, but this is what I expect).

With "preview" you are internally linking the cms django instance (server), telling it where the lms local instance is.

Look at the (for example) devstack or test cms/envs/devstack.py (etc.) files for a pattern, and change your... I forget - were you configured to use cms/envs/dev.py, or cms/envs/aws.py?   --- regardless, you should be able to set in aws, since dev includes/ inherits from that (unless you _only_ want it on a dev instance).


BTW - as a django settings feature, somewhere "magic" (that is - I haven't yet bothered to exactly trace it out)  the /edx/app/edxapp/cms.env.json gets created so as to share the django settings with other things (such as rake commands).   At least, that is the "logic" that looks like it must be in place to me...

 
Any ideas?

Thanks,
Tom


On Wed, Feb 12, 2014 at 7:49 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
On Wed, Feb 12, 2014 at 12:23 PM, Tom Morten Berge <tomb...@gmail.com> wrote:
Hi,

Got the update script working now. Just as you said, just delete it first.
To fix my other problem, I tried to copy the courses.html template to a subfoler in my theme and change it there.
How does it know to pick that html file up as oppose to the original one?  Do I need to do anything else?


Specifically, watch the command which rake runs which is a "manage.py" or "django-admin" command;

(rake is just a "make" tool which executes commands).

You want to orient yourself to what degrees of freedom are available.

You will be looking for at least two things, I think:
  • gather_assets (rake name) or collect_static (I think that's the django command)  only update;
    • the path of your theme I expect will be picked-up the various paths to find what it's looking for (courses.html);
    • caveat: I'm a bit of a novice here: edx does things a little custom w.r.t. templates / themes;
  • look at the command which the rake "gather_assets" runs.
  • Mimic it's form - the "lms" and "--settings" parts,  but manually run the "--help" (two dashes) option.
    • this should list all the available admin commands for lms - look for "clear gathered assets" (or collected)
    • I don't know if you need it, but if you run this, you will be sure to have a "fresh, full" gather (i.e. run gather_assets after);
  • run rake -T and see if you can find the equivalent "rake" command (it may add / do other things, may be more complete);
The other "cache" which might get in your way will be (of course) the browser cache - be sure to force-reload when you first try to look at your new theme.

I tried to copy the html file and then modify the text, ( and then run update), but it seems like it still uses the original courses.html in lms/templates/courseware/courses.html
 
thanks again for all your help :)

No worries!

Happy it seems to be working, happy to able to help.

Waiting to hear how this next part works for you.

 


On Tue, Feb 11, 2014 at 11:44 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
but - again - I don't think you need another repo; I think you can copy this file into your theme (make any subdirectories to templates as needed), and change that copy.

Yarko Tymciurak

unread,
Feb 13, 2014, 11:10:41 AM2/13/14
to Tom Morten Berge, edx-...@googlegroups.com


On Feb 13, 2014 9:35 AM, "Tom Morten Berge" <tomb...@gmail.com> wrote:
>
> tried to EDXAPP_PREVIEW_LMS_BASE override you posted in server-vars.yml.
> Is there an easy way to check if this worked?

Since this is a FEATURE setting, I would expect it to show up with the rest if them generated in /edx/app/edxapp/cms.env.json

The definitive way to check would be from a django shell - fire up ./manage.py for cms your appropriate --settings, as user edxapp

Then from that shell, check that PREVIEW_LMS_BASE is appropriately set, not overridden by something else somewhere (that's the setting you really care about).

>  I notices the localhost was used in the confirmation link email when register an account. Not sure how to delete an account yet, so was hoping to test this without creating new accounts everytime. Is there a way to resend the confirmation email, that would be one way I guess :)

Not sure how you have mail setup (or not). You could check logs to see if the confirmation showed up there.

> I'm  also trying to update the PLATFORM_NAME varaible (probably others to), by running this:
> /edx/app/edxapp/edx-platform$ ./manage.py lms --settings mysettings
>
> mysettings.py is located in lms/envs/mysettings.py  and only contains: PLATFORM_NAME="Test Name"
> I think this is how I should override it :)

No.

This is a growing "stack" of accumulating overrides.

At the base is (should be) common.py

Then, look at aws.py - it imports * from common, then adds to or overrides.

Then look at dev.py (or devstack.py - either as an example will do).

Whatever you used before "my settings.py" - follow that same pattern, and build up on that, by the same type of "from dev import *" statement at the top.

That way you build on, rather than replace, all the settings.

Make sense?

There are other ways to go about this, but this should answer your immediate question.

> I get the following error:
> Traceback (most recent call last):
>   File "./manage.py", line 90, in <module>
>     startup = importlib.import_module(edx_args.startup)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
>     __import__(name)
>   File "/edx/app/edxapp/edx-platform/lms/startup.py", line 5, in <module>
>     from django.conf import settings
> ImportError: No module named django.conf
>
> I have no idea about django, so hopefully you have an idea. I get this even when I run --help

You need to run all of these as the edxapp user.  See the "compile assets manually" example on

https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack

Tom Morten Berge

unread,
Feb 15, 2014, 10:00:43 AM2/15/14
to Yarko Tymciurak, edx-...@googlegroups.com
On Thu, Feb 13, 2014 at 5:10 PM, Yarko Tymciurak <yar...@gmail.com> wrote:


On Feb 13, 2014 9:35 AM, "Tom Morten Berge" <tomb...@gmail.com> wrote:
>
> tried to EDXAPP_PREVIEW_LMS_BASE override you posted in server-vars.yml.
> Is there an easy way to check if this worked?

Since this is a FEATURE setting, I would expect it to show up with the rest if them generated in /edx/app/edxapp/cms.env.json

The definitive way to check would be from a django shell - fire up ./manage.py for cms your appropriate --settings, as user edxapp

think I have missed something very fundamental :)   didn't not realize I had to be logged in as a different user. 
I treid to login as edxapp by doing this: sudo -u edxapp bash
Then tried to run this command: 
sudo -u www-data python manage.py --settings=aws --service-variant lms  help
I get prompted for a password. How do I know what this is?  Is there a default password, can't remeber creating one at least.
Is the different settings I can use documented anywhere? and what cmd's I can use with a specific setting?
Never used this before, so is this something specific to Edx?  or are these "general" commands?



Then from that shell, check that PREVIEW_LMS_BASE is appropriately set, not overridden by something else somewhere (that's the setting you really care about).

>  I notices the localhost was used in the confirmation link email when register an account. Not sure how to delete an account yet, so was hoping to test this without creating new accounts everytime. Is there a way to resend the confirmation email, that would be one way I guess :)

Not sure how you have mail setup (or not). You could check logs to see if the confirmation showed up there.

Also, I found the email template being used when creating an account, located here: edx-platform/cms/templates/emails
In the template it is referring to a variable called site.
https://${ site }/activate/${ key }
How do I go about finding this variable. I guessing I can't edit it directly, how do I know which database it is tied to (if any), is there a general rule I can follow? 

Yarko Tymciurak

unread,
Feb 15, 2014, 10:39:14 AM2/15/14
to Tom Morten Berge, edx-...@googlegroups.com


On Feb 15, 2014 9:00 AM, "Tom Morten Berge" <tomb...@gmail.com> wrote:
>
>
>
>
> On Thu, Feb 13, 2014 at 5:10 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
>>
>>
>> On Feb 13, 2014 9:35 AM, "Tom Morten Berge" <tomb...@gmail.com> wrote:
>> >
>> > tried to EDXAPP_PREVIEW_LMS_BASE override you posted in server-vars.yml.
>> > Is there an easy way to check if this worked?
>>
>> Since this is a FEATURE setting, I would expect it to show up with the rest if them generated in /edx/app/edxapp/cms.env.json
>>
>> The definitive way to check would be from a django shell - fire up ./manage.py for cms your appropriate --settings, as user edxapp
>
> think I have missed something very fundamental :)   didn't not realize I had to be logged in as a different user. 
> I treid to login as edxapp by doing this: sudo -u edxapp bash
> Then tried to run this command: 
> sudo -u www-data python manage.py --settings=aws --service-variant lms  help
> I get prompted for a password. How do I know what this is?  Is there a default password, can't remeber creating one at least.
> Is the different settings I can use documented anywhere? and what cmd's I can use with a specific setting?

I'm sorry - I think I have mislead you. I mixed up devstack vs. production stack I think.

run rake commands from edxapp use env.  Run ./manape.py as shown at top of (note - edxapp doesn't have sudo privileges):

https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack

Ovnicraft

unread,
Mar 20, 2014, 6:16:44 PM3/20/14
to Yarko Tymciurak, Tom Morten Berge, edx-...@googlegroups.com
Hi i setup theme and works perfectly in devstack, so i am getting problems with production.

I ran deploy until try to run: 

TASK: [edxapp | gather  static assets with rake] ****************************** 

Then i got an error con collectstatic, django is try to collect from: 'themes/stanford/css/themes/stanford/images/stanford-pano.png'

As you see path is double,


Any hint around ?

Regards ! 
--
Cristian Salamea
@ovnicraft

David Azevedo

unread,
Mar 20, 2014, 6:26:54 PM3/20/14
to edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
Hello

Have you git cloned the theme-master from github?

Regards,

David Azevedo

Ovnicraft

unread,
Mar 20, 2014, 6:28:56 PM3/20/14
to David Azevedo, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
On Thu, Mar 20, 2014 at 5:26 PM, David Azevedo <davidc....@gmail.com> wrote:
Hello

Have you git cloned the theme-master from github?

I set git url in configuration to clone from our repo, i that works problem is with compiling assets.

Have you in prod a custom theme ?

Any hint are welcome ! 
 

Regards,

David Azevedo



--
Cristian Salamea
@ovnicraft

David Azevedo

unread,
Mar 20, 2014, 6:34:46 PM3/20/14
to edx-...@googlegroups.com, David Azevedo, Yarko Tymciurak, Tom Morten Berge
Yes

i have one forked theme in production with customization.

I think that image actually is present on your repo ? I ask this because of your error.

ValueError: The file 'themes/stanford/css/themes/stanford/images/stanford-pano.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x3725490>.
collectstatic failed!

If you have your own repo of edx-platform and edx-theme on server-vars.yml ( i tkink) then you can do an upgrade edx-platform and after a edxapp restart ot should work.

David

Ovnicraft

unread,
Mar 20, 2014, 6:42:14 PM3/20/14
to David Azevedo, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
I dont get server-vars.yml with that, so i just confiigured in configuration yml's set custom_theme and all vars.

Its necessary this file ?

Regards,
--
Cristian Salamea
@ovnicraft

Ovnicraft

unread,
Mar 20, 2014, 6:48:43 PM3/20/14
to David Azevedo, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
And yes theme was clone in themes directory, so path is read correctly but collectstatic is crashing.


--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Mar 20, 2014, 7:08:25 PM3/20/14
to Ovnicraft, David Azevedo, Tom Morten Berge, edx-...@googlegroups.com

Try adding PR #2387

David Azevedo

unread,
Mar 20, 2014, 7:23:42 PM3/20/14
to edx-...@googlegroups.com, Ovnicraft, David Azevedo, Tom Morten Berge
So you dont have

/edx/var/edx_ansible/server-vars.yml ?

David

Ovnicraft

unread,
Mar 20, 2014, 7:27:39 PM3/20/14
to Yarko Tymciurak, David Azevedo, Tom Morten Berge, edx-...@googlegroups.com



On Thu, Mar 20, 2014 at 6:08 PM, Yarko Tymciurak <yar...@gmail.com> wrote:

Try adding PR #2387


Yes i apply the PR.

@David yes i got it.

It fails collecting :(



--
Cristian Salamea
@ovnicraft

David Azevedo

unread,
Mar 20, 2014, 7:31:48 PM3/20/14
to edx-...@googlegroups.com, Yarko Tymciurak, David Azevedo, Tom Morten Berge
Ok

sudo /edx/bin/update edx-platform master - update edx-platform master

For me this replaces all platform and theme with new files in github

after i restart edxapp and changes are available online.

i dont need to collect assets in no other way.

David

Ovnicraft

unread,
Mar 20, 2014, 7:34:53 PM3/20/14
to David Azevedo, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
On Thu, Mar 20, 2014 at 6:31 PM, David Azevedo <davidc....@gmail.com> wrote:
Ok

sudo /edx/bin/update edx-platform master - update edx-platform master

Just a question here: theme is clone in /edx/app/edxapp/themes ? i am ok here ?



--
Cristian Salamea
@ovnicraft

David Azevedo

unread,
Mar 20, 2014, 7:41:27 PM3/20/14
to edx-...@googlegroups.com, David Azevedo, Yarko Tymciurak, Tom Morten Berge
Hello

I refer to theme has "edx stanford theme" it is "saved" in /edx/app/edxapp/themes/stanford


David

Ovnicraft

unread,
Mar 20, 2014, 7:43:56 PM3/20/14
to David Azevedo, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
Yes ! here too i really confused with all, i follow all steps set two PRs named here and works with devstack but prod try to collectstaic running task from assets.rake
What i dont know is where paths are setup to debug them.


--
Cristian Salamea
@ovnicraft

David Azevedo

unread,
Mar 20, 2014, 7:52:54 PM3/20/14
to edx-...@googlegroups.com, David Azevedo, Yarko Tymciurak, Tom Morten Berge

I want to add :

I tryed to setup a cheap vps in D.Ocean but the process "vagrant" described in wiki failed, and there was of 500 errors, althoug i followed step by step.

I think we must update the wikis?

David

Yarko Tymciurak

unread,
Mar 20, 2014, 10:57:41 PM3/20/14
to edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
Hi Cristian -


On Thursday, March 20, 2014 5:16:44 PM UTC-5, Cristian Salamea wrote:
Hi i setup theme and works perfectly in devstack, so i am getting problems with production.

I ran deploy until try to run: 

What are you running this from (full stack-vagrant?  full stack native install?)   What exactly were the commands that you "ran deploy"? (I'm assuming it must be you are trying to setup a sandbox from an Ubuntu native install).

Ovnicraft

unread,
Mar 20, 2014, 11:05:23 PM3/20/14
to Yarko Tymciurak, edx-...@googlegroups.com, Tom Morten Berge
http://beta.evex.iaen.edu.ec/static/themes/stanford/images/stanford-pano.cc6fbc8848d9.jpgOn Thu, Mar 20, 2014 at 9:57 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
Hi Cristian -


On Thursday, March 20, 2014 5:16:44 PM UTC-5, Cristian Salamea wrote:
Hi i setup theme and works perfectly in devstack, so i am getting problems with production.

I ran deploy until try to run: 

What are you running this from (full stack-vagrant?  full stack native install?)   What exactly were the commands that you "ran deploy"? (I'm assuming it must be you are trying to setup a sandbox from an Ubuntu native install).

I run ansible-playboook, with vagrant-fullstack.yml

So my problems is when compiling assets url() in scss and css from theme stanford cant resolve paths to images.


Regards,



--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Mar 20, 2014, 11:05:48 PM3/20/14
to edx-...@googlegroups.com, David Azevedo, Yarko Tymciurak, Tom Morten Berge


On Thursday, March 20, 2014 6:43:56 PM UTC-5, Cristian Salamea wrote:
Yes ! here too i really confused with all, i follow all steps set two PRs named here and works with devstack but prod try to collectstaic running task from assets.rake
What i dont know is where paths are setup to debug them.

Two PRs?  What two PRs?

The thing you need to understand:   all the settings in ansible play books are overridden by any "extra-vars" ( ansible-playbook -e .... or ansible-playbook --extra-vars .... ).

the server-vars.yml is passed as an extra-vars parameter.

You can set things there (and anything set there) to override default settings in play books.

The example I think you are trying to follow (with many, many settings on a line - it would be clearer if these were in a yaml file) from


is in place of that.   If you read the script "update" (in /edx/bin/update - which is a link, just follow it) you will see how it forms the ansible-playbook line, and where server-vars.yml is included (-e @some-file.yml   is the way to specify files instead of just variables for extra-vars).

Yarko Tymciurak

unread,
Mar 20, 2014, 11:10:08 PM3/20/14
to edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
it is hard to know how to help without knowing what you did to result in this...


On Thursday, March 20, 2014 5:16:44 PM UTC-5, Cristian Salamea wrote:
Hi i setup theme and works perfectly in devstack, so i am getting problems with production.

I ran deploy until try to run: 

TASK: [edxapp | gather  static assets with rake] ****************************** 

Then i got an error con collectstatic, django is try to collect from: 'themes/stanford/css/themes/stanford/images/stanford-pano.png'


You need to debug this - find how this came to be.   If you are using rake of the update script, you can add the verbose flag, and show what the command lines were which were formed.
If you need to, you can add shell scripts to show what environment settings (if any) might be in play...

You need to debug this, and identify where it is coming from.
 

Ovnicraft

unread,
Mar 20, 2014, 11:11:16 PM3/20/14
to Yarko Tymciurak, edx-...@googlegroups.com, David Azevedo, Tom Morten Berge
On Thu, Mar 20, 2014 at 10:05 PM, Yarko Tymciurak <yar...@gmail.com> wrote:


On Thursday, March 20, 2014 6:43:56 PM UTC-5, Cristian Salamea wrote:
Yes ! here too i really confused with all, i follow all steps set two PRs named here and works with devstack but prod try to collectstaic running task from assets.rake
What i dont know is where paths are setup to debug them.

Two PRs?  What two PRs?

One was merged, another you set me before,

So i am checking the our repo theme and ins not updated from stanford git.

I will update and try again.

Thanks !  



--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Mar 20, 2014, 11:19:23 PM3/20/14
to edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge


On Thursday, March 20, 2014 10:10:08 PM UTC-5, Yarko Tymciurak wrote:
it is hard to know how to help without knowing what you did to result in this...

On Thursday, March 20, 2014 5:16:44 PM UTC-5, Cristian Salamea wrote:
Hi i setup theme and works perfectly in devstack, so i am getting problems with production.

I ran deploy until try to run: 

TASK: [edxapp | gather  static assets with rake] ****************************** 

Then i got an error con collectstatic, django is try to collect from: 'themes/stanford/css/themes/stanford/images/stanford-pano.png'


You need to debug this - find how this came to be.   If you are using rake of the update script, you can add the verbose flag,

...for rake or update or ansible-playbook, you can use a verbose flag.

rake --verbose ...
ansible-playbook --verbose ...
update -v ...

Yarko Tymciurak

unread,
Mar 20, 2014, 11:41:57 PM3/20/14
to Ovnicraft, Tom Morten Berge, edx-...@googlegroups.com


On Mar 20, 2014 10:05 PM, "Ovnicraft" <ovni...@gmail.com> wrote:
>
>
>
> http://beta.evex.iaen.edu.ec/static/themes/stanford/images/stanford-pano.cc6fbc8848d9.jpgOn Thu, Mar 20, 2014 at 9:57 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
>>
>> Hi Cristian -
>>
>>
>> On Thursday, March 20, 2014 5:16:44 PM UTC-5, Cristian Salamea wrote:
>>>
>>> Hi i setup theme and works perfectly in devstack, so i am getting problems with production.
>>>
>>> I ran deploy until try to run: 
>>
>>
>> What are you running this from (full stack-vagrant?  full stack native install?)   What exactly were the commands that you "ran deploy"? (I'm assuming it must be you are trying to setup a sandbox from an Ubuntu native install).
>
>
> I run ansible-playboook, with vagrant-fullstack.yml

I see.  Why don't you try - for now - to use update.

Use the server-vars.yml to set your repositories (you can see example variables to use in https://gist.github.com/yarko/8818633).

Ovnicraft

unread,
Mar 21, 2014, 12:06:23 AM3/21/14
to Yarko Tymciurak, Tom Morten Berge, edx-...@googlegroups.com
Yes i use it.
--
Cristian Salamea
@ovnicraft

Ray Hooker

unread,
Mar 24, 2014, 7:52:00 PM3/24/14
to edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
Any success deploying a custom theme to production?   Like Cristian, I was able to deploy my updated theme to devstack.  I will say that I did have to manually update the envs variable to specify custom-theme true and the theme name.  The push.envs.sh did not work for me.  I have not traced the problem but at least I was able to bring up the customized theme.

In the case of production, I started with a new Ubuntu 12.04 instance in VMWare.   I made some updates to edx-platform that I will check in later and merged in Yarko's pull for  fixes to the assets pipeline to include the custom theme artifacts.  I added these overrides to the server-vars.yml file and specified it as extra variables in the call to ansible-playbook:
sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," -e /edx/var/edx_ansible/server-vars.yml 

******* server-vars.yml****
edxapp_use_custom_theme:true
edxapp_theme_name: 'uncga'
edxapp_theme_source_repo: 'file:///mnt/hgfs/rayhooker/Documents/Work/Projects/SAS/edx-custom-envs/themes/uncga'
******************************

Note that I used the edx_sandbox.yml playbook but would be glad to switch to vagrant-fullstack.yml if that works better.  It did not install my theme though, not did it update any settings or environment variables using the above settings.  I did a grep on the entire /edx directory looking for any reference to the values.  Should it not uses these values to enable the theme??


Ray

Ovnicraft

unread,
Mar 25, 2014, 10:18:56 AM3/25/14
to Ray Hooker, edx-...@googlegroups.com, Yarko Tymciurak, Tom Morten Berge
On Mon, Mar 24, 2014 at 6:52 PM, Ray Hooker <ray.h...@gmail.com> wrote:
Any success deploying a custom theme to production?   Like Cristian, I was able to deploy my updated theme to devstack.  I will say that I did have to manually update the envs variable to specify custom-theme true and the theme name.  The push.envs.sh did not work for me.  I have not traced the problem but at least I was able to bring up the customized theme.

In the case of production, I started with a new Ubuntu 12.04 instance in VMWare.   I made some updates to edx-platform that I will check in later and merged in Yarko's pull for  fixes to the assets pipeline to include the custom theme artifacts.  I added these overrides to the server-vars.yml file and specified it as extra variables in the call to ansible-playbook:
sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," -e /edx/var/edx_ansible/server-vars.yml 

Hi in my case, problem was code in theme we update with stanford and now works ok everything  soon we will deploy the machine.

All steps described here works fine.

Regards !



--
Cristian Salamea
@ovnicraft

Yarko Tymciurak

unread,
Mar 25, 2014, 10:34:04 AM3/25/14
to Ovnicraft, Tom Morten Berge, edx-...@googlegroups.com, Ray Hooker


On Mar 25, 2014 9:19 AM, "Ovnicraft" <ovni...@gmail.com> wrote:
>
>
>
>
> On Mon, Mar 24, 2014 at 6:52 PM, Ray Hooker <ray.h...@gmail.com> wrote:
>>
>> Any success deploying a custom theme to production?   Like Cristian, I was able to deploy my updated theme to devstack.  I will say that I did have to manually update the envs variable to specify custom-theme true and the theme name.  The push.envs.sh did not work for me.  I have not traced the problem but at least I was able to bring up the customized theme.
>>
>> In the case of production, I started with a new Ubuntu 12.04 instance in VMWare.   I made some updates to edx-platform that I will check in later and merged in Yarko's pull for  fixes to the assets pipeline to include the custom theme artifacts.  I added these overrides to the server-vars.yml file and specified it as extra variables in the call to ansible-playbook:

Read up on form of ansible - playbook options: to specify an extra-vars file, it needs to be as I've changed (note '@'):

>> sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," -e "@/edx/var/edx_ansible/server-vars.yml"

>
>
> Hi in my case, problem was code in theme we update with stanford and now works ok everything  soon we will deploy the machine.

There is a small thing between edx-platform & Stanford's edx-theme repository - it will affect the image on homepage, but more importantly it informs of a pattern to use:

https://github.com/Stanford-Online/edx-theme/pull/4

Ray Hooker

unread,
Mar 25, 2014, 1:52:25 PM3/25/14
to edx-...@googlegroups.com
Thanks.  That works.  One oddity that is worth mentioning is what happens when you want to switch to your own fork from the main edX repository.  I did that and updates the playbook vars but the ansible git task does not update the directory.  

I actually went in, updated the .git/config for the forked repo in question and did a "git pull upstream".  If you do a clean install, specifying the alternative git repository I believe it works fine.  It is just when you are changing to a forked repository to fix an existing deployment that you have to manually update the .git/ config and do a git pull.

Ray

Deepak Raj Murugaian

unread,
Jan 25, 2015, 8:52:55 AM1/25/15
to edx-...@googlegroups.com
I did the following steps, but i am not able to use custom theme(Stanford theme) in edx platform. Can you help me to resolve this issue?

Step :1
Step :2
Then created user and demo course based on the following one

Step: 3
Created server-vars.yml file in /edx/app/edx_ansible/

Step: 4

Add the following lines to /edx/app/edx_ansible/server-vars.yml

edxapp_use_custom_theme: true
edxapp_theme_name: 'default'
edxapp_theme_source_repo: 'https://github.com/Stanford-Online/edx-theme.git'
edxapp_theme_version: 'HEAD'

Step: 5 

Run the provisioning scripts  - sudo /edx/bin/update edx-platform release

Error: - I am getting the following error and build fails

TASK: [edxapp | gather  static assets with paver] *****************************

changed: [localhost] => (item=lms)

failed: [localhost] => (item=cms) => {"changed": true, "cmd": "SERVICE_VARIANT=cms paver update_assets cms --settings=aws ", "delta": "0:05:29.794875", "end": "2015-01-25 18:32:50.124015", "item": "cms", "rc": 1, "start": "2015-01-25 18:27:20.329140"}


Looking forward. Thanks.


On Monday, February 10, 2014 at 5:06:22 AM UTC+5:30, Tom Morten Berge wrote:
Hi,

Just installed Edx on an EC2 instance today. And finally looks to be working. :)   Looking really good!
I'm pretty new to this, but I have manged to setup a class. Now I was wondering if there is a way to change the EdX logo? Also is there a way to remove the demo course that is there, or atleast hide it?
Also there are some footer links (like job, press, faq), is there a way to modify/remove these?
So far I have been looking at the manual found here: http://edx.readthedocs.org/projects/ca/en/latest/read_me.html
Maybe the answers are in there, might just not have found them yet. If not, is there any other resources out there?


Thanks,

tom

Randy Ostler

unread,
Mar 13, 2015, 1:37:43 PM3/13/15
to edx-...@googlegroups.com
Does the stanford custom theming even work anymore with the Birch release?

The footer file has calls to about_edx that can't be resolved.
paver update_assets lms --settings=devstack doesn't delete the /tmp/lms_mako directory, so the files don't get updated.

When I click on the 'Terms of Service' link, it complains that the theme_tos.html file can't be found.  I copy the tos to that file in the theme, re-update the assets and it can't be found.

Does this work anymore?

I went through this process 6 months ago without a problem, but now...

Giulio Gratta

unread,
Mar 13, 2015, 5:55:15 PM3/13/15
to edx-...@googlegroups.com
Yes, theming does work with Birch.

1. The "about_edx" should be changed to "about" for birch. That change has just been merged to the default theme. (https://github.com/Stanford-Online/edx-theme/pull/27).

2. In devstack you might have more success running using this command:
env -u NO_PREREQ_INSTALL paver devstack lms
(this tells devstack to install everything from scratch and should rebuild all static files properly as well.)

3. The above command might help in this case as well.

Giulio Gratta
- - - - - - - - - - - - - - - - - - - - - - - - -
B.S. Engineering (Product Design)
Stanford University, Class of 2010

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/745653be-362a-4172-b194-5bd480cfb045%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages