=== Amoz is now known as afougner | ||
cjohnston | uh oh | 13:55 |
---|---|---|
newz2000 | hey mhall119, cjohnston | 13:55 |
cjohnston | newz2000: as it is I have setup my own box for it. | 13:55 |
mhall119 | hey newz2000 | 13:55 |
newz2000 | mhall119: cjohnston was asking if I can help escalate his RT for staging of summit and loco | 13:56 |
newz2000 | he says he wants to be able to update packages | 13:56 |
newz2000 | (I can certainly relate to that) | 13:56 |
newz2000 | I don't think it's going to happen though, but I have an idea | 13:56 |
newz2000 | mhall119: this year we started doing something new, have you used razorgirl? | 13:56 |
mhall119 | newz2000: no, I never used it | 13:57 |
nigelb | I'm curious what it is. | 13:57 |
* mhall119 feels like I should call it 'her' | 13:58 | |
newz2000 | ok, hold time, getting hit from 3 sides now | 13:58 |
cjohnston | we hit hardest | 13:58 |
mhall119 | cjohnston: no we don't | 13:59 |
mhall119 | trust me | 14:00 |
cjohnston | sshhh | 14:00 |
newz2000 | mhall119, cjohnston: ok, here's the story | 14:02 |
newz2000 | razorgirl is a pretty stock jenkins, but with bzr and irc modules installed (and SSO login support) | 14:02 |
newz2000 | we have made it into pretty much a one-step command to get a new canonistack instance set up and running our app. It's purely scripted. | 14:02 |
newz2000 | mhall119 can set up a canonistack and he can look at the code for sizzle/fenchurch to see how we do the bootstrapping | 14:03 |
mhall119 | assuming canonistack is working | 14:03 |
newz2000 | well, that's why it's a one-step command to bootstrap, right? :-) | 14:03 |
mhall119 | we actually have a juju charm for summit | 14:03 |
mhall119 | or the start of one anyway | 14:03 |
newz2000 | ok, cool. That will work. | 14:03 |
cjohnston | blah | 14:03 |
newz2000 | Then we use jenkins to poll the bzr branch every 5 min and when it changes, update the canonistack install. | 14:04 |
newz2000 | with the irc plugin we can trigger builds manually in IRC | 14:04 |
newz2000 | and when something interesting happens the bot notifies us. | 14:04 |
cjohnston | sounds cool | 14:04 |
nigelb | newz2000: wow. that is cool. | 14:04 |
newz2000 | you can count on canonistack going down every week (Mondays about right now) so simple bootstrapping is the key. | 14:05 |
newz2000 | no RT needed. Though you do have to be luck enough to get a public IP address. ;-) | 14:06 |
mhall119 | are they still running out of public addresses? | 14:07 |
newz2000 | yes, but I have two at the moment and will release one today so at least one will be available soon. | 14:07 |
newz2000 | and the last e-mail then sent indicated they're working on a solution to that. | 14:07 |
newz2000 | mhall119: if you can't use razorgirl then you might want to isntall jenkins on cjohnston's box. It is a very easy install, though I'd suggest having 1G of ram. | 14:08 |
cjohnston | newz2000: got a CC for me? | 14:08 |
newz2000 | I would not put that on canonistack | 14:08 |
newz2000 | cjohnston: a cc on what? | 14:08 |
cjohnston | ;-) | 14:08 |
cjohnston | Credit Card | 14:08 |
newz2000 | ah, no | 14:08 |
newz2000 | :-) | 14:08 |
newz2000 | maybe the guys at lulzsec can hook you up with one | 14:09 |
cjohnston | I dont know who that is | 14:09 |
newz2000 | the renegade black-hat hackers who split off from anonymous | 14:10 |
cjohnston | heh | 14:10 |
mhall119 | I think nigelb was going to get us a jenkins instance | 14:10 |
newz2000 | heck, they can probable give you mine | 14:10 |
mhall119 | newz2000: aren't they also the ones getting themselves arrested and installing virus-infested software on their own machines? | 14:11 |
newz2000 | yeah, true | 14:11 |
afougner | lulzsec are the trolls of "hacking" | 14:11 |
* mhall119 has no respect for a 'hacker' that will install and run an unsigned binary on their own machine | 14:11 | |
=== afougner is now known as Amoz | ||
Amoz | cjohnston, how's the form stuff going? | 14:12 |
Amoz | btw, razorgirl sounds cool | 14:12 |
cjohnston | Amoz: nothing has happened since we talked yesterday | 14:13 |
Amoz | k | 14:13 |
Amoz | mhall119, for a django dev server, what webserver would you recommend ? | 14:16 |
cjohnston | we use apache | 14:17 |
cjohnston | people do use ngnix | 14:17 |
mhall119 | Amoz: once you're going to django/python, the webserver itself doesn't make a whole lot of difference | 14:19 |
mhall119 | newz2000 might have some more insight into that, he did some optimization testing on apache awhile back | 14:20 |
nigelb | I've found apache works better than anything else. | 14:20 |
Amoz | mhall119, apache it is then, I'm struggling though | 14:24 |
mhall119 | Amoz: is this for local dev? | 14:27 |
cjohnston | nigelb: could you fire off a tarmac please | 14:27 |
cjohnston | mhall119: its on his box.. he wants to be able to leave it runnign | 14:27 |
mhall119 | oh, ok | 14:27 |
Amoz | I get an operationalError exception | 14:28 |
Amoz | unable to open database file | 14:28 |
Amoz | anyone seen that before? | 14:29 |
Amoz | OH wait | 14:29 |
Amoz | local_settings contains the database info | 14:29 |
Amoz | is that automatically recognized by the .wsgi thingy? | 14:30 |
Amoz | probably is... | 14:32 |
newz2000 | Amoz: the diff between apache and nginx is that apache comes pre-configured to work in common situations, that means stuff you don't need is turned on by default | 14:35 |
newz2000 | Once I tweaked apache I found no appreciable diff in performance between it and nginx | 14:35 |
newz2000 | so pick which ever you're most comfortable with or most likely to get help with | 14:35 |
Amoz | newz2000, that's true | 14:36 |
Amoz | apache is stable as a horse | 14:36 |
Amoz | a little hungry for memory on a 256MB VPS though | 14:36 |
cjohnston | ]/3 | 14:37 |
cjohnston | uggh | 14:37 |
newz2000 | Amoz: yes, let me get you some commands to help you configure apache | 14:38 |
newz2000 | just a min | 14:38 |
Amoz | newz2000, I think it's pretty much config | 14:38 |
Amoz | d | 14:38 |
Amoz | I can see the django debug page | 14:38 |
Amoz | newz2000, http://amoz.dyndns.org:8080/ | 14:39 |
Amoz | there | 14:39 |
newz2000 | Amoz: here's what I do to get the best performance, considering your low mem I might go a step further though, but hold tight, one thing at a time: | 14:40 |
newz2000 | sudo a2dismod \* | 14:40 |
newz2000 | sudo a2enmod alias authn_file authz_host cgid deflate env mime reqtimeout rewrite setenvif ssl wsgi | 14:40 |
newz2000 | sudo service apache2 restart | 14:40 |
newz2000 | I would do that, also reduce the number of apache children to two or three, make sure you have an Alias set up for your static files | 14:40 |
newz2000 | turn off debug, make sure your e-mail is in settings.py so you get e-mails if there is a 500 error | 14:40 |
newz2000 | if that doesn't work, then you can consider these two options: | 14:41 |
newz2000 | put your apache on a high port and put squid or nginx on 80 and set them to be caching proxies with a time-out of 2 seconds. | 14:41 |
newz2000 | or switch to fastcgi (either with apache or nginx, though probably now you're in the territory where nginx will shine) | 14:42 |
Amoz | my god newz2000 hold it! | 14:42 |
Amoz | :D | 14:42 |
Amoz | I'm not on a 256MB now | 14:42 |
Amoz | but thanks anyway | 14:42 |
newz2000 | oh | 14:42 |
newz2000 | :-) | 14:42 |
newz2000 | Well, you can still try that stuff out. ;-) | 14:42 |
Amoz | if I'm bored this friday, I will ;) | 14:43 |
newz2000 | Def do the first things I suggestd then. a2dismod/a2enmod | 14:43 |
newz2000 | that made a big diff even on ec2s with plenty of ram | 14:43 |
Amoz | I can do that later if I find memory low | 14:43 |
Amoz | right now I've got > 2GB cached | 14:44 |
Amoz | so mem is fine :P | 14:44 |
newz2000 | no, not for memeory usage | 14:44 |
Amoz | oh | 14:44 |
newz2000 | that increased the number of req/sec big time | 14:44 |
newz2000 | that code that is enabled all runs in apache so get it out of there and you get more cpu | 14:44 |
newz2000 | and if you don't need rewrite or ssl get rid of them too, rewrite alone makes a huge impact | 14:45 |
Amoz | ah, I always have it enabled anyway | 14:45 |
newz2000 | I'd wished we could have gotten apache 2.4 in precise. rewrite is far less likely to be needed. | 14:46 |
newz2000 | but c'est la vie | 14:47 |
Amoz | apache 2.4 sounds awesome | 14:48 |
Amoz | its footprint is much smaller now OOTB , right? | 14:48 |
newz2000 | That's what they say, but I haven't tried it. | 14:50 |
newz2000 | I have a close friend who is an apache wizard and is always running the latest code. | 14:51 |
Amoz | wow | 14:51 |
Amoz | wizard | 14:51 |
Amoz | so anyone able to see what's going on here? http://amoz.dyndns.org:8080/ | 14:55 |
Amoz | I did , syncdb, migrate | 14:55 |
Amoz | I've got summit.db in summit/summit | 14:55 |
Amoz | I've got local_settings | 14:55 |
Amoz | and my django.wsgi in summit/summit -> http://paste.ubuntu.com/900569/ | 14:56 |
mhall119 | Amoz: does your apache user have read/write access to summit.db? | 15:01 |
Amoz | -.- | 15:01 |
Amoz | mhall119, thank you for opening my eyes | 15:01 |
mhall119 | :) | 15:01 |
Amoz | hopefully that will solve it | 15:01 |
Amoz | sometimes you forget the trivial stuff | 15:01 |
Amoz | :) | 15:02 |
mhall119 | sometimes we get so caught up trying to identify a difficult problem, that we overlook the fact that it's really a simple problem | 15:02 |
Amoz | I know, been there maaany times | 15:02 |
Amoz | so frustrating when one spent hours of troubleshooting | 15:03 |
mhall119 | I can't even begin to recount the number of hours I've wasted looking for a logic error, when I had a missing semi-colon or something equally trivial | 15:03 |
Amoz | annoying | 15:05 |
Amoz | what would be the best way to let www-data get access to my stuff ? | 15:05 |
Amoz | I'd rather keep my files in home | 15:05 |
Amoz | let www-data be part of my user's group and set stuff to 775 ? | 15:06 |
mhall119 | somethign like that, yeah | 15:07 |
Amoz | okay, it's not a permission problem mhall119 | 15:10 |
Amoz | not even chmod -R 777 solved it | 15:10 |
mhall119 | Amoz: why not just run this from django's manage.py runserver? | 15:11 |
Amoz | mhall119, they warn about making it public | 15:12 |
Amoz | and it crashes a whole lot when syntax and stuff is wrong | 15:12 |
mhall119 | Amoz: can you confirm that it does work that way though? | 15:12 |
mhall119 | that'll at least let us narrow the problem down | 15:13 |
Amoz | the runserver? | 15:13 |
mhall119 | yeah | 15:13 |
mhall119 | if it'll run that way, we at least know that it's not a problem with Django | 15:13 |
Amoz | well it's been running before | 15:13 |
Amoz | without problems | 15:14 |
mhall119 | on that server? | 15:14 |
Amoz | yep | 15:14 |
mhall119 | ok | 15:14 |
Amoz | mhall119, http://amoz.dyndns.org:8080/ | 15:23 |
Amoz | here it is with runserver | 15:23 |
mhall119 | ok, so definitely unique to running it through apache | 15:23 |
Amoz | most probably yes | 15:23 |
Amoz | hmm | 15:24 |
Amoz | mhall119, PATH_TRANSLATED | 15:30 |
Amoz | '/home/alex/dev/summit/summit/django.wsgi/' | 15:30 |
Amoz | could that be a problem? | 15:30 |
mhall119 | I don't know | 15:31 |
mhall119 | it says it cant open the db file, not that it can't find it... | 15:31 |
Amoz | true | 15:31 |
mhall119 | Amoz: try moving/renaming the .db file, and see if the error message changes | 15:31 |
Amoz | same | 15:32 |
Amoz | hmm | 15:32 |
Amoz | I should make an absolute path to the db maybe? | 15:32 |
Amoz | didn't work either | 15:33 |
Amoz | well | 15:34 |
Amoz | this will have to wait | 15:34 |
Amoz | I'll just use the runserver till someone figures it out | 15:35 |
Amoz | thanks for all your help so far | 15:35 |
mhall119 | or you can setup a MySQL/Postgres database instead of using sqlite | 15:45 |
Amoz | that may solve the problem | 15:45 |
Amoz | sqlite is so small and easy, that's why I like to use it in dev | 15:46 |
mhall119 | yeah, but for multi-process stuff it's locking can be a pain | 15:46 |
Amoz | ah | 15:48 |
Amoz | I suppose | 15:48 |
cjohnston | Amoz: ping | 20:19 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!