BM-Bloggers

The blogs of Black Marble staff

Community Community Community

This is a great time of  year for events – as well as our own (see previous post: A Series of Fortunate Events), there are the following great community events to look forward to:

First up is SQL Bits in York – taking place from 30th September to 2nd October at York University – a three day event, with a community focus on the Saturday. The largest SQL Server conference in Europe, and must-attend event for DBAs.

Next is a a free one-day event in Manchester focusing on Windows Phone 7 from the DDD community – a day of demo-rich presentations for developers – learning, sharing and interacting in a relaxed and informal atmosphere.  It takes place at the Odeon Cinema, Printworks on 7th October, from 9:00-17:00.  There are still places available so book now!

Finally, another DDD event, this time in Ireland!  On Saturday 9th October at the NDRC in Dublin – registration is now open.

DDD Dublin 2010 Sessions published

The results of the DDD Dublin vote is in, and I am sorry to say I did not make it through the selection process. I must come up with at least some more interesting titles and abstracts (of course I can leave the sessions as dull as ever as you have voted for them by then, just like politicians and general elections really).

The schedule looks really good, but after a bit of thought I have decided not to attend the event; I am speaking or attending events both the week before and  the week after DDD Dublin so I am going to take the chance to reduce my carbon footprint and have a weekend at home.

Upcoming speaking engagements

and that is just this year

[Updated 22nd & 29th Sep 2010]

DDD Dublin voting as opened

The vote has opened for DDD Ireland, get in there an vote for the sessions you would like to see, there is a nice selection.

May I draw your attention to the two I have submitted

  • How can I add my own custom step to a TFS 2010 build, or do I even need to try? (Oooh a new one!)
  • Developing Testable Web Parts for SharePoint (Could also be called Using Typemock with SharePoint)

No pressure…….

Experiences running multiple instances of 2010 build service on a single VM

I think my biggest issue with TFS2010 is the problem that a build controller is tied to a single Team Project Collection (TPC). For a company like mine where we run a TPC for each client this means we have had to start to generate a good number of virtualised build controller/agents. It is especially irritating as I know that the volume of builds on any given controller is low.

A while ago Jim Lamb blogged about how you could define multiple build services on a single box, but the post was full caveats on how it was not supported/recommended etc. Well since this post there has been some discussion on this technique and I think the general feeling is, yes it is not supported, but there is no reason it will not function perfectly well as long as you consider some basic limitations:

  1. The two build controllers don’t know about each other, so you can easily have two build running at the same time, this will have an unpredictable effect on performance.
  2. You have to make sure that the two instances don’t share any workspace disk locations, else they will potentially start overwriting each other
  3. Remember building code is usually IO locked not CPU locked, so when creating your build system think a lot about the disk, throwing memory and CPU will have little effect. The fact we run our build services on VMs and these us a SAN should mitigate much of this potential issue.
  4. The default when you install a controller/agent on a box is for one agent to be created for each core on the box. This rule is still a good idea, but if you are installing two controller/agent sets on a box make sure you don’t define more agents than cores (for me this means on by build VM I have to 2 virtual CPUs as I am running 2 controller/agent pairs)

Jims instructions are straight forward, but I did hit a couple of snags:

  • When you enter the command line to create the instance, make sure there a spaces after the equals for the parameters, else you get an error

sc.exe create buildMachine-collection2 binpath= "C:\Program Files\Microsoft Team Foundation Server 2010\Tools\TfsBuildServiceHost.exe /NamedInstance:buildMachine-collection2" DisplayName= "Visual Studio Team Foundation Build Service Host (Collection2)"

  • I cannot stress enough how important it is give the new instances sensible names, especially as their numbers grow. Jim suggested naming after the TPC they service, for me this is bad move as at any given time were are working for a fairly small number of clients, but the list is changing as projects start and stop. It is therefore easier for me to name a controller for the machine is it hosted on as they will be reassigned between TPC based on need. So I settle on the names in the form ‘build1-collection2’ not a TPC base done. These are easy to associate with the VMs in use when you see them in VS2010
  • When I first tried to get this all up and ran the admin console for the command prompt I got the error shown below

image

