-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e0e497
commit 4f2bb58
Showing
4 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[config] | ||
command = powershell -NoProfile -NoLogo -ExecutionPolicy Unrestricted -Command "& "$pwd\Deploy-SolrAzureAppService.ps1 %solrVersion%" 2>&1 | echo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Param( | ||
$solrVersion | ||
) | ||
|
||
$solrName = "solr-$solrVersion" | ||
|
||
Write-Output 'Copy wwwroot folder' | ||
xcopy wwwroot ..\wwwroot /Y | ||
|
||
Write-Output 'Setting Security to TLS 1.2' | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
Write-Output 'Prevent the progress meter from trying to access the console' | ||
$global:progressPreference = 'SilentlyContinue' | ||
|
||
Write-Output 'Downloading Solr $solrVersion' | ||
$downloadSource = "https://archive.apache.org/dist/lucene/solr/$solrVersion/$solrName.zip" | ||
Start-BitsTransfer -Source $downloadSource -Destination \wwwroot\solr.zip | ||
Expand-Archive \wwwroot\solr.zip -DestinationPath \wwwroot\$solrName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Solr-AzureAppService | ||
# Solr-AzureAppService | ||
|
||
[](https://azuredeploy.net/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"hostingPlanName": { | ||
"type": "string", | ||
"minLength": 1, | ||
"defaultValue": "SolrAppServicePlan" | ||
}, | ||
"siteLocation": { | ||
"type": "string", | ||
"defaultValue": "East US 2" | ||
}, | ||
"siteName": { | ||
"type": "string", | ||
"defaultValue": "SolrAppService" | ||
}, | ||
"solrVersion": { | ||
"type": "string", | ||
"defaultValue": "6.6.2" | ||
}, | ||
"skuName": { | ||
"defaultValue": "S1", | ||
"allowedValues": [ | ||
"B1", | ||
"B2", | ||
"B3", | ||
"S1", | ||
"S2", | ||
"S3", | ||
"P1", | ||
"P2", | ||
"P3", | ||
"P4" | ||
], | ||
"type": "string" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2016-09-01", | ||
"name": "[parameters('hostingPlanName')]", | ||
"type": "Microsoft.Web/serverfarms", | ||
"location": "[parameters('siteLocation')]", | ||
"sku": { | ||
"name": "[parameters('skuName')]" | ||
}, | ||
"properties": { | ||
"name": "[parameters('hostingPlanName')]" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2016-08-01", | ||
"name": "[parameters('siteName')]", | ||
"type": "Microsoft.Web/sites", | ||
"location": "[parameters('siteLocation')]", | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" | ||
], | ||
"properties": { | ||
"name": "[parameters('siteName')]", | ||
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]", | ||
"clientAffinityEnabled": false | ||
}, | ||
"resources": [ | ||
{ | ||
"name": "web", | ||
"type": "config", | ||
"apiVersion": "2016-08-01", | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]" | ||
], | ||
"properties": { | ||
"alwaysOn": true, | ||
"javaVersion": "11", | ||
"javaContainer": "TOMCAT", | ||
"javaContainerVersion": "9.0", | ||
"solrVersion": "[parameters('solrVersion')]" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |