Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform an unattended installation of Sitecore?

My team is attempting to perform an automated installation of Sitecore via Salt using the Sitecore executable. We prefer to use the .exe over a manual installation of the zip package because the installation wizard handles registering Sitecore as an installed program by modifying the registry. This would theoretically let Salt know that the "state" has been fulfilled.

When running the executable with the /? argument, the following list of options is displayed:

/? or /help : this help screen
/i : install (default)
/x : uninstall
/q : force silent (no UI) mode
/qb : force basic UI mode
/nq : force full UI mode
/nosplash : do not display splash screen
/Log : enable logging
/LogFile [path] : specify log file
/ConfigFile [path] : specify configuration file
/ExtractCab : extract embedded components
/DisplayCab : display a list of embedded components
/DisplayConfig : display a list of configurations
/ComponentArgs ["id|display_name":"value"...] : additional component args
/ControlArgs ["id":"value" ...] : additional control values
/CompleteCommandArgs [args] : additional complete command 

Despite our best efforts, we are unable to find documentation on these arguments apart from the descriptions above. I think what we're after is a way to provide a config file to the executable (using the /ConfigFile argument) that contains the following information:

  • Install / uninstall
  • Installation type (full / client-only)
  • Instance name
  • Database credentials

Running the /DisplayConfig command only displays language options and that's about it.

Does anyone know how to provide a config to the executable and/or pass it the arguments it needs?

like image 850
Derek Hunziker Avatar asked Dec 20 '22 14:12

Derek Hunziker


2 Answers

I wrote a blog post about the issue of getting the Sitecore installer automated:

http://jermdavis.wordpress.com/2014/04/24/unattended-installs-of-sitecore/

I think that might help you?

like image 70
JermDavis Avatar answered Dec 27 '22 05:12

JermDavis


For anyone else who needs an answer to this, this is how me and Derek got it to work:

../salt-states/win/repo/sitecore/init.sls

Sitecore:
  7.1:
    installer: 'salt://win/repo/sitecore/Sitecore 7.1 rev. 130926.exe'
    full_name: 'Sitecore 7.1 rev. 130926 - Sitecore130926'
    reboot: False
    install_flags: ' /q /ExtractCab && msiexec.exe /qn /i SupportFiles\exe\Sitecore.msi TRANSFORMS=":InstanceId1;:ComponentGUIDTransform1.mst" MSINEWINSTANCE=1 LOGVERBOSE=1 SC_LANG="en-US" SC_CLIENTONLY="1" SKIPINSTALLSQLDATA="1" SKIPUNINSTALLSQLDATA="1" SC_INSTANCENAME="Sitecore130926" SC_LICENSE_PATH="C:\inetpub\temp\sitecore_license.xml" SC_SQL_SERVER="SERVER" SC_DBPREFIX="Sitecore130926" SC_DBTYPE="MSSQL" INSTALLLOCATION="C:\Inetpub\wwwroot\Sitecore130926" SC_DATA_FOLDER="C:\Inetpub\wwwroot\Sitecore130926\Data" SC_NET_VERSION="4" SITECORE_MVC="1" SC_INTEGRATED_PIPELINE_MODE="1" SC_IISSITE_NAME="Sitecore130926" SC_IISAPPPOOL_NAME="Sitecore130926AppPool" SC_IISSITE_HEADER="local.domain.org" SC_IISSITE_PORT="80" SC_IISSITE_ID="2" SC_PREFIX_PHYSICAL_FILES="1" SC_SQL_SERVER_CONFIG_USER="USER" SC_SQL_SERVER_CONFIG_PASSWORD="PASSWORD" /l*+v "C:\inetpub\temp\SitecoreInstaller.log"'
    uninstaller: 'salt://win/repo/sitecore/Sitecore 7.1 rev. 130926.exe'
    uninstall_flags: ' /q /ExtractCab && msiexec.exe /qn /X{D0CB9951-0EC0-55B1-A2C8-4590B816E4EC}'

../salt-states/sitecore/init.sls

Sitecore:
  pkg.installed:
    - refresh: true
    - require:
      - file: C:\inetpub\temp\sitecore_license.xml

C:\inetpub\temp\sitecore_license.xml:
  file.managed:
  - source: salt://sitecore/license.xml

Add your sitecore license to ../salt-states/sitecore/license.xml

Thanks to JermDavis, this wasn't possible without your blog post!

like image 29
Steven Jackson Avatar answered Dec 27 '22 07:12

Steven Jackson