Archive for March, 2009

Security Primer – Anatomy of the AccuRev Admin Trigger

March 27th, 2009

by Rob Mohr

Do you have the “Admin Trigger” installed and running in your AccuRev environment?  I hope so!

The “Admin Trigger” is the best way for you to restrict those non-ACE’d (AccuRev Certified Engineer) users from wreaking havoc on the process you’ve meticulously designed and implemented for your organization.  Make sure you lock it down!  It’s really simple to do!

Now, I’m not talking about taking flexibility away from your developers, they’ll need to control certain aspects of the process too.  It’s up to you where the line is drawn in the stream hierarchy and the Admin Trigger is the chalk.

The equator is commonly established on the integration stream.  Since the globe in this case is AccuRev, the line of demarcation runs north and south.  To the West (upstream from integration), ACE’rs set the rules on workflow, code promotion, stream configurations, and general access control.  To the East (downstream from integration), developers and development teams are free to make their own decisions to best support their process, products, projects, components, patches, bug fixing and development activities.

Have you read the private prototyping or stream-per-task blogs by Dave Thomas?  These are good examples of how dev teams and developers control how their activities are organized using streams while adhering to the overall enterprise software development life cycle (SDLC).

The Admin Trigger is a simple if-then-else perl script that fires on the server whenever certain commands are  executed.  Out-of-the-box, the script restricts “admin type” commands such as creating users, groups, depots, etc without needing additional customization.

 @cmdlist = qw/mkuser chref chdepot chslice lsacl addmember
                  rmmember mkgroup mkdepot mktrig rmtrig
                  setacl write_schema/;
    # is the user command in the above list?
    if (grep $_ eq $command, @cmdlist) {
    ...

The admin type commands are typically global in nature, meaning, that a single Admin group is granted permission for these commands.  Stream creation has a more granular scope allowing different groups to control their development process and stream management capabilities.

Simply list the streams in the trigger that only Admins have the ability to “manage.”  By default, other streams not listed are managed by the development teams themselves.  There are 2 sections in the trigger to set this up depending upon the commands to control.

Restricts: lock, unlock, chstream, incl, excl, incldo

    $admin_stream{"replace_with_admin_stream"} = 1;
    $admin_stream{"replace_with_admin_stream"} = 1;
    $admin_stream{"replace_with_admin_stream"} = 1;
    ...

Restricts: mkstream, mkws

    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    ...

Inside the trigger logic, each command is evaluated and will allow the operation to complete or not.

For example, the following section validates the “mkstream” command:

if ($command eq "mkstream") {
...
 # only a user listed as an administrator can create a new stream
 # based on an existing stream in the "basis_stream_deny" list
 if ( defined($basis_stream_deny{$stream2}) and `$::AccuRev ismember $principal "$admingrp"` == 0 ) {
   print TIO "Basing a new stream on existing stream '$stream2' disallowed:\n";
   print TIO "server_admin_trig: You are not in the $admingrp group.\n";
   close TIO;
   exit(1);
  }
}

There are other facilities in AccuRev to control the process and workflow too. Stream Locks grant users/groups the ability to promote to and from streams and Access Control Lists (ACLs) grant access to entire depots and subhierarchies.  Setting up these security measures combined with the Admin Trigger provide your organization with the flexible and granular security model it needs for the optimum development process.

Drop me a note and let me know the creative ways you’re using the Server Admin Trigger.

Getting the Most out of AccuRev’s Windows Explorer Integration

March 18th, 2009

As organizations become more advanced in their use of software configuration managment (SCM) they typically expand its use to include more than the software developers.  A common addition is around audibility and compliance of the entire development process which may require them to version more than just the source code, but also any requirements, project plans, design artifacts and documentation.  This enables the labeling of the big picture of who, what, where, why and how the software was developed.

With this expansion there are now more users of the SCM tools, many of whom have never used a version control solution before. A few examples of these new user types may be hardware designers, graphic designers, product managers, or the documentation team. These types of users are working with different types of files, and work in different tools than the traditional software developers and because of that may use version control tools in different ways.  These users may have historically created versions of files using naming convention such as:

ReleaseNotes_v1.doc, ReleaseNotes_v2.doc etc. all on their local computer.

Obviously this can be an error prone process and also a single point of failure if something were to happen to that user’s computer.  Since many of the files they work on are binary (.doc, .pdf, .ai, .dwg, .vsd etc.) they may want to work on these files in a serial mode so they don’t have to try to manually merge them when someone else makes changes to them in parallel.  So instead of the traditional use of AccuRev, taking advantage of our parallel development features, these users may want to work in exclusively locked workspaces or at least have exclusive locks on certain files to protect them.

In order to make this new type of user successful they need to use an interface that is familiar to them. With many source code control tools they may have to write scripts, manage configurations or interact with a command line interface to be able to get their work done. This type of interaction will likely not work well for these types of users, as many of them may not have the technical know how to work in those environments.  AccuRev can make this transition much more fluid and familiar for these users with the AccuBridge for Windows Explorer. This interface gives the user access to the AccuRev commands needed from within the familiarity of Windows Explorer as seen in exhibit 1.

AccuBridge for Windows Explorer

AccuBridge for Windows Explorer

» Read more: Getting the Most out of AccuRev’s Windows Explorer Integration

Are ClearCase Dynamic Views Still Necessary?

March 11th, 2009

by Brad Hart

In just about every situation in the last 8 years where I’ve gone into a prospect to talk about replacing ClearCase, I’ve been asked the question about ClearCase’s Dynamic Views and why AccuRev does not have a similar concept. It’s a fair question coming from those who are familiar with ClearCase and I’m posting this blog to help both give some background information on Dynamic Views and answer some of the common issues raised by former users of ClearCase before they made the switch to AccuRev. I used to work at Rational Software in both Support and in the Field and I spent a number of years as a ClearCase consultant before coming to AccuRev in 2001.

At the time Dynamic views were introduced, there was tremendous pain in the market using a local source copy model, especially in enterprise applications. Disk space was extremely expensive, and it was becoming increasingly infeasible to have large enough disks on each developer’s workstation. Networks were also much slower, and the time required to copy entire sets of source code to each developer’s workstation was unrealistic as applications grew in size and complexity. Dynamic views provided the appearance of each developer having a local copy of the source files, but without the time / disk space overhead associated with having real local copies. They also provided just-in-time access to files across a network connection which was transparent to the end user, similar to the way NFS works. Unlike NFS, which you only can access the latest version of files, the dynamic views allow the developer to reconfigure their view of the files to represent any given configuration past or present. Also, unlike a local copy model, reconfiguring what a developer sees does not require any file copying to reflect the changes. This saves time and money and the savings continue to scale the larger the development group gets.

Does it still hold water?
No. Both workstation and network hardware costs have dramatically dropped in recent years, and the performance has increased exponentially. It is very common and reasonable for developers to have near server-class systems on their desktops. In many cases, it is now a much better time savings to have developers work with local copies of their source files. In fact, Rational’s default usage model for developers is to do their development in a local copy source file model, contradicting the presence of Dynamic views. Dynamic views were a time and cost savings breakthrough when it was introduced, but given the changes in development environments in the current time, it is more often than not seen as a hindrance. There is also a much higher administrative burden associated with Dynamic views. Especially if you are working in a mixed environment (SAMBA, TAS, etc… need to be properly configured and maintained). Also, Dynamic views are notoriously unreliable and unusable over remote connections. Another major objection to Dynamic views from the developer perspective is that most developers don’t want “the rug pulled out from under them.” Your files are constantly changing in your view….how are you supposed to develop/build and test like that? Add in the fact that ClearCase does not have atomic transactions, and developers using Dynamic views will constantly have inconsistent sets of code to work on. Bottom line is that even Rational recommends developers use Snapshot views (like AccuRev workspaces) and only use the Dynamic views for integrations. Since AccuRev truly builds in parallel development, you don’t need an integration view/workspace. All your work can be done directly from one workspace.

Five things I’ve heard from developers on why they think dynamic views are important to an effective development environment:

WYSIWYG: The final test of your code changes before check-in is exactly the same thing as testing the release area code directly. No need to “check it out again in a different place just to make sure I checked in everything right.”

AccuRev allows your private work (keeps) and your check-ins (promote) to all occur from the same place (you don’t have to check out to a different place). AccuRev builds in best-practices like private-branching (workspace streams), atomic transactions, and copy-merge. You don’t get that out of the box with ClearCase. AccuRev’s built-in best practices absolutely improve the entire process. You absolutely must merge against the latest code before you promote your changes (for overlapped files). Plus, developers have total control of their workspace bringing in new changes as they are ready. That way if something is broken, they will know whether it is their code, or the latest code from the mainline. With Dynamic views, you will have to go find out for yourself and it is constantly changing. I have heard a lot of the “rug being pulled out from under me” analogies regarding dynamic views.

» Read more: Are ClearCase Dynamic Views Still Necessary?

AccuRev Teams Up with VersionOne on Agile Webinar Series

March 10th, 2009

AccuRev CTO, Damon Poole, is a guest speaker for an Agile webinar series, Agile 101: Laying the Foundation for Agile Development, presented by VersionOne.

Damon will be presenting this Wednesday on the following topic, and again on April 1 to discuss The Algorithms and Architecture of Agile vs. Traditional Software Development.

Breaking the Major Release Habit
March 11th
12:00 – 1:00pm EST

Are you frustrated with your release schedule? Are you considering moving to more frequent releases or wondering if there are ways to tweak your release schedule? Although the traditional pattern for software releases is to have a major release every 6-12 months or more and minor releases in between, there are many other release patterns to choose from. This session will examine the various factors and options involved, discuss their pros and cons, use examples drawn from a wide variety of companies, and give you the information you need to make an informed choice and then implement it.

Register

Use Case: I went from ClearCase to AccuRev

March 5th, 2009

In May of 2005, the company I worked for, Polycom, decided to switch our Software Configuration Management tool from ClearCase to AccuRev. Initially, this decision was not taken well by the developers in my business unit since they had been using Base ClearCase for several years.  However, after seeing how much easier AccuRev was to use and that it did everything that we needed for our development tasks, we became firm believers that AccuRev really is a “Best of breed” Configuration Management tool.

We evaluated a couple of CM tools before settling on AccuRev.  Among the tools we looked at were IBM Rational ClearCase UCM (which I was very familiar with), CVS, and Accurev.  CVS was being used by development teams in both offices and it was determined to be a tool that would not scale well for us.  After evaluating ClearCase UCM and AccuRev, it was decided that AccuRev was the way to go, for several reasons.  One reason Clearcase UCM did not do well was that we could not even get it to work at one of our offices that was using Linux for development (they were using 9 different types of Linux at the time).  AccuRev positively shined during this part of the evaluation by the fact that it was very easy to setup and use in a Linux environment.  Another reason and a huge advantage for AccuRev was the fact that it was very easy to use over a WAN between multiple sites (i.e., Austin TX and Andover, MA) without a mechanism like MultiSite.  The AccuRev servers that the development team in Andover used were located in Austin, TX.  For the 3 years that that I worked with our team using AccuRev, I never had any major issues using it over the network.  A third big reason was that we also did not have to pay for ClearCase MultiSite licenses which meant a big cost savings for the company.  This last reason was major factor in management choosing AccuRev over ClearCase UCM.

After selecting AccuRev as our new CM tool, we had to migrate the current source code that was in ClearCase. At the time that we were doing this, there was no migration tool to take source code in ClearCase and move it over to AccuRev. We decided to archive the existing ClearCase Version Object Bases (VOBs) and leave them as is on their current servers in the Andover, MA office.  This was determined by our management team to be the best way to start off using AccuRev.  Most of this legacy code was for really old products that had been “End of Lifed”.  So, we were not really losing much by doing this.  We then imported the latest code from the VOBs that we cared about.  The import of this source code was just brought in as flat files.   This worked out well for us and for those who wanted to keep legacy history around.

The training for using AccuRev was very short.  AccuRev sent a trainer to our office in Andover and we had 2 groups of developers (about 15 each), attend a training session that was less than 3 hours long.  One half day of training for the developers.  It was that simple.  After this training, I was available to help the user community with any questions that they had.  I do have to say, I did not spend much time at all helping fix issues related to AccuRev.  For any issues that did come up and I couldn’t help out with immediately, AccuRev Technical Support was always there to help.  For the record, I did not attend any special AccuRev Administrators Training.  AccuRev does have AccuRev Certified Engineer Training available and that was something I wanted to take.  Actually, whatever administration was needed for AccuRev took place in the Austin, TX office.  The person who did that did it a part time basis.  This is also much different than ClearCase.  I have been a full time ClearCase Administrator at several companies and that is a full time job.  When I was working with ClearCase, at least 20 and up to 30 percent of my time was spent on administrative tasks related to ClearCase.  So, I was able to devote that extra time to work on other types of things, like the install kits for our products using InstallShield.  We had been considering hiring a consultant to do that work and we ended up saving the money that we would have spent on that.

» Read more: Use Case: I went from ClearCase to AccuRev