[Sitecore.HabitatHome.Utilities] – Install a second instance of Sitecore 9 – XP and XC

Let assume that we’ve already had an instance of HabitatHome Demo site (a.k.a. Sitecore.HabitatHome.Commerce) on our machine and also make sure the localhost binding is replaced by habitahome.dev.local (since new Sitecore Commerce sites will take localhost as default binding). Now, we start to install a second instance of Sitecore XP within XC on same machine (a.k.a. twice instance of Sitecore XP & XC on the same machine). Don’t worry if habitathome.dev.local not ready yet, please checkout the following posts to make it ready:

Getting started

Before starting, It’s important to notice that these are 2 configuration files will be generated for both XP and XC. Throughout the installation process, just remember to append these configuration files after the script, unless it’s going to work with habitathome as default.

1- Install the new instance of Sitecore XP – demohome.dev.local

  • Access the folder that Sitecore.HabitatHome.Utitlities was cloned from github (i.e. D:\Sitecore\Sitecore.HabitatHome.Utilites)

Set-Location D:\Sitecore\Sitecore.HabitatHome.Utilitites

  • Now, change the location to XP\install

Set-Location .\XP\install

  • Generates the demohome-configuration-xp0.json file

.\set-installation-defaults.ps1 -ConfigurationFile demohome-configuration-xp0.json

  • Generate the demohome-set-installation-overrides.ps1 script

copy set-installation-overrides.ps1.example demohome-set-installation-overrides.ps1

  • Open the demohome-set-installation-overrides.ps1 that was generated above; then update the corresponding setting values to match with our machine, they are:

$site.prefix = "demohome",

$site.webroot = "D:\Inetpub\wwwroot",

$solr.root = "D:\Solr\solr-6.6.2",

$sql.adminPassword = "----your-sa-password-----"

  • Update the demohome-configuration-xp0.json file with the overridden values above

.\demohome-set-installation-overrides.ps1 -configurationFile demohome-configuration-xp0.json

  • Let’s start installing Sitecore XP by executing the installation script with a particular configuration

.\install-xp0.ps1 -ConfigurationFile demohome-configuration-xp0.json

2- Install the required Sitecore packages

  • As required from Sitecore Experience Commerce, we have to install the required packages before installing it. They are:
    • Sitecore PowerShell Extensions 4.7.2 for Sitecore 8/9
    • Sitecore Experience Accelerator for 9.0 version 1.7.1
  • Still in XP\install  location, execute the script

.\install-modules.ps1 -ConfigurationFile demohome-configuration-xp0.json

3- Install the fresh Sitecore Commerce for demohome.dev.local

  • Now, we start installing Sitecore Commerce for  demohome.dev.local ; let begins with change the location to XC\install  (since we’re in XP\install)

Set-Location ..\..\XC\install

  • Generate the demohome-configuration-xc0.json file
    • Notes: this steps require us provide the path of XPConfiguration file which is demohome-configuration-xp0.json which was used to install Sitecore Experience Platform in preceding.
.\set-installation-defaults.ps1 `
-ConfigurationFile demohome-configuration-xc0.json `
-XPConfigurationFile (Resolve-Path "..\..\XP\install\demohome-configuration-xp0.json)
  • Generate demohome-set-installation-overrides.ps1 script

copy set-installation-overrides.ps1.example demohome-set-installation-overrides.ps1

  • Open the demohome-set-installation-overrides.ps1 file; then update the corresponding values if needed. In my case, there is no need to change anything.
  • Update demohome-configuration-xc0.json by executing the script above

.\demhome-set-installation-overrides.ps1 -configurationFile demohome-configuration-xc0.json

  • Now, we start installing the fresh instance of Sitecore Commerce for demohome.dev.local without pre-loaded demo assets (i.e. HabitatAuthoring) by append -SkipHabitatHomeInstall parameter.
.\install-xc0.ps1 ` 
-ConfigurationFile demohome-configuration-xc0.json `

5- Let verify the installation


    • Then, try with Sitecore Commerce’s business tool by browsing https://localhost:4200 or from Launchpad, we can see there is no environment listing here since we’ve not bootstrap and initialize yet


So, what’s next?

Next post, we will start our own Sitecore Commerce Engine sites, then bootstrap the environment.

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