Tuesday, 24 November 2009

Installing AppFabric Caching Beta 1, Part 2

Last week I blogged about how far I'd got with installing the AppFabric Beta 1 caching engine, in which I got stalled because the caching configuration only supports Integrated Security with SQL Server. In this part I'll cover how I've got round this problem by building a domain on my virtual servers. IT Pros may wish to skip ahead to Part 3 (or point out in the comments my no doubt numerous mistakes in how I've gone about this).I've used two reference sources in going about this: this Microsoft article, and Dave McMahons Network Admin for Developers sessions (part 1 part 2) from DDD7.

My setup is as follows:

All servers are running Windows Server 2008 on Virtual PC 2007, and all on fixed IP addresses from upwards. Liam's already blogged about my initial troubles in getting these servers to talk to each other - they currently all have each other's names and IP addresses in their hosts file.

So, building the domain. Step 1 is installing the Active Directory Domain Services role on to SQLSERVER. This allowed me to create my velocity.local domain with SQLSERVER as the domain controller. I then created a pair of users, VelocityAdmin and VelocityUser - my plan is to use VelocityAdmin to install AppFabric onto the CACHESERVERs and then change it to use VelocityUser in normal usage, but we'll get to that in Part 3. I've also created SQL Server logons for those accounts with permissions on my VelocityConfig database.
With the domain and domain controller all set up and running Active Directory and DNS I can now add the other servers to the domain, and this is where I hit a problem. Every time I tried to add CACHESERVER1 to the domain, I got an error:

I tried a number of different things to get round this but eventually I figured it out - when I configured the network settings originally (in a non-domain world), I didn't setup a DNS server. Once I entered the IP address for SQLSERVER, I could join servers to the domain.

So at the end of all that I now have a network of servers all running under a domain. The next piece of the puzzle is to go back and try installing AppFabric Beta again, which will be Part 3 of this short series.

Friday, 20 November 2009

Installing AppFabric Caching Beta 1, Part 1

So Velocity now has a 'proper' name - AppFabric Caching, and it's finally in beta.

AppFabric Beta 1 can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=0BD0B14F-D112-4F11-94BF-90B489622EDD&displaylang=en but it has a big list of dependencies and Microsoft didn't link to the download page for each dependency :-(

So, things you will need to install before installing AppFabric Beta 1 on Windows Server 2008:
IIS Web Deployment Tool (http://go.microsoft.com/?linkid=9684516)

Go get it all and install it - it's OK, I'll wait...

Got all that? Good, let's continue...

Fire up the AppFabric installer. Once you get past the licensing, you get to this screen:

This is where you select what to install. By default the Worker and Distributed Cache Service components are selected. The Worker component is for the Workflow and Windows Communications Frameworks parts of AppFabric. Assuming you're just interested in the caching side, unselect Worker and select the others.

Then we're into the caching configuration screen. If you installed one of the Velocity CTPs this will look fairly familiar.
Note that the default is Join Cluster, not New Cluster, and that there's now a fourth port required (though it might have looked a bit better if the four ports had been arranged in ascending order).
 You can still choose whether to store the caching configuration in XML files on a network share or in a SQL Server database, but there are some changes here, especially in the way you enter a SQL Server connection string.

Whereas previously you could enter by hand a connection string, you now enter the name of the server and, once the list of databases has been retrieved from the server, the name of the database that holds the configuration information. The installer then creates the connection string for you. Or you can click the Default radio button and go with the default connection string. However as this puts nothing into the connection string box, you can't see what the default is. More annoyingly, if you do click the Default option, you then can't get back into this dialog to change your mind without cancelling out of the installer and starting the install again.

Note that the connection string is using Integrated Security. And you can't change it. And you can't set the account that AppFabric runs under.
I liked the old installer where you entered your own connection string. It had a couple of quirks about what it considered to be a valid connection string, but that was OK because I'd learnt what they were. Now I feel like I've lost an element of control - I'd rather decide myself that I want Integrated Security, thank you.

And this is as far as I've got on my Velocity demo setup. Every time I finish the install, it installs the caching engine but fails to configure it. I suspect this is because although I have a network of virtual servers set up, I now need to add a domain and accounts so that the Integrated Security works.

To be continued...