Sitecore Blog: Rasmus on Sitecore

SitecoreInstaller - How to install Sitecore in less than 15 seconds with 1 click

By Rasmus Rasmussen, January 27, 2012 | Rating:  | Comments (13)

As a Solution Architect at Sitecore, I daily need a clean Sitecore with different modules. Being lazy and not happy about doing repetetive tasks, I decided to make an installer that would allow me to install Sitecore with 1 click on my local machine.

Greatly inspired by Alex Shyba's blog post on how to ease deployment in an enterprise setup, I wanted to share how I approached easing installation Sitecore on my local machine.

Main objective was for me to have as hazzle free an installation as possible meaning limit required amount of clicks and configuration, not to speak of pre configured module installation.

Example is that I always install Sitecore with a customized version of the super cool Shared Source module Customized Startbar which gives me links to the Content Editor with the Core database without the need to change database in the desktop client.

The way I approached it was to divide the installation process into smaller steps which could be executed in a sequential order ending up with a full Sitecore with modules installed and warmed up.

Get it at http://trac.sitecore.net/SitecoreInstaller:

 

Comments

  • Looks really cool. I get a JIT unhandled exception on step 2:

    System.IO.DirectoryNotFoundException: Could not find a part of the path 'd:\BuildLibrary\CMS\Sitecore 6.5.0 rev. 111123\Website\'.

    - Mark Ursino
    January 27, 2012 at 12:26 PM

  • Cool stuff. I assume this doesn't create a Visual Studio project - might be a useful option to add (I also assume you could maintain a custom zip of Sitecore, but then you would need to create a new zip for each new release).

    - John West
    January 27, 2012 at 12:35 PM

  • This is great, gonna start playing around with it.

    Mark, I had the same issue. Turns out when you unzip the Sitecore files it creates another folder, so your path ends up looking like d:\BuildLibrary\CMS\Sitecore 6.5.0 rev. 111123\Sitecore 6.5.0 rev. 111123\Website\, just copy everything up a level and remove the extra folder.

    - Chris Lees
    January 28, 2012 at 10:18 AM

  • I created a empty Visual Studio project (and included some files and references) and added the project files to a Sitecore package. Put that Sitecore package into your buildlibrary modules folder (I'm using the _Default folder) and you have a VS project for each new installation.

    Minor detail: in this case the name of the VS project is the same for each installation

    - Mark van Aalst
    January 28, 2012 at 1:30 PM

  • @Mark - it seems like your build library hasn't been set up properly. Did you extract the Sitecore zip file? You should at a Data, Databases and Website folder

    @John - It currently doesn't but it's definately something I thought of. You could also add it as a module manually. You would just have the physically files which would be copied into your Sitecore folder. The downside of this would be that solution name etc would be static.

    - Rasmus Rasmussen
    January 30, 2012 at 12:26 AM

  • FANTASTIC!

    - Lars Nielsen
    January 30, 2012 at 1:06 AM

  • @Rasmus - you're totally right. I unzipped the manual installer and forgot the folder contains another sub-folder by the same name. I fixed the issue and got past the error. Now the error I'm getting is where it attaches the DBs by running the SQL script. It seems to not run. If I do each step manually, everything works up until it attaches the DBs. It says it successfully attaches them but it definitely doesn't. Then it goes on a few more steps and when it tries to warm the site up, it fails because the DBs aren't actually there.

    - Mark Ursino
    January 30, 2012 at 7:17 AM

  • And the comment module works great :-))

    @Mark V - I may be reading you wrong but you don't need to add it to a Sitecore package. You could just add it as plain files as they will be copied to the project folder. It's faster and easier than Sitecore packages.

    Tried to explain it here in text but screendumps are on their way
    http://trac.sitecore.net/SitecoreInstaller/wiki/Documentation

    - Rasmus Rasmussen
    January 30, 2012 at 7:19 AM

  • @Rasmus I indeed have the Visual Studio files added as a package/module.

    Thanks for the tip on copying them to the project folder. I will give that a try.

    - Mark van Aalst
    January 30, 2012 at 7:28 AM

  • @Mark U - right. It's probably has something to do with your sql login. The installer generates a sql attach script - please log into sql administration studio as the user you specified in the local.config, run the script and debug from there. Verify that your user is in the sysadmin role and login is enabled (SA login is disabled by default in some installations). Also - enabling debug in the log window might bring more information

    - Rasmus Rasmussen
    January 30, 2012 at 7:39 AM

  • @Rasmus - I looked into it and when I run the SQL query from a new query window in Mgmt Studio at the DB instance level using my new sysadmin-level login, it works fine. If I use the Debug output in the installer it shows the error: CREATE DATABASE permission denied in database 'master'.

    I'm wondering if maybe the code that's trying to run the SQL doesn't have the ability to execute it even with the sysadmin login? I'm using SQL Express 2008 on my local machine, Windows 7 x64. I'm not sure how to get around this error but if I figure it out I'll post an update.

    - Mark Ursino
    January 30, 2012 at 8:21 AM

  • @Rasmus - I fixed my issue. It turns out that because the program is an executable, it run the attach DB script in the context of my logged in Windows user (a domain account for me). I removed my domain account as a SQL login and recreated it, then made it a sysadmin. This fixed the issue.

    - Mark Ursino
    January 30, 2012 at 9:36 AM

  • Super..!! I've added your findings to the troubleshooting guide. If anyone encounter problems during install with databases failing to attach - please see trouble shooting guide for possible answer as provided by Mark Ursino here http://trac.sitecore.net/SitecoreInstaller/wiki/TroubleShooting

    - Rasmus Rasmussen
    February 07, 2012 at 11:58 PM

*
*
*

Learn More with Sitecore

Newsletter
*

Innis Maggiore | Read Case Study >

While Microsoft SharePoint has worked well for GuideStone as an internal, file sharing system, in order to meet their goals, Guidestone needed a CMS that would provide a solid integration foundation—which is Sitecore’s strength.

- Mark Vandegrift, Principal, Web & Digital Services, Innis Maggiore