public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-soc] Fwd: wacfg midterm report
       [not found] <AANLkTild7FWhBIy32vb7LzYRYoA2wiCiwEnKi6mxlzI3@mail.gmail.com>
@ 2010-07-16 18:33 ` Andreas Nüßlein
  0 siblings, 0 replies; only message in thread
From: Andreas Nüßlein @ 2010-07-16 18:33 UTC (permalink / raw
  To: gentoo-soc

Hi all,

This is my 'wacfg' midterm report. Hopefully I'll be able to post
weekly status updates from now on.

Abstract:
wacfg is supposed to be a replacement for the old webapp-config for Gentoo.
webapp-config is the web application installer and updater on gentoo.
it currently has many issues and bugs,
and its design has some serious flaws. fixing the current mess would
be a waste of time. instead it should be
reimplemented, possibly in a distro-agnostic manner.

Status:
For my proposal I created a Gantt-Timechart [1] which helped me give a
general idea when I was expecting to be
done with what. Eventhough I haven't looked at it for a while, I
realised a few days ago that my progress stuck pretty
neatly to the timeline - the following are done so far:

- Evaluation of package formats / Parser for selected package format
       After some evaluation, we, Benedikt and I, realized that
creating an own format would be overkill
       and I'd rather create a syntax that is similar to that of
'setuptools' (from Python).
       What i came up with is the following:
       Portage (or later on apt-get) will simply copy the
source-tarball and a special wacfg.py-'configfile'
       into /usr/share/webapps/$webapp/$version/. Afterwards the
wacfg CLI will handle the installation to the
       correct vhost (even if it is simply "localhost"). See below
for some examples.

- Installation fo application instances:
       Works. I started testing with wordpress, joomla and phpBB,
which all worked out of the box.
       More web-application will obviously be tested, as mentioned in
the Gantt.

- Configurating instances:
       I started writing tools for that, e.g. "chmod", "chown" and
"server_own" (which will give permissions
       to the server-user). I will create more tools as the need
arises when I'm evaluating more webapps.

- Upgrading instances:
       Works. In an installed webapp-instance a file
.wacfg-$webapp-$version is created with the files' checksums
       (just like in webapp-config). Just like portage, when a file
has been manually changed, wacfg renames the new
       file to ._cfg????_file and copies it into the same location.
Afterwards etc-update or dispatch-conf can be used
       to run diffs on these files.
       Not yet included is a fully automated upgrade of all installed
instances. Obviously this is an upcoming feature.



wacfg.py-format:

Example 1:
-------------------------
from WaCfg import main

main(source='webapp-version.tar.bz2')
-------------------------
This should work on most packages as it will unpack the tarball into a
sandbox, and move them to the given
location (/var/www/vhost/htdocs/installdir).

Example 2:
-------------------------
from Wacfg import main, WaCfg, tools
class MyApp(WaCfg):
       def src_unpack(self):
               tools.archive_unpack()
               some other stuff..
       def src_config(self):
               tools.chmod(0700, certainfile)
               tools.chown('otherserveruser')
       def post_install(self):
               print("Do stuff after installing... e.g. create a
database-user like so:... yada yada yada")

main(MyApp)
-------------------------
This example won't work like that and it's only supposed to show the
general idea... As I said: more tools need
to be defined for convenience.



About the author:
My CV can be found on my website [2].
I've been somewhat active in the Open Source community for years now
(writing a few bugtracker reports, minor patches,
ebuilds...) ; I've been using Gentoo since 2005 and I don't see a
reason to change that anytime soon. Also I joined
the Gentoo e.V. earlier this year.


1 - http://nutz.noova.de/gsoc-gantt.png
2 - http://nutz.noova.de/cv.pdf


Cheers,
Andy



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-16 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <AANLkTild7FWhBIy32vb7LzYRYoA2wiCiwEnKi6mxlzI3@mail.gmail.com>
2010-07-16 18:33 ` [gentoo-soc] Fwd: wacfg midterm report Andreas Nüßlein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox