On Mon, Nov 2, 2009 at 8:05 AM, Antonio Beamud Montero
<[email protected]> wrote:
>
> I want to create a RPM package for my pylon app. Exists any document /
> proposal about put the pylons tree as a system-wide package, in a
> standard way.
> For example, my pylon app is a blog, the next tree can be deploy after
> install it:
>
> /etc/myblog/myblog.ini
> /etc/myblog/myblog.wsgi -> link to apache2/site-enabled for (mod_wsgi)
> /usr/lib/python2.6/site-packages/myblog/...
> /var/lib/myblog/templates/
> /var/lib/myblog/public/
> /usr/share/doc/myblog/Documentation
> ...
>
> or create a "pylons" directory as standard, for example:
>
> /etc/pylons/myblog.ini
> /var/lib/pylons/myblog/...
> ...
>
> It's possible?

There are no official RPM instructions or directory layout for Pylons.
 In this case, I would avoid over-engineering and scattering files
across multiple directories. If this app will be used only by a few
sysadmins who know Pylons (or will get to know it during the time they
administer the site), just put the entire app in one directory.  The
best choices are /usr/share/myblog or /usr/share/pylons/myblog
following the precedents of:

    PHPMyAdmin: /usr/share/phpmyadmin
    Emacs: /usr/share/emacs/site-lisp
    Vim: /usr/share/vim/{addons,vim72}

PHPMyAdmin puts its configuration files in /etc/phpmyadmin (the Apache
config and the equivalent of production.ini).  The main Apache
configuration simply includes /etc/phpmyadmin/apache.conf.  But Apache
could simply set its DocumentRoot to /usr/share/phpmyadmin and that
would work too.

All documentation should go under /usr/share/doc/[pylons-apps/]myblog
per the Filesystem Hierarchy Standard (http://www.pathname.com/fhs/).
Samples of the configuration files can also go here.

I set up my sites differently than this.  I don't use RPM/DPKG.  I put
applications under /home/wwwadmin/apps (Subversion checkouts) and
virtualenvs under /home/wwwadmin/venv .  Data files go under
/home/wwwadmin/data .  The INI files stay with their applications
(/home/wwwadmin/apps/myblog/production.ini).  The apps all run under
Supervisor using their appropriate virtualenv.  Apache and Supervisor
configurations are kept under /home/wwwadmin/apps/servers/all, and
hand-copied to /etc.  (My rule is that anything executed by root must
be hand-copied from the apps directory to its proper location, while
webapps running as www-data can be run directly from the apps
directory.)

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to