Tuesday, February 10, 2009

Enterprise-in-a-Box Series – Creating users in an AD

When dealing with Enterprise applications, you often need to use VM’s to try to replicate the environment where your solution is going to ultimately live on.

For SharePoint and BizTalk development, the best way to ensure that your solution will deploy and run on the target environment is to create a Virtual Environment that closely resembles what your customer has.  Besides the obvious benefits to the IT department (less heat, more CPU utilization, etc, etc.), there is the hidden benefit of efficiency and less integration bugs on a Virtualized environment.  How many times you have developed the “perfect software”, and when try to deploy to the QA or Production environment, you’ve spent lots of hours troubleshooting security permissions, user profiles, IIS settings, SQL permissions, Service account not having proper rights, etc, etc. I know I have had my share.!

To setup a Virtual Enterprise from scratch, the easiest way is to follow the steps by steps directions from Microsoft: Using Microsoft Virtual Server 2005 to Create and Configure a Two-Node Microsoft Windows Server 2003 Cluster

I recommend that you use a 64bit Operating System as a host to run the Virtual Server.  I have used a Dell D820 running Vista x64 with 4GB of RAM.  I have found this configuration to be very responsive and not very expensive.

Let’s assume that the solution for my customer will have 3 users, and each of them have different roles and responsabilities.

Role

User

First

Last

email

user asmith Aaron Smith asmith@contoso-local
supervisor jsmith John Smith jsmith@contoso-local
CEO msmith Michael Smith msmith@contoso-local

 

Once you have your virtual environment setup, it is time to add users and roles to get your environment setup. I have used Neil Thompson’s script to create AD accounts programatically.

Here is a slightly modified version of his script:

image

image

As you can tell, now I am able to programmatically add users so that I can test. One more benefit of this Enterprise in a box, is that once you are done with it, you can bundle all of the configuration and setup to your integration team.  No more manual configurations.!

Noticed that regardless of what my solution does, or what the problem is. I would be able to test and troubleshoot my solution under 3 separate roles.  There is no need to deploy to production for *real* users to test if my application does what it is expected to do.!

No comments: