superluminal: (Default)
¿&⚧⅋? ([personal profile] superluminal) wrote in [site community profile] dw_dev2010-02-19 08:53 pm
Entry tags:

a small script for dreamwidth development

dw is a program I use for managing local Dreamwidth installations. It provides handy shortcuts for invoking cvsreport.pl, and it can install Dreamwidth from scratch or upgrade an existing installation. Additionally, it can automatically run Dreamwidth under an unprivileged Apache process; this means you only need to make a single change to your normal system configuration[1], and in theory you shouldn't even need root privileges to run Dreamwidth this way.

To use it, simply install the script as "dw" somewhere in your $PATH; dw help will show usage information.

[1] Dreamwidth apparently doesn't like having a port number in $LJ::DOMAIN, so you will have to set up a reverse-proxy on port 80.

sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-02-23 10:42 am (UTC)(link)
Interesting stuff!

I myself also use a script to auto-install unprivileged Dreamwidth installations on the Dreamhack box. (I'm the admin of the service right now.)

For the record, $DOMAIN isn't where you want to put the port number; that should go in $SITEROOT. That's because the $DOMAIN variable is also used in cookies.

Unfortunately there's not yet any way to use a different port number on user subdomains; bug #1895 was opened because of this.

One thing I will say - you don't mention in the copyright line who the author actually is (you)!

This script might be useful as a starting point for an installer script, I think. However, you (or anyone else who did this) would need to sign a Contributor Licensing Agreement before this could be submitted (if you/they haven't already done so), and as it is with the copyright stated in the script, I believe you're the only one who would be able to do that right now, as some rights aren't granted (such as the right to sublicense your work), so you as the copyright owner are the only one who could grant those rights. But check with staff if you want to, just in case I'm wrong; I am not a lawyer nor do I play one on TV.
Edited (Clarifying the CLA thing.) 2010-02-23 10:43 (UTC)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2010-02-23 03:17 pm (UTC)(link)
A CLA only applies for code that's going into one of the DW-hosted repositories! For useful tools and scripts, etc, like this that are being distributed unofficially, it doesn't pertain.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-02-23 03:45 pm (UTC)(link)
I know, though I was thinking from the point of view of actually having a useful installer that we could distribute with the code - making it easier to install. That's why I said it would be useful as a starting point for people. :D

Or am I getting the wrong end of the stick?
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2010-02-23 03:48 pm (UTC)(link)
Nope, I get it! I'm just saying, if [personal profile] superluminal was offering this up to fellow developers as a helpful resource, rather than "here, dreamwidth, take this and use it and redistribute it however", a CLA wouldn't apply. (And, [personal profile] superluminal, if you do mean "here, dreamwidth, take this and use it and redistribute however", open up a bugzilla bug and upload it there? Not that you are obligated to!)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2010-03-02 03:40 pm (UTC)(link)
I really like this script. I just set up another dev environment which runs on Ubuntu 9.10 instead of Ubuntu 9.04, and the installation went a lot more streamlined than I'm used to.

Had to restart the process a couple of times because of misinstalled modules (GTop!) which were causing checkconfig to fail, so I had cause to appreciate previously-entered data populating the dialog when the script is run again.

I did run across one issue however: the user created for the DB uses your current system user, $(USER), rather than the one you entered via the dialog ($DW_DBUSER), so if the two don't match, the installation fails and you have to delete everything (because bootstrap will fail if you try to init when it already exists), and then start from scratch.


With this script in place, I bet we could cut out at least three-fourths of the instructions to install Dreamwidth from scratch, and only GTop should be the most difficult part of the process...
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2010-03-15 02:34 pm (UTC)(link)
Great -- thanks.