Release Process

The federated wiki code is spread over several repos and is published as several npm modules. We're thinking this is a big improvement. But one really has to think to deploy revisions.

See Hacking Wiki's Methods for specific example.

Development

I develop with local copies of everything on a laptop. I debug first in the node version then check that ruby is ok with changes.

npm link wiki-client (for each server)

grunt watch (in wiki-client)

grunt build && npm start (with each change)

grunt build && bundle exec rackup -s webrick -p 1111

Running npm link, in the package, followed by npm link {package}, where the package is required, creates a set of symbolic links. This might not be helpful as you get the entire directory the package is in, and not just the components that make up the package. It is probably better to use npm install {path to the package directory}, as this will install just the components that make up the package. Just re-run the install to update the package as required.

Publish client-wiki

The client javascript should be coded to work with many versions of the browser. Updates start with the client.

git clone (or checkout master)

npm install

grunt build

npm version patch

git push --tags

npm publish

Publish wiki

We rev the node server when wiki-client changes. This may involve revising version numbers on the dependencies if there are coordinated changes.

cd wiki-node

npm version patch

rm -r node_modules

npm install

run tests

git push

npm publish

Publish Smallest-Federated-Wiki

The ruby version includes building the client code from node package source. Like node, this may involve revisions to version dependencies.

git pull

edit dependency in package.json

commit as "update to wiki-client version 0.0.m"

rm -r node_modules

npm install

grunt build

run tests

git push

Deploy to fed.wiki.org

For now we are still serving fed.wiki.org with the ruby version. It isn't so important that deploys here track code development closely.

ssh fed.wiki.org

screen -r farm

git pull

bundle exec rackup -s webrick -p 8080

Quick Deploy to fed.wiki.org

We sometimes build on one machine and copy files to another. This saves keeping the build environment working which is surprisingly hard. It also means that updates don't interrupt logged in users.

Client-side files can update without a restart.

scp client/client.js fed.wiki.org:wiki/farm-8080/client/

Some server-side files can hot-update too.

scp server/sinatra/views/layout.haml fed.wiki.org:wiki/farm-8080/server/sinatra/views/

Update Track Updates for those who care.