guide

Playing with Sitecore.HabitatHome.Utilities and Habitat Home Commerce 9.0.2 on your machine

Personally, I’m fond of Sitecore.HabitatHome.Utilities so much. It’s really a quick way for me to install the following Sitecore demo:

Today, I want to play around with it by installing the following Sitecore demo:

Step-by-step guide for installing Habitat Home Commerce (Sitecore XP 9.0.2 + SXA 1.7.1 + Sitecore XC 9.0.2)

  1. install Habitat Home (Sitecore XP 9.0.2 and SXA 1.7.1)
    • Note: should execute .\build -Target “Quick-Deploy” in Step 13
    • hhcu_1
  2. (optional) if you don’t want to wait for a looooooong operation and have a good chance to get connection issues, you will need to:
  3. create the configuration-xc.json file and populate it with the default values
    • launch PowerShell as an administrator
    • change directory to \Sitecore.HabitatHome.Utilities\XC\install
    • execute .\set-installation-defaults
    • hhcu_2.png
  4. (optional) if you don’t want to use the default settings, you will need to adjust the appropriate values in the configuration-xc.json file
    • launch PowerShell as an administrator
    • change directory to \Sitecore.HabitatHome.Utilities\XC\install
    • remove example extension out of \XC\install\set-installation-overrides.ps1.example manually or by executing copy set-installation-overrides.ps1.example set-installation-overrides.ps1
    • hhcu_3
    • open set-installation-overrides.ps1 and then correct the settings
    • execute .\set-installation-overrides
    • hhcu_4
  5. Note: if the install directory of 7-zip is NOT “C:\Program Files\7-Zip\7z.exe”, you will need to update \Sitecore.HabitatHome.Utilities\XC\install\install-xc0.ps1
    • hhcu_6.png
  6. let’s install Experience Commerce
    • launch PowerShell as an administrator
    • change directory to \Sitecore.HabitatHome.Utilities\XC\install
    • execute .\install-xc0
    • hhcu_5.png
    • you will be prompted for your https://dev.sitecore.net/ credentials – the required assets will be downloaded automatically if any, otherwise click Cancel button
    • hhu_6
    • Note 1: we can remove the tasks completed from \Sitecore.HabitatHome.Utilities\XC\install\assets\Resources\Master_SingleServer.json and re-do this step if there is something wrong
    • Note 2: we can increase the execution timeout by updating \Sitecore.HabitatHome.Utilities\XC\install\assets\Resources\Modules\SitecoreUtilityTasks\SitecoreUtilityTasks.psm1 if you see something like this
      • hhcu_7.png
    • hopefully you can see something like this
    • hhcu_8
  7. download or clone the git repo from Habitat Home Commerce 9.0.2.2
  8. restore all Node.js modules
    • run command line as Administrator
    • change directory to \Sitecore.HabitatHome.Commerce
    • execute npm install
    • hhcu_9.png
  9. Note: I don’t want to use the default settings so I need to adjust the appropriate values in the following files:
    • \gulp-config.js
      • hhc_11
    • \publishsettings.targets
      • hhc_10
    • \src\Project\HabitatHome\website\App_Config\Include\Project\z.HabitatHome.Commerce.Website.DevSettings.config
      • hhc902_2
    • \deploy-commerce-engine.ps1
      • hhcu_13.png
    • \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
      • hhcu_14.png
    • \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
      • hhcu_15.png
  10. let’s deploy the solution
    • run command line as Administrator
    • change directory to \Sitecore.HabitatHome.Commerce
    • execute node_modules\.bin\gulp initial
    • hhcu_10.png
    • hopefully you can see something like this
    • hhcu_12.png
  11. let’s deploy the engine
    • launch PowerShell as an administrator
    • change directory to \Sitecore.HabitatHome.Commerce
    • execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
    • ghhc_7.png
    • hopefully everything runs well and then you would see something like this
    • ghhc_8
  12. open a browser and then navigate to https://habitathome.local, you would see something like this after adding some products to cart successfully
    • hhc902_11.png

Got issues?

Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore Demo Installation!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.