SolrServer.json
{
"Parameters": { "SolrVersion": { "Type": "string", "DefaultValue": "7.2.1", "Description": "What version of Solr should be downloaded for install" }, "NSSMVersion": { "Type": "string", "DefaultValue": "2.24", "Description": "What version of NSSM should be downloaded for install" }, "InstallFolder": { "Type": "string", "DefaultValue": "c:\\solr", "Description": "Where should Solr and NSSM be installed to" }, "NSSMDownloadBase": { "Type": "string", "DefaultValue": "https://nssm.cc/release", "Description": "Where should NSSM be downloaded from" }, "DownloadFolder": { "Type": "string", "DefaultValue": "~\\Downloads", "Description": "Where should downloaded files be placed" }, "SolrHost": { "Type": "string", "DefaultValue": "solr", "Description": "What host name should the Solr service use" }, "SolrPort": { "Type": "string", "DefaultValue": "8983", "Description": "The port the Solr service should use" } }, "Modules": [ ".\\SolrServer.psm1" ], "Variables": { "Root.Cert.Store": "Cert:\\LocalMachine\\Root", "Client.Cert.Store": "Cert:\\LocalMachine\\My", "NSSMSourcePackage": "[concat(parameter('NSSMDownloadBase'), '/nssm-', parameter('NSSMVersion'), '.zip')]", "SolrSourcePackage": "[concat('https://archive.apache.org/dist/lucene/solr/', parameter('SolrVersion'), '/solr-', parameter('SolrVersion'), '.zip')]", "SolrInstallFolder": "[concat(parameter('InstallFolder'), '\\solr-', parameter('SolrVersion'))]", "SolrName": "[concat('solr-', parameter('SolrVersion'))]", "CertStoreFolder": "[concat(variable('SolrInstallFolder'), '\\server\\etc')]", "CertStoreFile": "[concat(variable('CertStoreFolder'), '\\', parameter('SolrHost'), '.pfx')]", "Secure.Password": "[ConvertToSecureString('secret',AsPlainText:true,Force:true)]" }, "Register": { "ConfigFunction": { "ConvertToSecureString": "ConvertTo-SecureString" } }, "Tasks": { "Ensure NSSM is installed": { "Type": "EnsureNSSM", "Params": { "downloadFolder": "[parameter('DownloadFolder')]", "nssmVersion": "[parameter('NSSMVersion')]", "installFolder": "[parameter('InstallFolder')]", "nssmSourcePackage": "[variable('NSSMSourcePackage')]" } }, "Ensure Solr is installed": { "Type": "EnsureSolr", "Params": { "downloadFolder": "[parameter('DownloadFolder')]", "solrVersion": "[parameter('SolrVersion')]", "installFolder": "[parameter('InstallFolder')]", "solrSourcePackage": "[variable('SolrSourcePackage')]" } }, "CreateHostHeader": { "Description": "Sets a hostheader for Solr", "Type": "HostHeader", "Params": { "HostName": "[parameter('SolrHost')]" } }, "Rewrite Solr config file": { "Type": "ConfigureSolr", "Params": { "solrHost": "[parameter('SolrHost')]", "solrRoot": "[variable('SolrInstallFolder')]", "certificateStore": "[variable('CertStoreFile')]" } }, "CreateRootCert": { "Description": "Create the root certificate.", "Type": "NewRootCertificate", "Params": { "Path": "[variable('CertStoreFolder')]", "Name": "[parameter('SolrHost')]", "DnsName": [ "[parameter('SolrHost')]", "127.0.0.1" ], "IncludePrivateKey": true, "Password": "[variable('Secure.Password')]" } }, "CreateSignedCert": { "Description": "Create a certificate signed by the root authority.", "Type": "NewSignedCertificate", "Params": { "Signer": "[GetCertificate(parameter('SolrHost'), variable('Root.Cert.Store'))]", "Path": "[variable('CertStoreFolder')]", "CertStoreLocation": "[variable('Client.Cert.Store')]", "Name": "[parameter('SolrHost')]", "DnsName": [ "[parameter('SolrHost')]", "127.0.0.1" ], "IncludePrivateKey": true, "Password": "[variable('Secure.Password')]" } }, "Ensure Solr runs as a service": { "Type": "EnsureSolrService", "Params": { "solrName": "[variable('SolrName')]", "installFolder": "[parameter('InstallFolder')]", "nssmVersion": "[parameter('NSSMVersion')]", "solrRoot": "[variable('SolrInstallFolder')]", "solrPort": "[parameter('SolrPort')]" } } } } |