We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.
For more information around feature requests in the Cireson Community click here.
Reduced outage time for SCSM Portal upgrades/updates
I can see two ways this would work:
- An unattended installation script that we could schedule for out-of-hours.
The method we were using to extract licenses from the Cireson Licensing site no longer works for portal keys (I'm assuming the web call changed for the Environment Hash parameter). Either we'd need an updated method, or the portal gets a grace period of a week or so while we manually save out the keys from the site and transfer them to the DMZ. - Ability to patch portal servers during the day without affecting the live servers.
I've been told the 7.4 portal will not run properly if the ServiceManagement DB has been upgraded to 8.1. I would like to be able to take half of the servers down and update them while users are still running on the other half, then patch the rest. The NLB handles this well without loss of data.
Comments
If we could get command-line switches or the equivalent for all the params that the installer asks for, then I could finally have this run as an unattended SMA job after hours. I would even be OK with requiring a first-time manual install, and then just passing the account PWD in, utilizing the pre-filling of the fields that it currently does.
Is that pretty much what you were thinking of, @Leigh_Kilday ?
To elaborate further on my license issue I mentioned, keys are often invalid for upgrades and sometimes updates, so in our offline environment we need to get new keys at the time we download the latest portal version. There have been times where these keys have not been updated for the latest version and we only find this out when we've installed the portal. If we were to move to scheduled unattended installs, we'd need assurance that we have valid keys before we come in the next day and panic.
At this time the solution does not cater for new installations.
Two+ files are required:
config_{env}.psd1
- Hash table of environment-specific values, such as DB server, app name etc. This needs to contain everything not common between environments.
- There will be as many of these files as there are environments.
- Selected by changing the deployEnvironment variable (explained below).
deploy.ps1- Contains a hash table of the global parameters required to run InstallPortal.ps1 (provided within the source files).
- Reads from the config psd1 files for environment-specific values.
- If the current server is running the CacheBuilder, set a flag to run the SQL jobs below. Otherwise just install the portal. This is why it can't be run for a fresh installation.
- Invoke-SQLcmd executes a custom SQL Server Agent job to remove the ServiceManagement and CiresonAnalytics databases from the AAG.
- InstallPortal.ps1 run with the parameters defined by the hash table.
- Invoke-SQLcmd executes another Agent job to add the databases back into the AAG and set the failover mode to automatic.
How it works- Put source files in a specific folder on each server (can be scripted). My script expects that there is only one version of the source files in there at a time.
- Before running a Build in TFS/VSTS, manually check the InstallPortal.ps1 parameters against the previous version. Update files if necessary.
- The TFS Build definition publishes the files as an artifact. No need to create a new build if the parameters have not changed.
- The Release definition copies the artifact to the target servers (defined in a variable group) and runs the deploy.ps1 script with the following variables as arguments; deployEnvironment (the only environment-level variable), appPoolUser, appPoolPassword, cacheUser, cachePassword, analyticsUser, analyticsPassword. You could put all of the config psd1 variables in here, but I found it neater to use the hash tables and just use TFS to store my creds securely.
Whatever account you run the deploy.ps1 as requires temporary sysadmin on the SQL instance, admin permissions in SCSM, and read/write access to the CiresonPortal folder on the filesystem. My DBAs were trying to avoid elevating the account to sysadmin, and we got really close to defining specific permissions but there are some scripts invoked by the provided installation script that require it.The advantages of using TFS to release the updates include: