Accurev SCM with Accurev

laofo · 2011年12月23日 · 38 次阅读

Starting a new software project (or company!) gives you the opportunity to have a clean slate with the tools and processes you’ll use. Starting EndGame – I figured that to be genuinly agile, we needed to have agile tools, not just agile ideals. I adpoted the YAGNI policy when it came to tools and our development environment and only introduced a tool when we absolutely needed it. It took us 5 months before we needed an issue tracker – until then, google docs did the trick.

One thing we did implement on day 1 was AccuRev, and its changed the way we build and deploy software. AccuRev is a software configuration management” system that allows an agile approach to development and lies at the heart of our entire development process. I’m going to describe how we’ve deployed AccuRev across the 10 or so projects we’ve worked on this year, but first – a few definitions for the pre-AccuRev readers:

Depot: a depot is like a repository and we have one per product/client. A depot represents a walled development environment – allowing product and client work to be kept separate from other depots.

Stream: Accurev has streams instead of branches. Streams represent your work environment, with stage downstream from production and development downstream from stage. To push a change package to stage, you drag it from the development stream to the stage stream, and like-wise to push it live. All changes flow automatically downstream, so its like an automated merge between branches everytime you promote.

Promote: like doing a check-in, promoting pushes your source code upstream. In the first instance, you promote to the development stream you’re working in, and from there we promote to a staging stream, then to production.

Change package: a set of source code files that have been changed due to a work issue.

Here’s how we’ve got it working for us:

  1. The roadmap Everything starts on a whiteboard or with user feedback and makes its way into a backlog. From there, we plan out our time across various projects and clients using Hive – the project scheduling tool we’ve been developing this year. Hive allows us to plan out milestones and high level goals and make sure we’re not over-resourcing.

Using the Hive API, we then pull out the milestones to provide a high level roadmap on our project dashboard.

  1. Work and Issues Once we’ve decided on high level goals of the next cycle(s), we convert it to work/enhancement/defect issues using AccuRev’s built in issue tracker – AccuWork. We looked at whether to use a third party issue tracker and integrate it, but Accuwork is quite a powerful system and is fully integrated with AccuRev. To provide an integrated project dashboard, we built a UI over Accuwork so that work issues can be linked to hive milestones and hooked into project documentation. It also allows our project dashboard to track progress in a cycle of work done vs budget.

  2. Documentation We’re pretty light on documentation – most revolves around a whiteboard and visual designs, however there’s always need for some level of written requirements and specifications. Within our project dashboard, each work issue can be linked to a page in our Wiki, so the spec is only one click away. The flip side is that when viewing a page in the wiki – all related issues can be listed. Once in the wiki, each page is has a variety of related pages, so its easy to jump between related specs. Our wiki uses Zoho docs and spreadsheet editors inline to provide an OK rich editor.

  3. Accurev streams Streams are where Accurev really stands out. For each product, we setup a new depot and create streams for production, stage and dev. Because we’re a small team we usually only need one dev stream, but Accurev supports multiple downstream and parallel streams. Development happens in personal workspaces and work is promoted against an issue number in to the dev stream. From there, we can promote issues to stage and from stage to live. By promoting an issue, it pulls all source changes with it. This allows us shift a change package associated with a single issue from stream to stream just with a simple drag and drop. We may have 10 change packages on stage and pull just 5 to our release candidate site. After another check of the RC, those five issues can be drag-and-dropped to the production site to deploy them.

  4. Promote triggers When we promote to dev, stage, or live – an Accurev trigger fires automatically and updates the status of all issues that have been promoted. When promoting to stage or live, release notes are created with a list of issues and promote comments (and posted automatically to our Yammer feed and project dashboard). This keeps the issues up to date and also provides a record of what we’re working on – again, giving customers more visibility of progress on their project.

  5. Automated build and deployment Automating builds and deployments changes the way you work. We use CruiseControl.NET to deploy to our stage and live sites and it works beautifully with AccuRev. Because of AccuRev’s streams, CC.NET is only deploying the change packages in a stream. So, where you typically might have an integration branch that you’re developing into, rolling to stage and eventually rolling to live – in AccuRev you’d have three streams instead. The live site is built and deployed against the live stream, so will only include change packages that have been promoted to live. Same for stage. So, building and deploying a site is now independent of what developers are checking in – its all about what is being promoted upstream (and sometimes demoted again!). For a small dev team, we’d never go to the effort of separating all these steps into separate branches, so AccuRev gives us a process that is incredibly robust without massive overheads.

  6. The project dashboard I’ve mentioned a few times about the project dashboard. This is a web app that we’ve built that pulls everything together and gives visibility to the team and the customer. It includes:

  • Trackers of cost vs budget, pulled live from our time tracker (Freckle)
  • Trackers of work completed, pulled live from AccuWork
  • Trackers of google analytics, twitter, sales metrics and usage metrics for each app
  • Summary of the roadmap, pulled live from Hive
  • Work issues, pulled live from Accuwork
  • Wiki
  • Status updates

Providing some confidence around price and a roadmap can be hard with an agile process. At the beginning of a project, or a cycle, the client usually wants a price and we plan it to the best of our foresight. The question then becomes whether this is a fixed price or an estimate of time & materials. We work with a mixture of both – typically a fixed price for a small project that is a single dev cycle or a license and estimates for the larger projects. This raises the issue of how does the customer have some confidence that they’re going to get what they are paying for. An approach of “we’ll work down the prioritised list until we run out of budget” is fairly risky and relies on trust. This is where our project dashboard comes in as an attempt to give the client full visibility of what’s happening in the project – in realtime.

That’s a snapshot of how we do SCM as of 3 November 2010. I’m sure it will be improved by the beginning of 2011, if not by next week. If you haven’t used a system like Accurev before, I can recommend joining one of their webinars and seeing just how important it is to have agile tools as well as agile intentions.

需要 登录 后方可回复。