To make for a smoother deployment next time, I’ve thought of a few things:

  • we need to write more tests and we need to run them; when I joined the firefighting of the 0.9.7.7 deployment, the unit and flunc tests were broken in several spots and I suspect they were broken when the site was deployed; also, there were some things like the password request form that had a runtime error and would have been easily caught had there been a test for it
  • we need to remember to merge fixes between svn release branches and the trunk; there was at least one bug that was fixed in the trunk but not merged into the release branch and I believe there were some things that were fixed in the branch but not merged to the trunk; this can get complicated because when you fix a bug you need to fix it on both the branch and trunk and be able to run the tests on both to make sure you haven’t broken anything
  • when using trac, I found it useful to specify what site the bug was found in and what release of opencore was currently running on the site; after fixing it, I would record both the trunk and branch rev number that I made and then post another entry when it was deployed and verified on the live site and only then would I close it; this last step might only be appropriate during “firefighting” mode
  • finally, I think when we are firefighting, having frequent standing meetings, as we did do, is helpful
Filed January 30th, 2008 under testing, Kicking Ass, Deployment

Okay, so maybe that’s a bit of a bold title, considering a) most of you have been using fassembler for a little while already and b) Ian wrote fassembler, not me.

However, it does feel like just today we’ve put the last little bit of polish on it, so that it’s officially ready for prime time for all of our deployment needs. There are still some parts of the process that can be improved, but it’s definitely workable, and it’s orders of magnitude easier to use than anything we’ve had up until now.

How, exactly, should it be used? Well, if you just want to use it to build a local development rig of the OpenPlans software, you can refer to the fassembler how-to. If you want to actually deploy a persistent site, one that lives on either our dev or our live server, you can refer to the OpenPlans deployment instructions.  The deployment instructions go into quite some detail about how our directories are laid out, and how you should manage the configuration and requirements for separate sites, and separate builds of the same site. Please do not try to do any deployment of any site on either flow or theman without reading this first.

Good luck and happy building!

Filed January 11th, 2008 under Architecture, TOPP, Deployment, OpenPlans

Here are some preliminary results from a look at the openplans.org data. I should say that the values are approximate, but I think they should be pretty close to the real values.

openplans-stats-small.gif

Here is what it all means:

mem active - the number of active members that logged in to the site during the previous 30 days

mem avg life - the average number of days a member is active (estimated from all members who are now dormant)

proj active - the number of active projects who have had their wiki edited during the previous 30 days

proj avg life - the average number of days a project is active (estimated from all projects who are now dormant)

ml active - the number of mailing lists which received a post to the archives during the previous 30 days

ml avg life - the average number of days a mailing list is active (estimated from all those that are now dormant)

One thing to note is the sharp drop in active members in November. This is perhaps, in part, due to a migration of members from openplans.org to nycstreets.org. Also, of all the data points, the December value is the one I trust the least due to the way things are approximated. In January I plan on doing a bit of work to verify the accuracy of these estimates.

The mailing list activity is higher than I expected. I checked and made sure that this isn’t due to spam (spam doesn’t actually make it into the archive.)

So this is just the start of what we can do to analyze our usage information to help us make good decisions about the evolution of our software. From here we can go on to analyze Task Tracker and WordPress usage.

Filed December 21st, 2007 under Kicking Ass, User Experience, Deployment, OpenPlans

I didn’t really participate in bug day, as my difficulty reproducing things gets in the way. So I kept working on fassembler. After struggling a little with opencore, I decided to do the wordpress build, which was pretty straight forward. Then I just didn’t feel like struggling with opencore again.

When I don’t want to do what I probably should do (top priority stuff), I’ve found a good way to cope is to do stuff that I know needs to be done someday; typically little packaging things. In this case I added docstrings to everything in fassembler, and reviewed the FIXME’s that had accumulated. I’d consider this kind of work “puttering”. I really need to spend some time doing this for Deliverance; though really it would have been better if I had done it when Deliverance was more at the front of my brain; it’s kind of pushed towards the back now.

