CMU Web Publishing is Strange

The My Andrew web publishing workflow is a little strange. Once you get everything setup, maintenance is a pain. Once you copy the updated files to ~/www, you must visit a webpage to “publish” those files. Presumably the script that copies the files from ~/www to somewhere else in the infrastructure does some security checking or something.

Visiting a webform is a pain. Luckily, it is unauthenticated and uses GET so it is simplicity itself to “publish” from the command line. A quick script:


#Change these to where your local copy of www sits and your username

rsync -rv $SOURCE $
#Since I'm triggering an event, I'm not worried about certificate integrity.
wget --no-check-certificate ''$USER

#Clean up what wget left behind.
rm 'publish@FLAG=0&NAME='$USER

Clearly there are other ways to do this, but this is simple and compatible with my workflow. Since I don’t do this often, I’m okay with typing my password. I could use ssh-agent and such, but I haven’t got that setup on this machine yet and doubtfully ever will.


4 responses to “CMU Web Publishing is Strange

  1. Hey Nathan! I googled to see if Andrew supports rsync and your page was the top hit. Small world. 😉

    Thanks for writing up the shell commands. Here’s a version that uses `curl` to save the `rm`:

  2. Oh, and I just discovered that if you use you don’t have to publish at all. The CMU Computer Club serves it directly from the Andrew AFS:

    Plus they execute CGI and PHP scripts:

  3. That makes total sense about curl. Thanks for cleaning up the script and putting it on github.

    The problem with contrib is that it is *really* slow and can’t handle any kind of load. When I tried to use it for my Amazon Mechanical Turk experiments, even just a few Turkers hitting my page simultaneously dropped the response to a crawl. It was enough to get me to keep using the weird andrew publishing workflow.

  4. Oh thanks for the warning!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s