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.RayOn 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:
edx_platform_repo: git://github.com/echanna/edx-platform.git
GIT_ACCT: echannaedx_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
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")
where the problem encountered ispython manage.py cms --settings=aws collectstatic
ValueError: The file 'url("../themes/stanford/images/stanford-video-thumb.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x466fb90>.
whereas throughout cms, the pattern is such:static.url(images/...)
Images in the themes/templates are in this kind of directory pattern:
url(images/...)
so it seems we will have to adjust the cms templates to "play nice" in the bigger picture.themes/theme_name/static/images/...
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:where the problem encountered ispython manage.py cms --settings=aws collectstatic
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:whereas throughout cms, the pattern is such:static.url(images/...)
Images in the themes/templates are in this kind of directory pattern:
url(images/...)
so it seems we will have to adjust the cms templates to "play nice" in the bigger picture.themes/theme_name/static/images/...
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:
--- 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
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
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
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.
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
sudo /edx/bin/update edx-platform release
Then...
PLAY RECAP ********************************************************************
localhost : ok=35 changed=12 unreachable=0 failed=0
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.
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
?
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
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...
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$
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
Should it be in quotes
Sent from Google Nexus 5