Deployment of django-based version of linaro-license-protection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linaro-license-protection |
Fix Released
|
High
|
Данило Шеган |
Bug Description
Development has been done on Ubuntu 12.04 and some issues have been run into during deployment to earlier versions. There is currently an RT ticket open about deployment on mombin.l.o which runs Ubuntu 10.04: https:/
10.04 has earlier version of two key components:
- The problem with Django in 10.04 is that it doesn’t contain the 'staticfiles' module. We only use staticfiles in deployment to package up the static files that we use so they are served up by Apache. We may be able to disable the module completely for deployment (take all references out of settings.py) and just change the Apache setting: Alias /static/ … to point to the static directory containing our icons.
- Apache mod_xsendfile doesn’t have the same options. 0.9 (the version in 10.04) finds files under the Apache config <Directory..> that it is enabled in. We can sort of work with this:
NameVirtualHost _default_
<VirtualHost _default_>
Alias /static/ /home/dooferlad
<Directory /home/dooferlad
Order deny,allow
Allow from all
</Directory>
ServerAdmin <email address hidden>
WSGIScriptAlias / /home/dooferlad
WSGIDaemonPr
<Directory /home/dooferlad
XSendFile on
<Files ../license_
Order deny,allow
Allow from all
</Files>
</Directory>
</VirtualHost>
This will send files in /home/dooferlad
The Updated mod_sendfile (in 12.04) is much more flexible and would allow us to have:
<Directory /home/dooferlad
XSendFile on
Order deny,allow
Allow from all
</Files>
</Directory>
This allows a pleasing split between files being served and the django app.
IS has nothing against upgrading mombin.l.o to 12.04:
[2012/07/02 17:47:37] <ChrisS> gesha: If it can't be made to work in 10.04 a VM is one option. Alternatively, we could upgrade mombin to precise (although given the number of things that machine gets used for, it might be a bit involved)
Creating VMs is not so easy:
[2012/07/02 18:50:09] <ChrisS> gesha: We tend to have dedicated VM hosts rather than adding them to existing systems, so it's not going be a straightforward process, I'm afraid.
RT ticket for setup staging servers: https:/
Changed in linaro-license-protection: | |
importance: | Undecided → High |
assignee: | nobody → Georgy Redkozubov (gesha) |
status: | New → In Progress |
Changed in linaro-license-protection: | |
milestone: | 2012.07 → 2012.08 |
Changed in linaro-license-protection: | |
assignee: | Georgy Redkozubov (gesha) → Данило Шеган (danilo) |
status: | In Progress → Fix Committed |
Changed in linaro-license-protection: | |
status: | Fix Committed → Fix Released |
I was able to install django-base license protection on 10.04 with small workarounds which are possible on mombin.l.o: /tn123. org/mod_ xsendfile/
1) Update django using pip to version 1.3.1
2) Install django-openid-auth version 0.2 using pip
3) Install mod_xsendfile version 0.12 from sources https:/
The only issue will be left - unittests. We have developed them using python 2.7.3 but in Ubuntu 10.04 python is 2.6.5 and unittests don't have assertDictEqual, assertIn and assertRaises has different syntax.