But Fassembler is mostly puttered out. Now I have nothing to do but deal with that opencore build :(

Filed November 26th, 2007 under Deployment

Sorry I haven’t been very attentive to stuff lately.  First I got sick and then Emily’s sister just had a baby, and I’ve been running around helping with all that stuff.  But that’s all calmed down now.

Fassembler just started working with most of the core components.  I rewrote openplans_hooks.py, which was evil, to be totally config-driven, and have supervisor managing all the processes.  So when you start ENV/bin/supervisord, all the subprocesses get started up, and you can control them with commands like “ENV/bin/supervisorctl restart all”.  The ad hoc start/stop situation has been driving me nuts, so I’m looking forward to this.  Deliverance and TaskTracker are building pretty much exactly how I want them to.  OpenCore is the big thing to tackle now, as it’s at the heart of a working site.  There’s a bunch of other details — WordPress needs to be built, and its database setup made more robust, and several products need to be updated to use the central config file.  It would be nice to start writing backup scripts and other data management scripts as well, like “clear all data” scripts.  But I don’t see any need to do those right away, or even all at once — we can just keep adding useful scripts as they come up.

This would probably feel less overwhelming if I wasn’t constantly moving between various deeply nested directories — ~/src/fassembler/ENV/supervisor/src/supervisor/src/supervisor/supervisorctl.py is a good example.  I often deal with long paths, but this seems worse.  There’s a mental burden to that sort of path.  But I don’t really see an alternative.  At least since things are all checkouts I can handle them in-place instead of fiddling around when I need to make an edit.

Filed November 20th, 2007 under Deployment

versions2-0-small.gif­

This past week we talked a lot about our release/deployment process, since things have gotten significantly more complicated recently. We now have several packages that are evolving (opencore & WP, in addition to TT and Listen which have been relatively stable for a while now) and two separate installations to maintain. It is becoming obvious that we need to become a little bit more formal about how we plan for releases and deploy. The following sections outline some plans that came out of a lot of discussions last week:

­

Versions for OpenPlans

One issue is keeping track of our progress on OpenPlans, the combined application/website. Up until now, we’ve been using the opencore version number to keep track of our overall progress, but this is becoming increasingly less appropriate. Really, we need a master version number for OpenPlans in order to:

  • Track our progress and be able to archive historical milestones
  • Plan for the future, using a stable set of release milestones (like many other opensource projects do)
  • Allow component version numbers to increment independently of the larger project, for developer reasons (adding a new dependency, etc.)

point-eight.jpg­A major question this raises is: what version is OpenPlans at? There have been suggestions that we’re at 1.0 (we have been at this for a while…), but I would argue that we don’t want to spoil the fun of a 1.0 release this way. The diagram above indicates a preference for something like 0.8, to give us some distance from OpenCore’s 0.9.7, and to allow for a 1.0 release in the coming months. We haven’t made any decisions about this yet, but should do so soon.

Once we decide what version OpenPlans is at, we can replace the “version” field in trac with OpenPlans versions, and use trac milestones with these numbers to plan ahead.

In order to make this work properly, we’ll need to start creating proper versions for all our components, not just opencore. Then, in the future, fassembler will just pull opencore 0.9.7, tasktracker 0.5, wp-in-openplans 0.2, etc. in order to build OpenPlans 0.8.5 (for example).

Release schedule

In order to minimize confusion and facilitate better planning, we’re also going to adopt a more structured deployment schedule. The diagram below outlines a process whereby we’ll deploy every week, bumping changes from stage to live and from trunk to stage (on release branches). This way, there should be no question, at any given time, where changes should be committed to, and when those changes will see the light of day.

The following calendar shows a typical release schedule, over the course of a few weeks:



SUN MON

TUE

WED

THU

FRI

SAT

w1





deploy 0.6 to live.nycstreets.



deploy 0.6.1 to stage.nycstreets and stage.openplans

QA 0.6.1 ->



w2


­deploy 0.6 to live.openplans


deploy 0.6.1 to live.nycstreets

deploy 0.6.2 to stage.nycstreets and

stage.openplans

QA 0.6.2 ->



w3


deploy 0.6.1 to live.openplans


deploy 0.6.2 to live.nycstreets

deploy 0.6.3 to stage.nycstreets and stage.openplans

QA 0.6.3 ->



Note that this schedule shows us deploying to openplans after we deploy to NYCstreets. I think doing staggered deployments like this makes a lot of sense, so that we can focus on only one thing on deployment day, and minimize confusion. Which site should go live first is a question for debate, I suppose, as the second deployment would (in theory) be more stable, through bugfixes or lessons learned through migrations.

Exceptions

no-exceptions.jpg­Without a doubt, there will be exceptions to these rules, and we should be ready to handle them gracefully.

For example, this week, the folks at TA wanted to send out email invitations to all the people that signed up or working groups at the UWS event. We had previously created projects on NYCstreets for these groups, but these projects didn’t have any members yet.

The TA folks were a little nervous about the 2-step process of joining a project and then joining that project’s mailing list (thankfully, the third step of joining the NYCstreets site was consolidated in OpenCore 0.9.7.3), and we mentioned that we had been working on a workflow improvement whereby project members would automatically be joined to the project’s mailing list (and removed if they left the project). The TA folks agreed that having this feature in place would greatly simplify the process and increase the number of new members who actually subscribed to the lists.

So, here was a case where by deploying a feature outside of the normal release schedule would greatly benefit our team. So, instead of waiting for the next scheduled deployment, we finished the feature, merged into a new release branch (trunk was already polluted with unfinished changes), tested, and deployed. While this broke our standard deployment protocol, it made our clients/teammates at TA really happy, and pushed out a useful new feature right when it was needed.

This also applies to critical bugfixes to the live site, which should always be fixed and deployed immediately, rather than waiting for the next formal release.

There will often be times when we have to push certain features & fixes live outside of the normal release schedule, and we should be ready to do that when necessary. It’s important to remember that we’re primarily producing a website — our website visitors (as opposed to our software users) don’t have to do anything when we update the site, so there’s almost no cost to rolling out fixes. It’s true that we’re also producing software that people will download & install, but at the moment, they’re not our top priority.

Hostnames for deployment

Going hand-in-hand with a tighter release schedule is a more regular use of our various testing & live domains. In order to accommodate our working, testing, and deployment needs, we’ve sketched out the following plan for deployment domains:

  • www.openplans, www.nycstreets

    the live sites; obviously
  • stage.openplans, stage.nycstreets

    QA for the following week’s deployment. Any components that have relevant changes would be running off of release branches. These branches will accept bugfixes only, not new features.
  • backstage.openplans, backstage.nycstreets

    Deployment showing work that’s currently in trunk (scheduled for 2 weeks ahead’s deployment. The purpose of this is so that folks w/o an up-to-date local install (Mouna, Jackie, our partners, etc.) can see the latest stuff. It is to be expected that this will be broken sometimes. It would be the release manager’s duty to SVN UP these deployments daily.
  • leapfrog.openplans, leapfrog.nycstreets

    Proposed new deployment used for pushing stuff to live ahead of schedule. These sites would always be running exactly the same software (and ideally with similar data) as the live site. Ahead-of-schedule fixes would be tested here before deploying to www. Changes made here would need to be merged back to trunk and any open release branches.
  • dev.openplans, dev.nycstreets

    Flexible space for devs to use for various purposes.

Release manager

Something else that’s been brought up recently is the need for us to formalize the role of the Release Manager somewhat. This is a really important job, and it’s important to have one person with their eye really on the ball.

Ethan did a great job of this with NUI and subsequent deployments, as did Robert during the sputnik releases. I see this job as somewhat of a rotating role, where different people might take it on depending on the circumstances (I believe this is how it has been discussed in the past).

It seems like the release manager would have the following responsibilities:

  • Knowing what features are in / out of an upcoming release, and directing traffic appropriately
  • Ensuring that people are diligent about sending in notes of any necessary migrations or deployment notes
  • Deploying finalized release to live site
  • Merging changes from release branches back to trunk
  • Cutting new release branches for QA
  • Deploying ahead-of-schedule releases to the leapfrog sites

There are a lot of specifics about this role that haven’t been fleshed out, but I think this is a pretty good start. During the iteration meeting, we talked about some possible options for communicating deployment details (posting them to the “deployment notes” wiki page, sending an email to the dev list with a standardized subject line (like DEPLOYMENT), having the RM blog about upcoming deployments and people fill the comments section with notes, etc.), but we didn’t really come to any decisions regarding that process.

Filed November 18th, 2007 under Deployment, OpenPlans