Friday, August 14, 2009

Some Tips for TeamCity

We are using TeamCity for continuous integration. Here I'll give provide a few tips in particular for people who are less familiar with Java. (After all this is a .NET blog!) Starting with the free Professional Edition we quickly decided to go for the Enterprise Edition to get unlimited build configurations and LDAP integration. Migrating from the built-in HSQL to a separate database server and integrating to LDAP wasn't overly complicated, although it certainly helps if you have access to JetBrain's support. So here are my tips for TeamCity:
  1. Use a separate database server from the beginning. That way you save the database migration.
  2. When you migrate the database you execute a piece of Java code. You may have to specify a parameters for the JVM. Since the first attempts failed I had to tell the tool to clean out the target database first. To do this in the file migrateDB.bat locate the line that starts with "SET MIGRATION_JVM_OPTS". Add "-DforceClean=true" to the options. This will drop all tables in the target database. (You don't want to do that once you have migrated, so best is to remove this immediately after a successful migration!)
  3. In some cases the migration will fail and the error messages may not necessarily be a big help unless you have done migrations plenty of times. In my case I had a path to the old server configuration wrong. So check that as well.
  4. If the migration fails then check the log files. They provide good information.
  5. When specifying paths anywhere use forward slash instead of backslash, even on Microsoft platforms.
Now our deployment is on a separate database and it actually improved the performance. Moving to LDAP avoids quite a bit of administrative work. All runs smoothly. Thanks to to Serge, Leonid, and Yegor of JetBrains for their fantastic support!

No comments:

Post a Comment

All comments, questions and other feedback is much appreciated. Thank you!