pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:

Aid me, dear monks!

My boss just told me to do something, and at first glance it sounds like a lot of perl code. I'm wondering if anyone knows of something that does this or any significant chunk of this. Here's what the thing should look like:

Users who maintain special web pages need to have their work approved by official officials. They have a development environment which can't been seen by the world at large. When they like what they have, they bug the official approval monsters, who upon approval, push a button and the content in the development environment gets copied to the "live" server. The users are all different skill levels and the approval monsters are non-technical administrative types.

My boss is specific that it must be technically impossible (without hacking root or something) for users to make live their own changes, so I think I'll host the official approved content on one server and the development content on another. I'm thinking the approval monsters will check the developement stuff, then go to a web form, enter a url or username to specify what they want to approve and type in a special password. Then some process on the dev box has to tar up the content, maybe sign it with a pgp sig, and send it over to the offical box where another process has to unpack it and maybe check the sig to see if it's really been approved.

So, if anyone knows something that already does something like this, or some part of it (like web based pgp signing), or if you think I'm going about this all wrong, or whatever, I'd love to know about it.

Thanks!

Pileofrogs

Updated: s/php/pgp/ # doh

Replies are listed 'Best First'.
Re: Does this already exist?
by ig (Vicar) on Oct 09, 2008 at 22:54 UTC
Re: Does this already exist?
by GrandFather (Saint) on Oct 09, 2008 at 23:12 UTC

    That (the "approval" and "push a button" part anyway) is almost exactly how site changes to PerlMonks works. pmdevils provide patches to the site then official officials apply the patches if they are deemed appropriate. In PM's case it doesn't require a development server, although there is one for test purposes.

    Such a process can be as simple or complicated as you want it to be. You could consider that replying to a node is a site change on PerlMonks for example.

    To a very large extent what you need to do depends on the infrastructure that you already have in place. If you are serving pages from a database as PerlMonks effectively is then all the isolation you need is provided by the database and the code that accesses it.

    If on the other hand the site is built from a stack of static pages or templated pages served by static script and it is that infrastructure that you need to manage, then a development context separate from the production context is probably how you have to do it. There are of course interesting transaction related issues in updating the production server if more than one file needs to change and the change is done while the site is live - the authentication issue may be minor compared with the actual update issue!


    Perl reduces RSI - it saves typing
Re: Does this already exist?
by dragonchild (Archbishop) on Oct 10, 2008 at 20:00 UTC
    Joomla and Drupal already provide this. Writing this from scratch is non-trivial and would take some time.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?