Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Building a web-based system administration interface in Perl

by pileofrogs (Priest)
on Apr 09, 2009 at 16:10 UTC ( [id://756645]=note: print w/replies, xml ) Need Help??


in reply to Building a web-based system administration interface in Perl

I'm actually working on this problem right now. I'm making a web interface to allow users to do administrative tasks. And, if I may say so myself, I've had some good ideas.

The best is, write your web app and your privileged run-as-root server as completely separate applications. Have them communicate by a very simple protocol. I use YAML. Then your privileged app doesn't need to handle the chaos of the internet and HTTP, it only has to handle your very well defined, specific instructions. Everything else it can ignore. Then the web app simply becomes an instrument to convert HTTP to your simple instruction set. You can test your privileged server with a simple client. You can write a library to talk to your privileged server. It's awesome.

For the web app, I'm using Catalyst for the 1st time, and it's really as good as they say. Use it and kick yourself for anything web you've done that wasn't Catalyst. It's so easy to add a feature here or there. You never really know what you're building until you've built it, so being able to add stuff along the way is huge.

Don't start with a list of features and try to make them all work. Make the most minimal useful thing you can, publish it and then add features. This has many benefits. One benefit I hadn't thought of until I saw it is, you get to send out a nice message to your bosses every week or so announcing a cool new feature, so they're always thinking how awesome you are.

I've presently got 4 instances running on two servers. Two development and two production. The two servers are very different and I've written my code to work equally on both. No customization. I test in the two development instances and then roll out to the two production instances.

I started with a server that can authenticate users and show them how much web space they've used. I've just added authentication against a bunch of new sources and the ability for other IT staff to check the quotas of other people. After talking to users, I'm adding a new feature so lab staff (I work at a college) can check the enrollment and fee payment of students. That's going to take me about a day. And it's gong to make a lot of grumpy people a lot less grumpy. And it's so easy to add features! I just add the capability to my privilged server, test, roll out. Add interface to web app, test, roll out. Email bosses, bask, repeat.

I think I'm babbling... anyway, hope that's helpful.

--Pileofrogs

Replies are listed 'Best First'.
Re^2: Building a web-based system administration interface in Perl
by wazoox (Prior) on Apr 10, 2009 at 10:26 UTC
    Have them communicate by a very simple protocol. I use YAML.

    We already built the "administrative core" for a previous project. It uses an XML protocol, which is as complex as necessary to carry all needed tasks, unfortunately :)

    You can write a library to talk to your privileged server. It's awesome.

    Yes, and I even plan to make it possible (and easy) to create interface modules in Python,Ruby or dog forbid, PHP! :)

    For the web app, I'm using Catalyst for the 1st time, and it's really as good as they say. Use it and kick yourself for anything web you've done that wasn't Catalyst. It's so easy to add a feature here or there. You never really know what you're building until you've built it, so being able to add stuff along the way is huge.

    I never managed to wrap my head around these frameworks... I don't know.

    I think I'm babbling... anyway, hope that's helpful.

    Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://756645]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-28 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found