Cannot fully change theme using server-vars.yml (Attachment)

2,117 views
Skip to first unread message

Edwardo Hanna

unread,
Apr 28, 2014, 6:19:30 PM4/28/14
to edx-...@googlegroups.com
Hi,

I am trying two things:

Point the Fullstack to my repository fork and
Point the Theme to my repository fork.

I have already forked.

I am gladly taking advice In a previous post about how to change themes: https://groups.google.com/forum/#!topic/edx-code/VjVFT4-Etjw
These are the contents of my server-vars.yml:

---
EDXAPP_LMS_NGINX_PORT: '80'
always_run: false
changed_when: null
delegate_to: null
failed_when: null
ignore_errors: false
inventory_dir: /Users/feanil/src/configuration/playbooks/vagrant
item: ''
local_dir: path/to/ansible_local
migrate_db: 'yes'
openid_workaround: true
playbook_dir: ../../../playbooks
register: null
secure_dir: path/to/secure_example
edx_platform_repo: git://github.com/echanna/edx-platform.git
edx_platform_version: master
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: git://github.com/echanna/edx-theme.git
edxapp_theme_version: master

next I entered:

sudo /edx/bin/update edx-platform master --limit @/home/vagrant/edxapp.retry > updateLog.txt

(I have attached the updateLog for Viewing)

What could be causing this?  I look forward to someone's solution who has a way around this. Many thanks.



Edward
updateLog.txt

Yarko Tymciurak

unread,
Apr 28, 2014, 6:46:19 PM4/28/14
to edx-...@googlegroups.com
a quick glance:   migrations fail since root isn't allowed mysql access;


sudo -u www-data

not sure if that will work for the entire update for edx-platform (but I would think so) -   but give it a quick try.
You might also want to take a quick look, make sure that part of your edx-platform tree is not (now) owned by "root" - what would be kinda nasty!   If so, you can run a recursive chown to fix.

Good luck!



Edwardo Hanna

unread,
Apr 29, 2014, 2:51:38 PM4/29/14
to edx-...@googlegroups.com
Hello Yarko,

I am trying the latest Fullstack. I created the server-vars.yml and have the following:

edx_platform_repo: git://github.com/echanna/edx-platform.git
edx_platform_version: master
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: git://github.com/echanna/edx-theme.git
edxapp_theme_version: master

next I enter:

sudo /edx/bin/update edx-platform master

after the successful update I ran:

sudo service nginx restart
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:

However when I preview the LMS and CMS I still see the blue default theme. Shouldn't the theme be red like? Thanks for your earlier suggestions. But how can I see the Stanford theme?

Ray Hooker

unread,
Apr 29, 2014, 3:08:39 PM4/29/14
to edx-...@googlegroups.com
Check your /edx/app/edxapp/lms.env.json and see if FEATURES .. USE_CUSTOM_THEME is true.  It takes both that feature value and the variable THEME_NAME set to the name of the your theme.   By the way you set the use custom theme using the extra vars variable "edxapp_use_custom_theme".    I assume you specified your extra variables when you ran the playbook?  (e.g., --extra-vars "@../util/install/build-production.yml")  where the value can either be a relative or absolute path.

Ray
--
Ray Hooker

Yarko Tymciurak

unread,
Apr 29, 2014, 3:19:16 PM4/29/14
to edx-...@googlegroups.com
On Tue, Apr 29, 2014 at 2:08 PM, Ray Hooker <ray.h...@gmail.com> wrote:
Check your /edx/app/edxapp/lms.env.json and see if FEATURES .. USE_CUSTOM_THEME is true.

that is a good thing to confirm, and it should be set by ansible thru edxapp_use_custom_theme in server-vars.yml 


 It takes both that feature value and the variable THEME_NAME set to the name of the your theme.   By the way you set the use custom theme using the extra vars variable "edxapp_use_custom_theme".    I assume you specified your extra variables when you ran the playbook?  (e.g., --extra-vars "@../util/install/build-production.yml")  where the value can either be a relative or absolute path.

Ray


On Tue, Apr 29, 2014 at 2:51 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Hello Yarko,

I am trying the latest Fullstack. I created the server-vars.yml and have the following:

First:  be sure your *.yml file starts with:

---

(three dashes - to indicate beginning of a yaml block)
 


edx_platform_repo: git://github.com/echanna/edx-platform.git

does this form work???    I would think you need either the g...@github.com:edx/edx-platform.git  form, or more properly for ansible use within edx:

GIT_ACCT: echanna
edx_platform_repo: https://{{ COMMON_GIT_MIRROR }}/{{ GIT_ACCT }}/edx-platform.git



