Upgrade CTX Storefront and retain customizations

There are different ways to upgrade a Storefront Group and below you’ll find my preferred way.

This quickpost covers only a single scenario, including the following components:

  1. Load balancing of a Storefront Group via Netscaler
  2. Server Group out of min. 2 Storefront servers

Further I assume:

  1. Same OS, no mix between different server OS versions (not supported) 
  2. Functional replication 
  3. Your ability to understand how Citrix components work

Steps

1. Test your Replication

2. Put the first server in maintenance mode

3. Perform a snapshot of all Storefront servers

Create a snapshot without including the virtual machine’s memory

I

4. Installation

Reboot your server in order to remove any locks. This ensures a successful upgrade.

Stop all Citrix services and perform an “iisreset /stop”

				
					get-service *citrix*
get-service *citrix* | stop-service -force
iisreset /stop
				
			

Mount your ISO, click on autoselect.exe or launch the EXE itself by navigating to ‘:\x64\Storefront\CitrixStoreFront-x64.exe’

Restore your customizations using the following script

				
					<# restore customizations by restoring the settings from the original host#>
#Variables
$SourceSF           = Read-Host "Please provide the DNS Name of the source Host: "
$Source_Base_Folder = '\\' + $SourceSF + '\C$\' + "inetpub\wwwroot\Citrix\"
$TargetSF           = Read-Host "Please provide the DNS Name of the destination Host: "
$Target_Base_Folder = '\\' + $TargetSF + '\C$\' + "inetpub\wwwroot\Citrix\"
$Stores             = (Get-ChildItem $Source_Base_Folder -Exclude "*Web","*Auth","Configuration","Roaming").Name
foreach ($Store in $Stores){
    if (Test-Path $($Target_Base_Folder + $Store)){
        "`r`n"
        "--------------------"
        $Store
        "--------------------"
        # default.ica on Source SF
        $Source_ICA       = $Source_Base_Folder + $Store + '\App_Data\default.ica'
        # default.ica on destination SF
        $Target_ICA       = $Target_Base_Folder + $Store + '\App_Data\'
        # custom Folder on Source SF
        $Source_custom    = $Source_Base_Folder + $Store + 'Web\custom\'
        # custom Folder on this SF
        $Target_custom    = $Target_Base_Folder + $Store + 'Web\'
        
        if (-not(Test-Path $Target_ICA)){md $Target_ICA}
        Copy-Item -Path $Source_ICA -Destination $Target_ICA -WhatIf
        Copy-Item -Path $Source_ICA -Destination $Target_ICA -Force
        if (-not(Test-Path $Target_custom)){md $Target_custom}
        Copy-Item -Path $Source_custom -Destination $Target_custom -Recurse -WhatIf
        Copy-Item -Path $Source_custom -Destination $Target_custom -Recurse -Force
        "--------------------"
    }
    Else {Write-Host "ERROR - Store $Store doesn't exist on this Server" -ForegroundColor Red}
}
				
			

Test your settings by modifying the hostfile under ‘C:\windows\system32\drivers\etc\hosts’ and point to the IP of the updated Storefront.

				
					# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
192.168.10.116 sf.acx.lab

				
			

Confirm all your customizations and test all relevant authentication methods

5. Upgrade the rest of your Storefront group by following the steps mentioned above

6. Cleanup

Remove the installation files and delete all snapshots

Good luck with your next upgrade

7 Responses

  1. Hi Balint!
    Congrats top this blogpost. Looking forward seeing many more like this from you!
    Br
    Christoph

Leave a Reply

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

7 Responses

  1. Hi Balint!
    Congrats top this blogpost. Looking forward seeing many more like this from you!
    Br
    Christoph

Leave a Reply

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