Easily install Sitecore XP, XC with Sitecore.HabitatHome.Utilities

What’s Sitecore.HabitatHome.Utilities?

Repository with a collection of useful utilities and script examples to help in the context of the Habitat Home Demos. Most scripts can be repurposed to work with other solutions.

TL;DR;

By using Sitecore.HabitatHome.Utilities, we can easily install the following stuffs

  • Solr with SSL
  • Sitecore Experience Platform 9.0 Update-2
  • Sitecore Experience Commerce 9.0 Update-2

Moreover, if we plan to install Sitecore.HabitatHome.Content as well as Sitecore.HabitatHome.Commerce, this repo is also help us install the required modules rapidly and easily.

Prerequisites

Preparations

  • Clone the Sitecore.HabitatHome.Utilities repository from github to your local (i.e. D:\sitecore)

https://github.com/Sitecore/Sitecore.HabitatHome.Utilities.git

  • Switch to release/9.0.2 branch
  • Download the following modules/packages to speed up the installation (although it supports download while installing but sometimes those packages are not downloaded successfully, hence it causes some unexpected errors)

Sitecore Experience Platform

[*] XP/install/assets

Sitecore 9.0.2 rev. 180604 (WDP XP0 packages).zip
solr-6.6.2.zip
nssm-2.24.zip

[*] XP/install/assets/packages (created the new one)

Sitecore Azure Toolkit 2.0.4 rev. 180605.zip
Sitecore PowerShell Extensions-4.7.2 for Sitecore 8.zip
Sitecore Experience Accelerator 1.7.1 rev. 180604 for 9.0.zip
Data Exchange Framework 2.0.1 rev. 180108.zip
Sitecore Provider for Data Exchange Framework 2.0.1 rev. 180108.zip
SQL Provider for Data Exchange Framework 2.0.1 rev. 180108.zip
xConnect Provider for Data Exchange Framework 2.0.1 rev. 180108.zip
Dynamics Provider for Data Exchange Framework 2.0.1 rev. 180108.zip
Connect for Microsoft Dynamics 2.0.1 rev. 180108.zip

Sitecore Experience Commerce

[*] XC/install/assets/downloads

Sitecore.Commerce.2018.07-2.2.126.zip

[*] XC/install/assets/Commerce

Habitat Home Product Images.zip

  • Open the PowerShell window in administrative mode, and change location to the folder that was cloned from github

Set-Localtion D:\sitecore\Sitecore.HabitatHome.Utilities

Getting Started

1. Let start with Solr

  • Change the working folder to D:\sitecore\Sitecore.HabitatHome.Utilities\XP\install\Solr

Set-Location .\XP\install\Solr

  • Start installing Solr at E:\Solr for example

.\install-solr.ps1 -installFolder "E:\Solr" -Clobber

  • After installing, it’ll open the browser automatically at the Url:

https://localhost:8662/solr/#/

2. Next, install Sitecore Experience Platform

  • Change the working folder to D:\sitecore\Sitecore.HabitatHome.Utilities\XP\install

Set-Location ..\

  • Open assets.json by any text editor, then update the following section
"id": "def",
"name": "Data Exchange Framework",
"isGroup": true,
"download": true,
"install": true,
  • Generate the configuration-xp0.json by executing the script in below

.\set-installation-defaults.ps1

  • Generate the set-installation-overrides.ps1

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

  • Open the set-installation-overrides.ps1 by any text editor, then change the corresponding values that match our machine, they can be
# Site Settings
$site.prefix = "habitathome"
$site.suffix = "dev.local"
$site.webroot = "E:\Inetpub\wwwroot"
# Solr Parameters
$solr.root = "E:\solr\solr-6.6.2"
$solr.serviceName = "solr-6.6.2"
# SQL Settings
$sql.server = "."
$sql.adminUser = "sa"
$sql.adminPassword = '12345'
  • Execute the set-installation-overrides.ps1 to update the configuration-xp0.json file

.\set-installation-overrides.ps1

  • Verify the configuration-xp0.json. If it’s all correct, we’re going to start the installation by execute the script

.\install-xp0.ps1

Note: we will be required to provide Sitecore’s credential

  • Next, we have to install the required packages/modules from Sitecore.HabitatHome.Content. Just simply execute the script

.\install-modules.ps1

Note: we will be required to provide Sitecore’s credential

3. Install Sitecore Experience Commerce

  • Change the working folder to D:\sitecore\Sitecore.HabitatHome.Utilities\XC\install

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

  • Generate configuration-xc0.json by execute the script

.\set-installation-defaults.ps1

  • Generate set-installation-overrides.ps1 file by execute the command

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

  • Open the set-installation-overrides.ps1 by any text editor, then change the corresponding values
$commerce.brainTreeAccountMerchandId = ""
$commerce.brainTreeAccountPublicKey = ""
$commerce.brainTreeAccountPrivateKey = ""
  • Update the configuration-xc0.json by executing the script

.\set-installation-overrides.ps1

  • Verify configuration-xc0.json file. If it’s all correct, we’re going to start the installation by execute the script

.\install-xc0.ps1

Known Issues:

“The service cannot accept control messages at this time. (Exception from HRESULT: 0x80070425)”

Resolution: Open Internet Information Services (IIS) Manager;  start the habitathome.dev.local site (also its Application Pool if needed) manually.

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