GithubHelp home page GithubHelp logo

patrickperrone / sitecore-powershell-installer Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 16.0 357 KB

A PowerShell script to install Production-grade Sitecore instances. Capable of installing a variety of server roles.

License: MIT License

PowerShell 100.00%
sitecore

sitecore-powershell-installer's People

Contributors

altearius avatar arkefred avatar fredhuffman avatar patrickperrone avatar torrentx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sitecore-powershell-installer's Issues

Only sanity check SQL connection etc. if necessary

If the user has set elected to skip installing SQL databases then do not worry about:

  • testing for a SQL connection
  • validating the UNC path
  • any other SQL specific parameters or tests that are strictly necessary for installing databases

checking for sqlps module when db install is not selected

There are a lot of functions, but I couldn't find a reason why you should fail the pre-req check if sqlps module is not installed. ie) I am installing a CD node, but disabled the DB section of the install config.

Warning: SQL PowerShell Module (SQLPS) is not installed.
Please satisfy pre-requisites and try again.
Aborting install: No action taken.

Option to disable all database operations

This is useful if you wish if some other process must oversee installing and configuring Sitecore's SQL databases. Disabling database operations means the script will run without needing to connect to the SQL server.

Sanity check required files

The script does not test for the existence of the Sitecore .zip file or the license file prior to performing work.

iis bindings check fails if 1 binding is left in the install config

consider the following: I am using a load balancer and using * in my iis bindings. The pre-req check reports a failure of having no binding when there is one.
IISBindings should provide at least one Binding.
A bad configuration setting was found.
Aborting install: No action taken.

to repo, use the following


Validate prerequisites

First step of script should validate that pre-requisites modules are available:

  • SQLPS
  • WebAdministration

Incorrect line endings in hosts file

Observed the install script producing this output in the hosts file:

22a15d19-977e-4c04-a604-aff1c274e0ec

The duplicate line is there because I ran the installer twice, so I'm not worried about the duplication, only concerned about the line ending mismatch.

I confirmed that windows was confused by the line endings here, even after ipconfig /flushdns. Once I manually corrected the line endings, the domain would resolve as expected.

Remove usage of Write-Host

Some clients install the script in a mode that cannot output to a host console. This causes the script to throw an exception.

Hardening SQL

In a production SQL landscape, best practice is to have log files on a separate physical drive. Having the ability to specify a different location for log files would be useful.

Script fails if no Unc path is specified

Using the version at #
a5167be and running on a laptop with Windows 8.1 and Sql Server 2016. The script throws an error in the Test-ScriptPermissionForPath function if there is no Unc path specified in the DatabaseInstallPath element in the config file.

This line fails because the $computer variable is null:
$sharedSecurity = Get-WMIObject -Class Win32_LogicalShareSecuritySetting -Filter "name='$share'" -ComputerName $computer

install.zip

Support IP bindings in IIS

Add support for binding to multiple IPs in IIS, binding to multiple host headers, and specifying the ports of those bindings.

SQL file permission check

If the SQL server is a separate server from Sitecore and the targeted SQL instance is using a virtual service account, then the permission inside the function Confirm-SqlInstallPath will fail because it cannot resolve the identity to a friendly name. This is because the virtual service account is a local account on different machine than the server that is running the script.

Leaving SqlLoginForDataAccess but using a domain account throws an error

The SqlLoginForInstall is a domain account and SqlLoginForDataAccess

is undefined. You must supply a value for SqlLoginForDataAccess.
The specified combination of accounts will not produce a valid SQL login for data access.
Aborting install: config.xml file has a bad setting.

I tried leaving sqlloginfordataaccess empty or with a domain account ie) domain\user while UseWindowsAuthenticationForSqlDataAccess is set to true
http://pastebin.com/QKD6EdPT my config

SQL login for Install must be sysadmin

I thought that dbcreator and securityadmin would grant me enough permission for all database operations, but it doesn't. The script will fail assigning user mappings if the login used by SQL during the install doesn't have the sysadmin role.

ApplicationPoolIdentity username bug

When using the builtin ApplicationPoolIdentity account, the script fails to set the correct username

i.e. "IIS AppPool"

This is because of some bad assumptions/tests in code on lines 963, 1570, and 1607

Database Folder Creation Has Potential Bugs

I need to require that the database install path exist and that it have the proper ACLs for the SQL instance to be used. My old logic of creating the install folder for SQL on a given root path is too brittle. Even if the account running the script can write files to the path, there is no guarantee SQL will have enough permission to attach the databases. Furthermore, checking if the destination folder exists as a way to decide if the files have already been installed is also error-prone.

Error Setting ACLs for ApplicationPoolIdentity

When the builtin ApplicationPoolIdentity account is chosen for the app pool, the script will fail to correctly set ACLs for the app pool identity. This is because the literal string "ApplicationPoolIdentity" is being passed to the Set-AclForFolder function rather than the correct value:

"IIS APPPOOL"

UNC path Cannot Be Used for Database Attach

The local path on the SQL server to database files (.mdf and .ldf) must be used in the Attach-SitecoreDatabase function. This problem manifests itself when trying to run the script in a scaled environment where the SQL server is a separate machine from the Sitecore server.

update incorrect wording on pre-req check

56 $moduleName = "SQLPS"
57 if (!(Test-Module $moduleName))
58 {
59 Write-Host "Warning: IIS PowerShell Module ($moduleName) is not installed." -ForegroundColor Red
60 return $FALSE
61 }

You are checking for the sql powershell module, but returning iis powershell module if it is not found. Won't break the script, but user might be confused if they do not have sqlps installed.

When using the script in DSC the database files do not get copied

When running the script as a step in DSC, the code in Copy-DatabaseFiles, does not seem to be working.

Output of $childItem.Name displays the filename without extensions. This throws off the code and does not end up creating copies of the web database, nor renaming the analytics db to reporting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.