forked from SoftServeInc/SitecoreInstallExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolr.ps1
53 lines (40 loc) · 1.6 KB
/
solr.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<#
The solr.json config perform the followin tasks:
- if 'UseLocalFiles' is set to false then script will Download JRE and Solr 6.6.2
(check parameters 'JREDownloadUrl' and 'JREInstaller')
- if 'UseLocalFiles' is set to true script will look in LocalStorage for 'JREInstaller' and 'SolrPackage'
- install JRE
- install Solr
- create certificates for domain 'CertificateName'
- setup SSL for Solr
- install Solr as a Windows Service
#>
$LocalStorage = "$PSScriptRoot\Storage"
# Comment out this if you have own solr.json
$GitHubRoot = "https://raw.githubusercontent.com/SoftServeInc/SitecoreInstallExtensions/master/Configuration/"
#for Solr installation
$SolrHost = "solr.local"
$SolrPort = "8983"
# internally in 'solr.json', installation path is build like $SolrInstallFolder\solr-parameter('SolrVersion')
$SolrInstallFolder = "C:\solr"
$SolrService = "PSSolrService"
Invoke-WebRequest -Uri "$GitHubRoot/Solr.json" -OutFile "$PSScriptRoot\Solr.json"
$installSolr =@{
Path = "$PSScriptRoot\Solr.json"
LocalStorage = "$LocalStorage"
SolrHost = $SolrHost
SolrPort = $SolrPort
SolrServiceName = $SolrService
InstallFolder = $SolrInstallFolder
# For SSL certificate generation
CertPassword = "secret"
CertStoreLocation = "Cert:\LocalMachine\My"
CertificateName = $SolrHost
# For SSL certificate export
Property = "Subject"
Value = "CN=$SolrHost"
# if you want to download JRE and Solr check JREDownloadUrl and SolrDownloadUrl in solr.json
# and switch to $false
UseLocalFiles = $false
}
Install-SitecoreConfiguration @installSolr -Verbose