Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrappelepam committed Jul 16, 2019
1 parent 2e0e497 commit 4f2bb58
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .deployment
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"
18 changes: 18 additions & 0 deletions Deploy-SolrAzureAppService.ps1
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Solr-AzureAppService
# Solr-AzureAppService

[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)
84 changes: 84 additions & 0 deletions azuredeploy.json
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')]"
}
}
]
}
]
}

0 comments on commit 4f2bb58

Please sign in to comment.