← Back to team overview

sloecode-dev team mailing list archive

Re: Sloecode deployment

 

Hi Guy,

On 21 December 2011 13:27, Guy K. Kloss <guy.kloss@xxxxxxxxx> wrote:

> Now the semester is over and I'm coming into the quieter time of the
> year, so I'm dedicating some time again towards making a new attempt to
> deploy Sloecode. So far quite good of an experience, but there are a few
> things I've noted. I think I'm going to put them into individual emails
> to keep the stuff apart.
>
>
Great - I'm more than happy to help you get this going.


> Firstly, the deployment using the (stable) PPA worked quite nicely.
> However, I'm using an automated deployment script with fabric (and
> cuisine), so I'm getting some issues with the interactive components of
> the .deb package install. If somebody knows about how to solve that
> issue, I'd be more than happy to listen, too.
>

There should be a way to tell apt-get / dpkg to ignore all but the most
critical questions - you should also be able to give answers to these
questions via a script. The questions are asked in the recommended debian
package manner, although I personally have no experience dooing either of
these things. I'll try and do a bit of research this evening.


>
> There were some (minor) hiccups in that process, though:
>
> * Might be good to also indicate what/when a DB like MySQL is preferable
>  over SQLite.
>
> Yes agreed. This is more from ignorance on my part than an actual
oversight. I might add a line - something to the effect of "If you don't
have any good reason to use MySQL, SQLite works just fine."


> * I ran so far with SQLite, but on the first launch the DB wasn't
>  there, yet. So the launch of the WSGI web app caused some error
>  messages. These were gone when later (re-) starting it as the DB file
>  was created.
>
>
This sounds to me like a symptom of another problem from one of your other
emails....


> Whenever I'm trying to log in, the Apache error log for the WSGI served
> Sloecode spits out the following for every login request:
>
> Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no
> attribute 'login'
>
> After viewing the stacktrace you sent through, this looks a lot like
something's screwed up in the login process. The page you're trying to view
'/me' is shown right after login, and yet your user object doesn't hav ea
login parameter (since it's set to None). This should never happen, and is
certainly a bug, I'll look into it ASAP.

>
> I've also tried to run the following command after making changes to
> production.ini:
>
> paster setup-app /etc/sloecode/production.ini
>
>
What was the output? It might be worth removing the SQLite database file
(just 'rm' is fine), and re-running 'paster setup-app /etc/blahblahblah' -
make sure the command exits cleanly. You may also want to peek inside the
SQLite dabtabase file (there's a linux package 'sqlitebrowser' that can
help you do this, if you can't stand the SQLite command line interface) -
you should see a bunch of tables, with a row for the defaul administrator
account in several of them.


> Looking around, I've noticed that quite a lot of the file permissions
> for directories/files created by the sloecode package install have got
> (for my taste) a bit too broad access permissions. For example:
>
> * /var/cache/pylons-sloecode
>
> * /var/log/sloecode and /var/log/sloecode/smartserver.
> log
>
> * /var/sloecode/
>
> * /srv/sloecode/bzr-repos/
>
>
That's a bug - and probabl my fault. If you're willing, could I get you to
log a bug in launchpad for this, with what permissions you think they
should have? That way I can edit the package scripts and get a new .deb
built ASAP.


Cheers,
-- 
Thomi Richards

Follow ups

References