Install habitat on Sitecore 8.2 Instance

Hi as I mentioned in the introduction to Habitat post I would like to note some things on installing Habitat basically what do you need to take care and know before starting.

First of all and most easiest one is downloading the habitat solution from GitHub and you can do at least in two ways.

  1. If you know how to use Git then it is better just to download the repository from https://github.com/Sitecore/Habitat and Put it in the C:\projects\Habitat\ ( you can change this paths but you will need to adjust the paths in the Gulp Configuration.
  2. Download the code from GitHub through the Clone or download button and extract it on the mentioned folder C:\projects\Habitat\ ( this seems straight forward but it is a little bit tricky)
    The problem is that when you download the Habitat-master.zip you need to unblock it before extracting it to the directory, since this file is downloaded from internet if you skip this step you will have 10000 files that you need to go one by one and click properties and unblock them. However the solution for this is just to unblock the zip archive  before extracting it as you can see on the picture.
  3. All you have to do now  is to follow the steps from the https://github.com/Sitecore/Habitat/wiki/01-Getting-Started ( I have copied from here ) but please check my notes :

To install:

  1. Clone this repository to your local file system.   We have covered this already }
  2. (optional) Configure your settings if you are using settings other than the defaults:
    • The default settings for Habitat are
      • URL: http://habitat.dev.local/
      • Location: C:\Websites\Habitat.dev.local\
        { It is easier if you don’t use the C:\ Driver especialy on versions later then windows 7. C drive has a lot of protection and you will need to change permissions to a lot of files }
        I have used as Location : E:\wwwroot\alexU1\Website and I left the URL to be same
        Here is Picture from IIS and Explorer on how it looks like

    • To change the standard location of the source files, website files and website URL, modify the following files:
      • Please be aware to include or omit trailing slashes – as per the default
      • /Solution Items/src/Project/Habitat/code/App_Config/Include/Project/z.Habitat.DevSettings.config
      • /Solution Items/gulp-config.js
      • /Solution Items/publishsettings.targets
  3. Set up a clean Sitecore install with the settings from the previous step { It must be a clean install please check all the requirements before starting the process https://github.com/Sitecore/Habitat/wiki/02-Resources}
    • We recommend using Sitecore Instance Manager for the install. { I have used the normal .exe install however SIM is much more better for installing and creating backups}
    • Please note that the Sitecore executable installer does not support periods in the domain name and therefore if you are installing using this, please change the default domain (see step 2){ I changed the IIS bindings and site name manually }
    • Habitat requires:
      • Sitecore Experience Platform 8.2 Update 1 in Experience Platform or Experience Management mode
      • Webforms for Marketers 8.2 Update 1 module. It should be installed prior to running Sync Unicorn gulp task. Also you may need to have running mongo instance when installing WFFM module, otherwise it may lead to never ending installation dialogue window.
      • {Make sure that you have mongo runing while you are installing sitecore, it will not install without it – Webforms for Marketers 8.2 Update 1  this is a must, ig somehow the  taks (05-Sync-Unicorn runs a complete synchronization of Unicorn for all projects in the right order ) is failing probably it is missing the webforms or it have problems with permsions or read – only files }
  4. Restore Node.js modules
    • Make sure you have version 4+ of node.js Download here
    • In an elevated command window run ‘npm install’ in the root of repository.
  5. Build and publish the solution
    • Open an command window with elevated privileges and run ‘gulp’ in the root of repository.
    • Alternatively:
      • Open Visual Studio 2015 in Administrator Mode
      • Open the Visual Studio 2015 Task Runner Explorer pane (View | Other Windows | Task Runner Explorer).
      • Switch to “Solution ‘Habitat'”
      • Run the “default” task

That should be it, everything else should be as it is described on the Getting Started

Please keep in mind the following things and settings :
1. Unblock, Make Sure permissions are set correctly
2. Get all dependencies and requirements
3. Make sure that everything you run is as Administrator
3. Make sure that you have set proper paths to the Gulp Configs
Source location: C:\projects\Habitat\ 
Website location: C:\websites\Habitat.dev.local\
Website URL: http://habitat.dev.local/
To change the standard location of the source files, website files and website URL, modify the following files:

  • Please be aware to include or omit trailing slashes – as per the default
  • /Solution Items/src/Project/Habitat/code/App_Config/Include/Project/z.Habitat.DevSettings.config
  • /Solution Items/gulp-config.js
  • /Solution Items/publishsettings.targetsHere are the 2 picture where everything is stored on my machine and may Gulp config files

gulp-config.js

Publishing targets

z.Habitat.DevSettings.config

I hope that this will help you

Leave a Reply

Your email address will not be published. Required fields are marked *