UW PLSE

Your research projects should have websites, and a great way to set up a project website is under UWPLSE.org.

UWPLSE.org runs a hooknook instance, so your website can live in a Github repository and be updated automatically every time you push.

Setting up a subdomain

Add a web hook
Go to your Github project settings and, under “Webhook & services” add a new webhook pointing to http://hooknook.uwplse.org (see the Github help for more on webhooks). Make sure to set the Content Type of the webhook to application/json. From now on, every time you push to your repository, the UWPLSE.org server will know.
Create a Makefile
Every time you push, UWPLSE.org will pull your changes on the master branch and run make deploy from the root directory of your project. So create a Makefile and add a deploy target. Here’s a simple example:
deploy:
	rsync -r www/ $(shell ~/uwplse/getdir)

.PHONY: deploy

First line creates a target called deploy, and the second line gives a command to run when that target is invoked. You can give multiple lines here; they must be indented with one tab, not by spaces. The .PHONY line is a weird Make thing; you don’t need to change it.

Write a deploy target
In this case, the deploy target uses rsync -r to copy file from the repository (in the www/ directory) to a directory given by invoking the script ~/uwplse/getdir. This script returns the path from which the web server is configured to serve static files to your subdomain (it will create the subdomain if it does not exist).

Make sure that whatever you do in the deploy target, you do not modify any of the files checked in to the git repository. You can, however, change branches, invoke jekyll, or anything else like that. Files not in git will be preserved across most pushes, but you will always be on the master branch after a push.

Visit your subdomain
If your project is named uwplse/{name}, you should now be able to visit http://{name}.uwplse.org and see your website!
Set up HTTPS
To set up TLS support for your subdomain, send an email to Pavel with your subdomain.
Run a server
If you wan to run your own server to serve your subdomain, talk to Pavel. It’s a great way to have an easily-accessible demo.

Maintaining hooknook

Project pages are kept in /var/www; most are served as static pages, though some are served dynamically, most prominently herbie.

Hooknook lives in /srv/hooknook; it can be maintained by logging in and switching to the hooknook user with sudo -u hooknook -i. Once you do that, the shell will print some documentation.