After a bit of retyping this went away. I think it was down to stray spaces at end of SET variable, but not 100% sure over this. I would just make sure you strings match if you see this problem.

[Updated 26 Nov 2010] The batch file to start the management console is in the form

      set TFSBUILDSERVICEHOST=buildMachine-collection2 
      "C:\Program Files\Microsoft Team Foundation Server 2010\Tools\tfsmgmt.exe"

Make sure that you run this batch file as administration (right click run as admin) if you don't the management console picks up the default instance

  • Also it is a good Idea to go into the PCs service and make sure your new build service instance is set to auto start, to avoid surprises on a reboot.
  • When you configure the new instance make sure you alter the port it runs on (red box below) I am just incrementing it for each new instance e.g. 9191 –> 9192. If you don’t alter this the service will not start as it’s endpoint will already be in use.
  • Also remember to set the identity of the build service run as (green box), usually [Domain]\TFSBuild, too easy to forget as well as you click through the create dialogs.

image

Once this is set you can start the service and configure the controller and agent(s) exactly as normal.

You might want to consider how the workspace is mapped to the your multiple controllers, so you use different root directories, but that is your call. Thus far leaving it all as it was when I was using a separate VM for each build is working fine for me.

We shall see how many services I can put onto single VM, but it is certainly something I don’t want to push to hard. However that said if you are like use with a relatively low load on the build system this has to be worth looking at to avoid proliferation of build VMs.

A Series of Fortunate Events

Robert Hogg(RobertHogg)Visual-Studio-2010-Beta-2-Public-Downloads-2

We are delighted at Black Marble to announce a great series of events to brighten your days through the darkness of Autumn and Winter.

Kicking off in September with the first of four Visual Studio events exploring the different products available – from Express to Ultimate – to help you determine which is best for you and your business.

21 September – Black Marble / 12 October – Microsoft London 
16 November – Black Marble / 14 December – Microsoft London.

Middle of October we are running our Mix in the North event – focusing on the highlights of MIX, the conference for web developers and UX designers working the Microsoft platform.  Joining us are Microsoft’s Michael McClary (@michaelmcclary), Will Coleman (@will_coleman) and Mike Taulty (@mtaulty).  As well as some great demos of Windows Phone 7, we will have a Microsoft Surface available for you to try.

During the evening, we will be welcoming companies who have signed up to (or want to sign up to) WebsiteSpark and BizSpark.

November starts with a day full of SharePoint greatness – the morning explores the key features we use having worked with SharePoint 2010 for over a year, and during the afternoon we are focusing on using SharePoint for Content Management.

December see a return of the Architecture Forum in the North – this year’s title is “Tools and Methods for Architects” and we are once again joined by Matt Deacon, Simon Thurman, Simon Davies, Giles Davies and Mark Richardson from Microsoft.

And top it all off, following the success of our Open Day we are opening our doors once more in December – join us for drinks, mince pies and plenty of Christmas cheer!

bmlogo

Thoughts on Kodu

The Kodu team have an introductory video on teaching children to program with Kodu see it here

The Consolarium have released a set of videos as an introduction to Kodu , see them here. They are a Centre for Games and Learning, established by Learning and Teaching Scotland to explore the world of computer games and help teach programming. It is great to see centralised generation of quality teaching material for consumption across all the schools in a region, inspired. Just a shame we don't have this in England, luckily they are happy to share.

and finally a plug for the Kodu educational material get it here

b.

Stupid mistake over Javascript parameters

I have been using the Google Maps JavaScript API today. I lost too much time over a really stupid error. I was trying to set the zoom level on a map using the call

map.setZoom(<number>);

I had set my initial zoom level to 5 (the scale is 1-17 I think) in the map load, when I called setZoom to 11 all was fine, but if I set it to any other number is reverted to 5. This different effect for different numbers was a real red herring. The problem was down to how I was handling the variable containing the zoom level prior to passing it to setZoom method. When it was set to 11 it was set explicitly e.g.

var zoomNumber = 11;

However when it was any other value it was being pulled from the value property of a combo box, so was actually a string. My problem was that setZoom does not return an error if if pass something in it does not understand, it just reverts to it’s initial value.

The solution was simple, cast the value to a string and it works as expected

map.setZoom(parseInt(ZoomNumber));