edx_platform_version: master
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: git://github.com/echanna/edx-theme.git

see above note

Also - if you forked    github.com/StanfordOnline/edx-theme  --- see PR#4 (although that would only affect, potentially, the image center screen).

Edwardo Hanna

unread,
Apr 29, 2014, 3:53:31 PM4/29/14
to edx-...@googlegroups.com
Thank you Ray and Yarko.

In the /edx/app/edxapp/lms.env.json I have set:

"USE_CUSTOM_THEME": true
"THEME_NAME": "stanford",              (Do these need to be set at all since I am using Ansible?)

(Is Theme name the same as theme Version in the lms.env.json ?)

Also...

(Is the Theme name in the lms.env.json the same as theme name in the server-vars.yml ?)

Also I tried the same form (git://github.com/echanna/edx-platform.git).  What if My repository is Private?  I did not use the three dashes in the yaml block.

How do I specify extra variables(e.g., --extra-vars "@../util/install/build-production.yml")

Yarko Tymciurak

unread,
Apr 29, 2014, 4:17:20 PM4/29/14
to edx-...@googlegroups.com
On Tue, Apr 29, 2014 at 2:53 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Thank you Ray and Yarko.

In the /edx/app/edxapp/lms.env.json I have set:

"USE_CUSTOM_THEME": true
"THEME_NAME": "stanford",              (Do these need to be set at all since I am using Ansible?)


This will / should be overwritten each time you run /edx/bin/update ....    so you can do this in this way to test things, but it will depend on the update script (or you manually) having cloned the theme repository, which should be visible in /edx/app/edxapp/themes
 

(Is Theme name the same as theme Version in the lms.env.json ?)

Theme name is whatever you name it - you can call it "stanford";  you can call it "edwardo" - it will be used to construct the path for the tools which compile coffeescript files, sass file, collect static files, etc. and therefore create the paths which various files use to refer to components (css, etc.). 


Also...

(Is the Theme name in the lms.env.json the same as theme name in the server-vars.yml ?)

You want to get your head around this:   the process is:

  • ansible-playbooks configure your server for you (many, many things);
  • for the various servers, application environment settings are collected (by convention) in a *.env.json file;
  • the various static, pre-run preparation (such as database migrations, static file preparation & collection etc.) tools look in the env.json for what they need;
  • django, upon startup, reads (and runs) the environment settings files, which (e.g.  edx-platform/lms/envs/aws.py)  will override default settings by looking at the appropriate *.env.json file for a variable (default values, when needed, as set in {lms,cms}/envs/common.py).
and then the django server (for example, lms - ready for student login) runs in this constructed environment.


Also I tried the same form (git://github.com/echanna/edx-platform.git).  What if My repository is Private?  I did not use the three dashes in the yaml block.

If your repository is private, then you will probably need ssh keys (?) to access it - but I still think your form is incorrect:  it should then look like g...@github.com:echanna/edx-platform.git (you can see that this is the correct form by setting the remote in your edx-platform, and then trying to query or manually fetching from it:   "git remote add git://github.com/....." will not work).

If you did not use the 3 dashes, then nothing from your server-vars.yml will have been read in (since "---" marks start of record, everything before I expect will be seen as comment).



How do I specify extra variables(e.g., --extra-vars "@../util/install/build-production.yml")

server-vars.yml is a file of extra-vars.   Read the shell script,  /edx/bin/update, as well as  http://docs.ansible.com/playbooks_variables.html#passing-variables-on-the-command-line


Edwardo Hanna

unread,
Apr 29, 2014, 4:57:43 PM4/29/14
to edx-...@googlegroups.com
Thanks. After reading what you said

I currently have in the /edx/app/edxapp/lms.env.json set:


"USE_CUSTOM_THEME": true
"THEME_NAME": "stanford",

I have the three dashes for the YML:

---

edx_platform_repo: g...@github.com:echanna/edx-platform.git

edx_platform_version: master
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: g...@github.com:echanna/edx-theme.git
edxapp_theme_version: master

This is my play recap:

PLAY RECAP ********************************************************************
localhost                  : ok=35   changed=13   unreachable=0    failed=0  

I do not mean to sound repetetive.  But am I suppose to see a red theme, like at the Stanford site? I enter: sudo /edx/bin/update edx-platform master .  This should be a relatively simple exercise. Where am I not doing something right?

Yarko Tymciurak

unread,
Apr 29, 2014, 5:25:24 PM4/29/14
to edx-...@googlegroups.com
I'll try to reproduce (roughly) on fullstack VM;  stay tuned...

Edwardo Hanna

unread,
Apr 29, 2014, 5:54:00 PM4/29/14
to edx-...@googlegroups.com
Thanks, sounds good!

Yarko Tymciurak

unread,
Apr 29, 2014, 9:50:16 PM4/29/14
to edx-...@googlegroups.com
Ok - this is a development / debugging project - 

I have not had the time I would like, but I got this far:

Everything worked with the server-vars.yml modified, until:

python manage.py cms --settings=aws collectstatic

where the problem encountered is 

ValueError: The file 'url("../themes/stanford/images/stanford-video-thumb.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x466fb90>.


Digging thru, there seems to be, in lms,  the calls (throughout) referencing images have this form:

static.url(images/...)

whereas throughout cms, the pattern is such:

url(images/...)

Images in the themes/templates are in this kind of directory pattern:

themes/theme_name/static/images/...

so it seems we will have to adjust the cms templates to "play nice" in the bigger picture.

Since there is some rumblings afoot to unify theming so it (a) works with cms (currently doesn't) and (b) is unified with microsites, the question seems to be how to handle this in the shortrun.

The trouble cascades:

I tried https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack#compile-assets-manually  and it seems that something has changed in general in the url() parsing - no matter what I tried to re-cast the path to the standard stanford theme images, the error related to something malformed.

We have some debugging to do...

I don't have any more time tonight to try, but I suspect this must also be broken on devstack (since the command pipeline will be similar).

If so, then it will take backing up to the last time it worked, and git diffing what changed, and tracking it down (and fixing tests).




On Tue, Apr 29, 2014 at 4:54 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Thanks, sounds good!

Yarko Tymciurak

unread,
Apr 29, 2014, 9:52:13 PM4/29/14
to edx-...@googlegroups.com
Sorry - spent more time debugging than writing the post...


On Tue, Apr 29, 2014 at 8:50 PM, Yarko Tymciurak <yar...@gmail.com> wrote:
Ok - this is a development / debugging project - 

I have not had the time I would like, but I got this far:

Everything worked with the server-vars.yml modified, until:

python manage.py cms --settings=aws collectstatic

where the problem encountered is 

ValueError: The file 'url("../themes/stanford/images/stanford-video-thumb.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x466fb90>.


Digging thru, there seems to be, in lms,  the calls (throughout) referencing images have this form:

static.url(images/...)

whereas throughout cms, the pattern is such:

url(images/...)

Images in the themes/templates are in this kind of directory pattern:

themes/theme_name/static/images/...

so it seems we will have to adjust the cms templates to "play nice" in the bigger picture.

Since there is some rumblings afoot to unify theming so it (a) works with cms (currently doesn't) and (b) is unified with microsites, the question seems to be how to handle this in the shortrun.

The trouble cascades:  

 I tried simply the lms assets to see if we could just bring that up.

Edwardo Hanna

unread,
Apr 29, 2014, 10:20:41 PM4/29/14
to edx-...@googlegroups.com
Many thanks Yarko. Open-Edx is really amazing. I know there is a solution.

Yarko Tymciurak

unread,
Apr 29, 2014, 10:28:47 PM4/29/14
to edx-...@googlegroups.com
oh definitely - this worked rather recently, so it can't be too difficult to track down, even if it takes some time...

Yarko Tymciurak

unread,
Apr 30, 2014, 3:08:54 AM4/30/14
to edx-...@googlegroups.com
Edwardo -

I just tried this with ==almost== stock devstack and it worked just fine;
I just repeated with a new fullstack, and it also worked just fine.

The things I did differently than before (which I am aware of) are:

  • I used 'release' instead of 'master' of edx-platform (might not be a problem);
  • I used Stanford-Online's  edx-theme rather than my older fork (theirs has ben updates, and works now);

Procedures:

devstack:

I want vagrant to read a yaml file when building / provisioning, so these changes were in place to the devstack Vagrantfile:

--- Vagrantfile.release 2014-04-30 01:39:06.000000000 -0500
+++ Vagrantfile 2014-04-30 00:52:53.000000000 -0500
@@ -17,13 +17,19 @@
 source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate
 cd /edx/app/edx_ansible/edx_ansible/playbooks
 
+# handle case where build-version file was removed
+export EXTRA_VARS=""
+BUILD_FILE=/vagrant/build-version.yml
+[ -r ${BUILD_FILE} -a -f ${BUILD_FILE} ] && EXTRA_VARS="--extra-vars \"@${BUILD_FILE}\""
+echo "EXTRA_VARS: [${EXTRA_VARS}]"
+
 # Need to ensure that the configuration repo is updated
 # The vagrant-devstack.yml playbook will also do this, but only
 # after loading the playbooks into memory.  If these are out of date,
 # this can cause problems (e.g. looking for templates that no longer exist).
 /edx/bin/update configuration release
 
-ansible-playbook -i localhost, -c local vagrant-devstack.yml -e configuration_version=release
+ansible-playbook -i localhost, -c local vagrant-devstack.yml -e configuration_version=release ${EXTRA_VARS}
 SCRIPT
 
 edx_platform_mount_dir = "edx-platform"
@@ -44,7 +50,7 @@
 
   # Creates an edX devstack VM from an official release
   config.vm.box     = "injera-devstack"
-  config.vm.synced_folder  ".", "/vagrant", disabled: true
+  # config.vm.synced_folder  ".", "/vagrant", disabled: true
   config.vm.box_url = "http://files.edx.org/vagrant-images/20140418-injera-devstack.box"
 
   config.vm.network :private_network, ip: "192.168.33.10"
@@ -60,6 +66,9 @@
       config.ssh.forward_x11 = true
   end
 
+  # only files in the current directory, less Vagrantfile:
+  config.vm.synced_folder  ".", "/vagrant", type: "rsync", rsync__exclude: [".*/", "*/", "/Vagrantfile*"]
+
   config.vm.synced_folder "#{edx_platform_mount_dir}", "/edx/app/edxapp/edx-platform", :create => true, nfs: true
   config.vm.synced_folder "#{themes_mount_dir}", "/edx/app/edxapp/themes", :create => true, nfs: true
   config.vm.synced_folder "#{forum_mount_dir}", "/edx/app/forum/cs_comments_service", :create => true, nfs: true

In the folder with the devstack  Vagrantfile was this build-version.yml file (I've only shown the uncommented portion, as that is also what was copied to fullstack's  server-vars.yml):

THEME_ACCT: Stanford-Online  # Theme repos
edxapp_theme_name: stanford
edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git
edxapp_theme_version: master
edxapp_use_custom_theme: true  # false to disable & use std. theme 


Now, browse to http://localhost:8000  and you should see the stanford theme.  You can set "edxapp_use_custom_theme" to false, and run  "paver devstack lms"  and you should see the default edx theme.

 fullstack:

  • Bring up a stock vagrant fullstack.
  • vagrant ssh:
    • vi /edx/app/edx_ansible/server-vars.yml  
      • =>  add the lines as in build-version.yml, above;
    • cd /edx/app/edxapp/edx-platform/
    • sudo /edx/bin/update edx-platform release
    • ls ../themes/stanford/
      • confirm theme in place
    • sudo -u edxapp bash
    • source ../edxapp_env
    • rake lms:gather_assets:aws
      • could also just use: paver update_assets lms --settings=aws

Now browse to http://192.168.33.10/  and you should see the stanford theme.


I'm not sure why this didn't work before - it could have been the difference between my old fork, or master (the former more likely).

Regards,
- Yarko

Edwardo Hanna

unread,
Apr 30, 2014, 6:48:38 PM4/30/14
to edx-...@googlegroups.com
Many thanks Yarko! I will try your solution.



Sincerely,
Edward Hanna

Yarko Tymciurak

unread,
Apr 30, 2014, 7:07:23 PM4/30/14
to edx-...@googlegroups.com
I suggest you start with _exactly_ what I did - using github.com/edx/  repositories, and  github.com/Stanford-Online  theme  as a starting place.

That will identify if you have any process or tool issues.

Once that succeeds, it is a small step to try, one at a time, to change the theme repository to your own and update again, then
use the  Stanford's theme, but your repository - that will help you narrow in where any problem may be.

Regards,
- Yarko

Yarko Tymciurak

unread,
Apr 30, 2014, 7:21:16 PM4/30/14
to edx-...@googlegroups.com
I've added the modified Vagrantfile for devstack, and the settings files for both, from above, here for convenience:

https://gist.github.com/yarko/678d095a08dc0e9182fe

This should make reproducing this test easier

Edwardo Hanna

unread,
May 1, 2014, 3:11:47 PM5/1/14
to edx-...@googlegroups.com
Thanks Yarko. You had mentioned that I would need to use SSH Keys in the event that I am using a private Repository. How would I need to modify the build or vars file to do so. I am making the repository of the EDX fork a private mirror that I can update as the Edx project further develops, however the changes I make such as Seneca passwords etc would remain private. Thanks again.

Yarko Tymciurak

unread,
May 1, 2014, 5:52:22 PM5/1/14
to edx-...@googlegroups.com

Edwardo -

There was a PR on the configuration repo to address private repos.  I'm not sure if it's been merged or what it's status is.

You can search PRs there for some discussion.  If you don't find it I'll look when I get home.

- Yarko

Edwardo Hanna

unread,
May 1, 2014, 6:37:32 PM5/1/14
to edx-...@googlegroups.com
Hello Yarko I searched and found these results:

https://github.com/edx/configuration/search?q=private+repository&ref=cmdform&type=Issues

With the Fullstack, is it possible to mount directories as done in the Vagrant File of the devstack? Or is this a different idea on the whole?

Yarko Tymciurak

unread,
May 1, 2014, 7:25:47 PM5/1/14
to edx-...@googlegroups.com


On May 1, 2014 5:37 PM, "Edwardo Hanna" <hanna....@gmail.com> wrote:
>
> Hello Yarko I searched and found these results:
>
> https://github.com/edx/configuration/search?q=private+repository&ref=cmdform&type=Issues

So PR#787 is what I was thinking of.

The bad news is it seems to have stalled.  Unless you feel like looking thru the code and picking it up, trying to complete for yourself you may be be out of luck.

Consider doing everything from open repos, then just manually (with login) pull things which really need to be private (I'll assume there aren't many).

>
> With the Fullstack, is it possible to mount directories as done in the Vagrant File of the devstack? Or is this a different idea on the whole?

Exactly the same for vagrant.

You could copy / mimick devstack Vagrantfile lines which do this, if you know what you're doing.

Not clear why you're trying to do development - like work in fullstack though...

You might want to think about that a bit.

Edwardo Hanna

unread,
May 5, 2014, 5:59:04 PM5/5/14
to edx-...@googlegroups.com
Hello Yarko,

Thanks for your instructions and Gists.  When I tried applying the theme it would not show. This was the server-vars.yml file:

---

#edx_platform_repo: g...@github.com:echanna/edx-platform.git
#edx_platform_version: release
#edxapp_use_custom_theme: true
#edxapp_theme_name: stanford
#edxapp_theme_source_repo: g...@github.com:echanna/edx-theme.git
#edxapp_theme_version: master

edx_platform_repo: g...@github.com:edx/edx-platform.git
edx_platform_version: release
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: g...@github.com:Stanford-Online/edx-theme.git
edxapp_theme_version: master

From what I have read I understand that you don't have to change the lms.env.json. I have done the following to confirm the theme:

vagrant@precise64:/edx/app/edxapp/edx-platform$ ls ../themes/stanford/
static

Does it make a difference that I have studio on : http://192.168.33.10:8001/
and LMS on http://192.168.33.10:8002/
??

I tried following:


fullstack:

  • Bring up a stock vagrant fullstack.
  • vagrant ssh:
    • vi /edx/app/edx_ansible/server-vars.yml  
      • =>  add the lines as in build-version.yml, above;
    • cd /edx/app/edxapp/edx-platform/
    • sudo /edx/bin/update edx-platform release
    • ls ../themes/stanford/
      • confirm theme in place
    • sudo -u edxapp bash
    • source ../edxapp_env
    • rake lms:gather_assets:aws
      • could also just use: paver update_assets lms --settings=aws
what else should be checking for and be doing? Thanks




Edward

Yarko Tymciurak

unread,
May 5, 2014, 6:05:32 PM5/5/14
to edx-...@googlegroups.com
On Mon, May 5, 2014 at 4:59 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Hello Yarko,

Thanks for your instructions and Gists.  When I tried applying the theme it would not show. This was the server-vars.yml file:

---

#edx_platform_repo: g...@github.com:echanna/edx-platform.git

Did you try this _first_ with the canonical  Stanford-Online theme?

How did that work?

If you didn't, please do that first.

If you did, but your "private repo" doesn't show, then checkout your repo manually (use the https://.... protocol, so you can login to get access to your repo) and then do gather the gather assets steps...

Let us know what you did more, and what worked, and when you ran into a snag.

Edwardo Hanna

unread,
May 5, 2014, 6:55:01 PM5/5/14
to edx-...@googlegroups.com
This time I tried again after your latest post. I deleted the edx-platform folder then deleted the stanford theme folder to start clean.

My server-vars is still:

---

#edx_platform_repo: g...@github.com:echanna/edx-platform.git
#edx_platform_version: release
#edxapp_use_custom_theme: true
#edxapp_theme_name: stanford
#edxapp_theme_source_repo: g...@github.com:echanna/edx-theme.git
#edxapp_theme_version: master

edx_platform_repo: g...@github.com:edx/edx-platform.git
edx_platform_version: release
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: g...@github.com:Stanford-Online/edx-theme.git
edxapp_theme_version: master

next I did sudo /edx/bin/update edx-platform release

Then...

PLAY RECAP ********************************************************************
localhost                  : ok=35   changed=12   unreachable=0    failed=0


When I checked the theme folder, "stanford" was not there. I did sudo -u edxapp bash and recreated the Stanford theme folder:

vagrant@precise64:/edx/app/edxapp/themes$ ll
total 16
drwxr-xr-x  4 edxapp edxapp   4096 May  5 22:22 ./
drwxr-xr-x 10 edxapp www-data 4096 May  5 22:09 ../
drwxr-xr-x  3 edxapp edxapp   4096 Apr 29 19:34 master/
drwxr-xr-x  2 edxapp edxapp   4096 May  5 22:22 stanford/

I redid

sudo /edx/bin/update edx-platform release.  The stanford theme folder is empty in-spite of the update.


I was trying to delete the stanford theme folder to see if something was not working. However now the folder is empty even after doing the upgrade. Overall the update is working in that there are no failures. I am not getting update errors. I have only changed the server-vars file. This is an injera fullstack box i did last week. Brand new.

Yarko Tymciurak

unread,
May 6, 2014, 12:45:45 AM5/6/14
to edx-...@googlegroups.com

First - before anything else - what result did you get with the server-vars.yml file set to exactly this:

THEME_ACCT: Stanford-Online


edxapp_theme_name: stanford
edxapp_theme_source_repo: https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git
edxapp_theme_version: master
edxapp_use_custom_theme: true

?

Edwardo Hanna

unread,
May 6, 2014, 9:49:23 PM5/6/14
to edx-...@googlegroups.com
Hello Yarko, I will redo the update and post the log. Thanks.

Edwardo Hanna

unread,
May 7, 2014, 6:40:37 PM5/7/14
to edx-...@googlegroups.com
Hello again, I now seem to have the theme working! Thanks. I will post back.

Edwardo Hanna

unread,
May 8, 2014, 1:27:09 PM5/8/14
to edx-...@googlegroups.com

Yarko Tymciurak

unread,
May 8, 2014, 8:46:03 PM5/8/14
to edx-...@googlegroups.com

Thanks Edwardo -

I'm out of town so I'll luk at mite detail but the first thing which jumped out at me: your comment about modifying lms.env.json: the setting in server-vars. yml should already cause this to be created in the ansible-playbook chain, so something seems amiss (perhaps a bug).

Thanks for the writeup!

FYI, I'm not edx staff, just an open source contributor.

Best regards,
Yarko

Yarko Tymciurak

unread,
May 8, 2014, 8:54:04 PM5/8/14
to edx-...@googlegroups.com


On May 8, 2014 7:46 PM, "Yarko Tymciurak" <yar...@gmail.com> wrote:
>
> Thanks Edwardo -
>
> I'm out of town so I'll luk at mite detail

... I'll look at it in more detail later...

Edwardo Hanna

unread,
May 12, 2014, 11:11:23 AM5/12/14
to edx-...@googlegroups.com
Hello Yarko,

I made a post about the lms.env.json file issue in the edx operations group:

https://groups.google.com/forum/#!topic/openedx-ops/b5fncPnGf68

Douglas Tang

unread,
Sep 10, 2014, 11:34:51 PM9/10/14
to edx-...@googlegroups.com
I run as you said,but also error

vagrant@precise64:~$ cd /edx/app/edxapp/edx-platform/

vagrant@precise64:/edx/app/edxapp/edx-platform$ ls ../themes/stanford/

default_theme_screenshot.jpg  LICENSE.txt  README.md  static  templates

vagrant@precise64:/edx/app/edxapp/edx-platform$ sudo -u edxapp bash

edxapp@precise64:/edx/app/edxapp/edx-platform$ source ../edxapp_env

edxapp@precise64:/edx/app/edxapp/edx-platform$ rake lms:gather_assets:aws

rake aborted!

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:584:in `raw_load_rakefile'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'

/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'

(See full trace by running task with --trace)

edxapp@precise64:/edx/app/edxapp/edx-platform$ paver update_assets lms --settings=aws

---> pavelib.assets.update_assets

---> pavelib.prereqs.install_ruby_prereqs

---> pavelib.prereqs.install_node_prereqs

python manage.py lms --settings=aws preprocess_assets

2014-09-10 23:32:36,128 INFO 7503 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125

xmodule_assets common/static/xmodule

---> pavelib.assets.compile_coffeescript

node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`

sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass

      write lms/static/sass/application-extend1.css

      write lms/static/sass/application-extend1.css.map

      write lms/static/sass/application-extend2.css

      write lms/static/sass/application-extend2.css.map

      write lms/static/sass/application.css

      write lms/static/sass/application.css.map

      write lms/static/sass/course.css

      write lms/static/sass/course.css.map

python manage.py lms --settings=aws collectstatic --noinput > /dev/null

2014-09-10 23:33:22,715 INFO 7570 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125

Traceback (most recent call last):

  File "manage.py", line 95, in <module>

    execute_from_command_line([sys.argv[0]] + django_args)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line

    utility.execute()

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute

    self.fetch_command(subcommand).run_from_argv(self.argv)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv

    self.execute(*args, **options.__dict__)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute

    output = self.handle(*args, **options)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle

    return self.handle_noargs(**options)

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs

    collected = self.collect()

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect

    for original_path, processed_path, processed in processor:

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/storage.py", line 279, in post_process

    content = pattern.sub(converter, content)

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/storage.py", line 218, in converter

    hashed_url = self.url(unquote(joined_result), force=True)

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/storage.py", line 164, in url

    hashed_name = self.hashed_name(clean_name).replace('\\', '/')

  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/storage.py", line 127, in hashed_name

    (clean_name, self))

ValueError: The file 'themes/default/images/sunrise.jpg' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x535a7d0>.



Captured Task Output:

---------------------


---> pavelib.assets.update_assets

---> pavelib.prereqs.install_ruby_prereqs

---> pavelib.prereqs.install_node_prereqs

python manage.py lms --settings=aws preprocess_assets

xmodule_assets common/static/xmodule

---> pavelib.assets.compile_coffeescript

node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`

sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass

python manage.py lms --settings=aws collectstatic --noinput > /dev/null


Build failed running pavelib.assets.update_assets: Subprocess return code: 1

edxapp@precise64:/edx/app/edxapp/edx-platform$ 


在 2014年4月29日星期二UTC+8上午6时19分30秒,Edwardo Hanna写道:
Hi,

I am trying two things:

Point the Fullstack to my repository fork and
Point the Theme to my repository fork.

I have already forked.

I am gladly taking advice In a previous post about how to change themes: https://groups.google.com/forum/#!topic/edx-code/VjVFT4-Etjw
These are the contents of my server-vars.yml:

---
EDXAPP_LMS_NGINX_PORT: '80'
always_run: false
changed_when: null
delegate_to: null
failed_when: null
ignore_errors: false
inventory_dir: /Users/feanil/src/configuration/playbooks/vagrant
item: ''
local_dir: path/to/ansible_local
migrate_db: 'yes'
openid_workaround: true
playbook_dir: ../../../playbooks
register: null
secure_dir: path/to/secure_example
edx_platform_repo: git://github.com/echanna/edx-platform.git
edx_platform_version: master
edxapp_use_custom_theme: true
edxapp_theme_name: stanford
edxapp_theme_source_repo: git://github.com/echanna/edx-theme.git
edxapp_theme_version: master

next I entered:

sudo /edx/bin/update edx-platform master --limit @/home/vagrant/edxapp.retry > updateLog.txt

(I have attached the updateLog for Viewing)

What could be causing this?  I look forward to someone's solution who has a way around this. Many thanks.



Edward

Kenneth Kinyanjui

unread,
Sep 11, 2014, 4:01:17 AM9/11/14
to edx-...@googlegroups.com
I am running production stack and also getting this error


TASK: [edxapp | gather  static assets with paver] *****************************
 failed: [localhost] => (item=lms) => {"changed": true, "cmd": "SERVICE_VARIANT=lms paver update_assets lms --settings=aws ", "delta": "0:01:57.982191", "end": "2014-09-10 14:15:53.523518", "item": "lms", "rc": 1, "start": "2014-09-10 14:13:55.541327"}
stderr: 2014-09-10 10:13:57,693 INFO 14689 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2014-09-10 10:15:35,595 INFO 14790 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
ValueError: The file 'themes/default/images/sunrise.jpg' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x4902b50>.
stdout: ---> pavelib.assets.update_assets

---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py lms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass
      write cms/static/sass/style-app-extend1.css
      write cms/static/sass/style-app-extend1.css.map
      write cms/static/sass/style-app.css
      write cms/static/sass/style-app.css.map
      write cms/static/sass/style-xmodule.css
      write cms/static/sass/style-xmodule.css.map

      write lms/static/sass/application-extend1.css
      write lms/static/sass/application-extend1.css.map
      write lms/static/sass/application-extend2.css
      write lms/static/sass/application-extend2.css.map
      write lms/static/sass/application.css
      write lms/static/sass/application.css.map
      write lms/static/sass/course.css
      write lms/static/sass/course.css.map
      write lms/static/sass/ie.css
      write lms/static/sass/ie.css.map

python manage.py lms --settings=aws collectstatic --noinput > /dev/null


Captured Task Output:
---------------------

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py lms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass
python manage.py lms --settings=aws collectstatic --noinput > /dev/null

Build failed running pavelib.assets.update_assets: Subprocess return code: 1
failed: [localhost] => (item=cms) => {"changed": true, "cmd": "SERVICE_VARIANT=cms paver update_assets cms --settings=aws ", "delta": "0:01:23.722387", "end": "2014-09-10 14:17:17.428706", "item": "cms", "rc": 1, "start": "2014-09-10 14:15:53.706319"}
stderr: 2014-09-10 10:15:55,079 INFO 14831 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2014-09-10 10:17:04,415 INFO 14931 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
ValueError: The file 'themes/default/images/sunrise.jpg' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x53e0e50>.
stdout: ---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets

xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass
      write lms/static/sass/application-extend1.css
      write lms/static/sass/application-extend1.css.map
      write lms/static/sass/application-extend2.css
      write lms/static/sass/application-extend2.css.map
      write lms/static/sass/application.css
      write lms/static/sass/application.css.map
      write lms/static/sass/course.css
      write lms/static/sass/course.css.map
python manage.py cms --settings=aws collectstatic --noinput > /dev/null



Captured Task Output:
---------------------

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets

xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/themes/stanford /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed --sourcemap --cache-location /tmp/sass-cache --load-path ./common/static/sass /edx/app/edxapp/themes/stanford/static/sass --update -E utf-8 */static /edx/app/edxapp/themes/stanford/static/sass
python manage.py cms --settings=aws collectstatic --noinput > /dev/null


Build failed running pavelib.assets.update_assets: Subprocess return code: 1

FATAL: all hosts have already failed -- aborting

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

localhost                  : ok=41   changed=14   unreachable=0    failed=1  

Douglas Tang

unread,
Sep 11, 2014, 4:27:52 AM9/11/14
to edx-...@googlegroups.com
I think you need to change the edxapp_theme_name: 'stanford'
--
I shall return!

Kenneth Kinyanjui

unread,
Sep 11, 2014, 4:40:06 AM9/11/14
to edx-...@googlegroups.com

Should it be in quotes

Sent from Google Nexus 5

Douglas Tang

unread,
Sep 12, 2014, 4:31:12 AM9/12/14
to edx-...@googlegroups.com
Stanford had change from Stanford theme to their new "null" theme (called "default")
--
I shall return!

Kenneth Kinyanjui

unread,
Sep 12, 2014, 4:38:29 AM9/12/14
to edx-...@googlegroups.com
@Douglas so is it working fine now


Or what is the way forward?

Regards
Kenneth Kinyanjui

--------------------------------------------------------------------------------------------------------------------
Software Enginner at AttorneyFee.com
Lead Google Developer Group(GDG) 
GDG Kimathi University
Website|Kenju254  G+ |Google plus Twitter |@kenju254 Skype| "kenmbugua"




Douglas Tang

unread,
Sep 12, 2014, 4:54:28 AM9/12/14
to edx-...@googlegroups.com
Hi, Kenneth
You should changed the following lines to /edx/app/edx_ansible/server-vars.yml
edxapp_theme_name: 'stanford'

To

edxapp_theme_name: 'default'

And It works!
--
I shall return!

Kenneth Kinyanjui

unread,
Sep 12, 2014, 5:25:33 AM9/12/14
to edx-...@googlegroups.com
We should update this on the docs so that others don't get into trouble

academ...@gmail.com

unread,
Jun 2, 2015, 5:39:27 AM6/2/15
to edx-...@googlegroups.com
This helped to me: https://groups.google.com/d/msg/edx-code/u_kcIbJ77H8/t3Z6jjNI2p4J
The error is that after renaming the theme you should modify the paths like "/themes/default/......" in the file static/sass/_yourtheme.scss
Reply all
Reply to author
Forward
0 new messages