Deploying Commerce Server 2007 Sites without Site Packager

From my initial investigation Site Packager's evolution has been unclear in the latest release of Microsoft Commerce Server.  One of the most obvious holes was the lack of documentation and support for command-line deployment.  While there has been some improvement in this latest release, it still feels like we are working with a tool from the previous generation. 

When Site Packager has failed for me in the past it's often a cryptic inexplicable error that requires opening a support case or too many hours figuring out what has changed.  It would have been really nice to see a set of MSBuild tasks for deploying Commerce Server sites in this release.  But I guess the line needs to be drawn somewhere when it comes to scope.

To give you a little more flexibility I've put together a site configuration tool with few scripts and a batch file to show you how to deploy a Commerce Server 2007 site without the use of Site Packager.  You will see how to deploy a site along with a number of other key automations for deployment (e.g. SQL script execution, IIS permissions, AzMan role management, etc...). Now, this is going to fall in the realm of being "unsupported", but the APIs in use are those that are used by Commerce Server to update the site configuration information. 

In the future I may spend more time to test the re-packaging of a site deployed with this tool, but I can't guarantee it.  I'm pretty much resigned to the fact that Site Packager is in need of a complete re-write.

Here's a brief rundown of what is in the package:

  • CreateSite.cmd - Create a site similar to the Starter Site Installation Guide instructions.
    • Create user accounts
    • Create user groups
    • Assign users database login and administrative database rights.
    • Create a new Commerce Serer site
    • Create the databases and resources for the site (Transactions, Transaction Config, Product Catalog, Inventory, Marketing, Profiles, CS Authentication)
    • Create, configure, and secure the main web site (bin, Pipelines folder lockdown, web.config updates)
    • Create, configure, and secure the web services (folder lockdown, web.config updates)
    • Import Starter Site sample data
  • SiteConfig.exe - Create, delete, modify, and compare Commerce Server sites and resources.
  • AddAzManRoleMember.vbs - Add a user or group to an Authorization Manager store.
  • CreateAppPool.vbs - Create an IIS6+ Application Pool
  • CreateCSApp.vbs - Create a CSApp.ini file
  • ProfileSchema.sql - SQL-ized version of the Profile Schema and Site Terms XML sample data (too bad there isn't a command-line import for the XML like there is with ImportCatalog.exe)
  • SearchReplace.vbs - Search and replace strings in files using regular expressions.

A few assumptions to note about the package:

  • I'm assuming scripts, batch file, and binary are in the Tools folder of the Commerce Server installation.
  • I'm assuming that you have your core site and web services files in their file spot on the disk.
  • The batch file is built around the SQL Server residing locally for testing purposes.  If your production configuration is different you should be able to easily modify the batch file to work with a remote server.

I've tested in on a pretty standard Windows Server 2003 R2 image with IIS, Commerce Server 2007 Developer Edition, and SQL Server 2005 Developer Edition.

Comments Subscribe to Post Comments Feed

Doug said:
Colin, nice work. I'm afraid I have to agree that the site packager is a rather clunky app and the installation guides are incredibly painful to wade through. I'll give your app a go and report back. Thanks for the effort.
Cristiano WebLog said:

Hi there, Up in Redmond last week attending the Commerce Server 2007 bootcamp I told Max that would be

Ralf said:

Colin, this is great!! Exactly what I am looking for. Thanks a lot!

Max Akbar said:

The Configuration of Commerce Server is stored in SQL Server database using Configuration APIs to manage

Noticias externas said:

The Configuration of Commerce Server is stored in SQL Server database using Configuration APIs to manage

MSDN Blog Postings » Rub a dub dub, a PUP in my tub Part I! said:

Pingback from  MSDN Blog Postings  » Rub a dub dub, a PUP in my tub Part I!

http://rockstarguys.com/blogs/colin/archive/2006/11/05/deploying-commerce-server-2007-sites-without-site-packager.aspx said:

Pingback from  rockstarguys.com/.../deploying-commerce-server-2007-sites-without-site-packager.aspx

mark.d.clifton@aexp.com said:

Does anyone have the SiteConfig.zip file as the link below doesn't work - file corrupt. Thanks

Have Your Say