From 027ac0510cb8f405f6e4c7e374074189403c673f Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 09:22:25 -0600 Subject: [PATCH 01/53] Changed the ResourceGroup name and the location of the templates. --- .../EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 | 2 +- .../EventStoreCluster/Templates/azuredeploy.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 index 366bd26..38f94fe 100644 --- a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 +++ b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 @@ -2,7 +2,7 @@ Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, - [string] $ResourceGroupName = 'EventStoreCluster', + [string] $ResourceGroupName = 'EventStoreClusterTake1', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccountResourceGroupName, diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 134f5c4..7df9107 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -132,7 +132,7 @@ } }, "variables": { - "templateBaseUrl": "https://raw.githubusercontent.com/pbolduc/EventStore-DevOps/master/azure-resource-manager/EventStoreCluster/Templates/", + "templateBaseUrl": "https://raw.githubusercontent.com/agconnections/EventStore-DevOps/master/azure-resource-manager/EventStoreCluster/Templates/", "locationMap": { "ResourceGroup": "[resourceGroup().location]", "West US": "[parameters('location')]", From 35e162f02de04a2b06632d0cdd6627d356d3f9e1 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 10:09:58 -0600 Subject: [PATCH 02/53] copyIndex updates --- .../Scripts/Deploy-AzureResourceGroup.ps1 | 21 +++--- .../Templates/azuredeploy.json | 13 +++- .../cluster-nodes-0disk-resources.json | 30 +++++--- .../cluster-nodes-16disk-resources.json | 70 +++++++++++-------- .../cluster-nodes-2disk-resources.json | 42 +++++++---- .../cluster-nodes-4disk-resources.json | 46 +++++++----- .../cluster-nodes-8disk-resources.json | 54 ++++++++------ 7 files changed, 176 insertions(+), 100 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 index 38f94fe..c4ad19e 100644 --- a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 +++ b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 @@ -14,7 +14,7 @@ Param( [string] $DSCSourceFolder = '..\DSC' ) -if (Get-Module -ListAvailable | Where-Object { $_.Name -eq 'AzureResourceManager' -and $_.Version -ge '0.9.9' }) { +if (Get-Module -ListAvailable | Where-Object { $_.Name -eq 'AzureResourceManager' -and $_.Version -ge '1.5.1' }) { Throw "The version of the Azure PowerShell cmdlets installed on this machine are not compatible with this script. For help updating this script visit: http://go.microsoft.com/fwlink/?LinkID=623011" } @@ -63,11 +63,11 @@ if ($UploadArtifacts) } if ($StorageAccountResourceGroupName) { - Switch-AzureMode AzureResourceManager + # Switch-AzureMode AzureResourceManager $StorageAccountKey = (Get-AzureStorageAccountKey -ResourceGroupName $StorageAccountResourceGroupName -Name $StorageAccountName).Key1 } else { - Switch-AzureMode AzureServiceManagement + # Switch-AzureMode AzureServiceManagement $StorageAccountKey = (Get-AzureStorageKey -StorageAccountName $StorageAccountName).Primary } @@ -102,10 +102,11 @@ if ($UploadArtifacts) } # Create or update the resource group using the specified template file and template parameters file -Switch-AzureMode AzureResourceManager -New-AzureResourceGroup -Name $ResourceGroupName ` - -Location $ResourceGroupLocation ` - -TemplateFile $TemplateFile ` - -TemplateParameterFile $TemplateParametersFile ` - @OptionalParameters ` - -Force -Verbose +# Switch-AzureMode AzureResourceManager +Login-AzureRmAccount +New-AzureRmResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation +New-AzureRmResourceGroupDeployment -ResourceGroupName $ResourceGroupName ` + -TemplateFile $TemplateFile ` + -TemplateParameterFile $TemplateParametersFile ` + @OptionalParameters ` + -Force -Verbose diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 7df9107..db03837 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -179,14 +179,23 @@ }, "managementPort": "3389", "extentionSettings": { - "eventstore": { + "createdatadisks": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.4", "settings": { - "fileUris": "[variables('windowsScripts')]", + "fileUris": [ "[concat(variables('templateBaseUrl'), 'create-data-disks.ps1')]" ], "commandToExecute": "powershell.exe -File create-data-disks.ps1" } + }, + "eventstore": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.4", + "settings": { + "fileUris": [ "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]" ], + "commandToExecute": "powershell.exe -File install-eventstore.ps1" + } } } }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json index 06ca84c..39ae598 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json @@ -75,7 +75,7 @@ "resources": [ { "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountName'), copyindex(1))]", + "name": "[concat(variables('storageAccountName'), copyIndex(1))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "copy": { @@ -99,7 +99,7 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('namespace'), 'nic', copyindex())]", + "name": "[concat(parameters('namespace'), 'nic', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'),'nicLoop')]", @@ -122,15 +122,15 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('namespace'), 'vm', copyindex())]", + "name": "[concat(parameters('namespace'), 'vm', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), 'nic', copyindex())]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()])]" + "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), 'nic', copyIndex())]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()])]" ], "properties": { "availabilitySet": { @@ -149,7 +149,7 @@ "osDisk": { "name": "osdisk", "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()], '.blob.core.windows.net/vhd/', variables('vmName'), copyindex(), '-osdisk.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()], '.blob.core.windows.net/vhd/', variables('vmName'), copyIndex(), '-osdisk.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" @@ -158,7 +158,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'nic', copyindex()))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'nic', copyIndex()))]" } ] } @@ -166,11 +166,21 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'vm', copyindex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), 'vm', copyindex())]" + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" + ], + "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json index 39b3250..93cdc07 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json @@ -75,7 +75,7 @@ "resources": [ { "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountName'), copyindex(1))]", + "name": "[concat(variables('storageAccountName'), copyIndex(1))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "copy": { @@ -99,8 +99,12 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(parameters('namespace'), '-pip-', copyindex())]", + "name": "[concat(parameters('namespace'), '-pip-', copyIndex())]", "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('namespace'),'pipLoop')]", + "count": "[parameters('vmCount')]" + }, "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -108,21 +112,21 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('namespace'), '-nic-', copyindex())]", + "name": "[concat(parameters('namespace'), '-nic-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'),'nicLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyindex())]" + "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]" ], "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { - "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyindex())))]", + "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyIndex())))]", "privateIPAllocationMethod": "Static", "subnet": { "id": "[variables('subnetRef')]" @@ -135,15 +139,15 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('namespace'), '-vm-', copyindex())]", + "name": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyindex())]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()])]" + "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyIndex())]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()])]" ], "properties": { "availabilitySet": { @@ -162,7 +166,7 @@ "osDisk": { "name": "osdisk", "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyindex(), '-osdisk.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyIndex(), '-osdisk.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" @@ -173,7 +177,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 0, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk1' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk1' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -183,7 +187,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 1, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk2' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk2' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -193,7 +197,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 2, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk3' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk3' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -203,7 +207,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 3, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk4' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk4' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -213,7 +217,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 4, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk5' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk5' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -223,7 +227,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 5, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk6' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk6' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -233,7 +237,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 6, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk7' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk7' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -243,7 +247,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 7, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk8' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk8' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -253,7 +257,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 8, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk9' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk9' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -263,7 +267,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 9, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk10' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk10' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -273,7 +277,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 10, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk11' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk11' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -283,7 +287,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 11, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk12' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk12' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -293,7 +297,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 12, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk13' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk13' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -303,7 +307,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 13, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk14' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk14' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -313,7 +317,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 14, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk15' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk15' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -323,7 +327,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 15, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk16' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk16' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -333,7 +337,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyindex()))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyIndex()))]" } ] } @@ -341,11 +345,21 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyindex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" + ], + "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyindex())]" + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json index cb99084..a8b74fc 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json @@ -75,7 +75,7 @@ "resources": [ { "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountName'), copyindex(1))]", + "name": "[concat(variables('storageAccountName'), copyIndex(1))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "copy": { @@ -99,8 +99,12 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(parameters('namespace'), '-pip-', copyindex())]", + "name": "[concat(parameters('namespace'), '-pip-', copyIndex())]", "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('namespace'),'pipLoop')]", + "count": "[parameters('vmCount')]" + }, "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -108,21 +112,21 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('namespace'), '-nic-', copyindex())]", + "name": "[concat(parameters('namespace'), '-nic-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'),'nicLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyindex())]" + "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]" ], "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { - "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyindex())))]", + "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyIndex())))]", "privateIPAllocationMethod": "Static", "subnet": { "id": "[variables('subnetRef')]" @@ -135,15 +139,15 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('namespace'), '-vm-', copyindex())]", + "name": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyindex())]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()])]" + "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyIndex())]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()])]" ], "properties": { "availabilitySet": { @@ -162,7 +166,7 @@ "osDisk": { "name": "osdisk", "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyindex(), '-osdisk.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyIndex(), '-osdisk.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" @@ -173,7 +177,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 0, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk1' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk1' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -183,7 +187,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 1, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk2' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk2' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -193,7 +197,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyindex()))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyIndex()))]" } ] } @@ -201,11 +205,21 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyindex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" + ], + "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyindex())]" + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index 8bf7548..0575fde 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -75,7 +75,7 @@ "resources": [ { "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountName'), copyindex(1))]", + "name": "[concat(variables('storageAccountName'), copyIndex(1))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "copy": { @@ -99,8 +99,12 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(parameters('namespace'), '-pip-', copyindex())]", + "name": "[concat(parameters('namespace'), '-pip-', copyIndex())]", "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('namespace'),'pipLoop')]", + "count": "[parameters('vmCount')]" + }, "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -108,21 +112,21 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('namespace'), '-nic-', copyindex())]", + "name": "[concat(parameters('namespace'), '-nic-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'),'nicLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyindex())]" + "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]" ], "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { - "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyindex())))]", + "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyIndex())))]", "privateIPAllocationMethod": "Static", "subnet": { "id": "[variables('subnetRef')]" @@ -135,15 +139,15 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('namespace'), '-vm-', copyindex())]", + "name": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyindex())]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()])]" + "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyIndex())]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()])]" ], "properties": { "availabilitySet": { @@ -162,7 +166,7 @@ "osDisk": { "name": "osdisk", "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyindex(), '-osdisk.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyIndex(), '-osdisk.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" @@ -173,7 +177,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 0, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk1' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk1' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -183,7 +187,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 1, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk2' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk2' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -193,7 +197,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 2, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk3' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk3' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -203,7 +207,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 3, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk4' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk4' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -213,7 +217,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyindex()))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyIndex()))]" } ] } @@ -221,11 +225,21 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyindex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" + ], + "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyindex())]" + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json index f8ebf91..529d6de 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json @@ -75,7 +75,7 @@ "resources": [ { "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountName'), copyindex(1))]", + "name": "[concat(variables('storageAccountName'), copyIndex(1))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "copy": { @@ -99,8 +99,12 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(parameters('namespace'), '-pip-', copyindex())]", + "name": "[concat(parameters('namespace'), '-pip-', copyIndex())]", "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('namespace'),'pipLoop')]", + "count": "[parameters('vmCount')]" + }, "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -108,21 +112,21 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('namespace'), '-nic-', copyindex())]", + "name": "[concat(parameters('namespace'), '-nic-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'),'nicLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyindex())]" + "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]" ], "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { - "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyindex())))]", + "privateIPAddress": "[concat(parameters('subnet').networkPrefix, '.', string(add(4,copyIndex())))]", "privateIPAllocationMethod": "Static", "subnet": { "id": "[variables('subnetRef')]" @@ -135,15 +139,15 @@ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('namespace'), '-vm-', copyindex())]", + "name": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" }, "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyindex())]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()])]" + "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), '-nic-', copyIndex())]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()])]" ], "properties": { "availabilitySet": { @@ -162,7 +166,7 @@ "osDisk": { "name": "osdisk", "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyindex(), '-osdisk.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()], '.blob.core.windows.net/vhds/', variables('vmName'), '-vm-', copyIndex(), '-osdisk.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" @@ -173,7 +177,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 0, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk1' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk1' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -183,7 +187,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 1, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk2' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk2' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -193,7 +197,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 2, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk3' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk3' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -203,7 +207,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 3, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk4' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk4' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -213,7 +217,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 4, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk5' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk5' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -223,7 +227,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 5, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk6' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk6' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -233,7 +237,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 6, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk7' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk7' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -243,7 +247,7 @@ "diskSizeGB": "[parameters('dataDiskSize')]", "lun": 7, "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyindex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyindex(),'dataDisk8' ,'.vhd')]" + "uri": "[concat('http://', variables('storageAccountName'), parameters('storageSettings').mapping[copyIndex()],'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', parameters('namespace'),'-vm-', copyIndex(),'dataDisk8' ,'.vhd')]" }, "caching": "None", "createOption": "Empty" @@ -253,7 +257,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyindex()))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('namespace'),'-nic-', copyIndex()))]" } ] } @@ -261,11 +265,21 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyindex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" + ], + "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyindex())]" + "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } From 6c8285f096c95e58796a051ee4b87e9cff245d93 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 10:31:50 -0600 Subject: [PATCH 03/53] went back to a single custom script extension --- .../EventStoreCluster/EventStoreCluster.deployproj | 1 + .../EventStoreCluster/Templates/azuredeploy.json | 13 ++----------- .../Templates/cluster-nodes-0disk-resources.json | 10 ---------- .../Templates/cluster-nodes-16disk-resources.json | 10 ---------- .../Templates/cluster-nodes-2disk-resources.json | 10 ---------- .../Templates/cluster-nodes-4disk-resources.json | 10 ---------- .../Templates/cluster-nodes-8disk-resources.json | 10 ---------- .../EventStoreCluster/Templates/master.ps1 | 5 +++++ 8 files changed, 8 insertions(+), 61 deletions(-) create mode 100644 azure-resource-manager/EventStoreCluster/Templates/master.ps1 diff --git a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj index 507a771..b105d91 100644 --- a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj +++ b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj @@ -47,6 +47,7 @@ + False diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index db03837..fa0f3cc 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -179,22 +179,13 @@ }, "managementPort": "3389", "extentionSettings": { - "createdatadisks": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.4", - "settings": { - "fileUris": [ "[concat(variables('templateBaseUrl'), 'create-data-disks.ps1')]" ], - "commandToExecute": "powershell.exe -File create-data-disks.ps1" - } - }, "eventstore": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.4", "settings": { - "fileUris": [ "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]" ], - "commandToExecute": "powershell.exe -File install-eventstore.ps1" + "fileUris": "[variables('windowsScripts')]", + "commandToExecute": "powershell.exe -File master.ps1" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json index 39ae598..7e2b351 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json @@ -172,16 +172,6 @@ "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], - "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" - ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } ] diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json index 93cdc07..dfc2d60 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json @@ -351,16 +351,6 @@ "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], - "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" - ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } ] diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json index a8b74fc..3dcb114 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json @@ -211,16 +211,6 @@ "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], - "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" - ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } ] diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index 0575fde..3ce6cec 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -231,16 +231,6 @@ "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], - "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" - ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } ] diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json index 529d6de..09d4fa8 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json @@ -271,16 +271,6 @@ "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" ], - "properties": "[parameters('osSettings').extentionSettings.createdatadisks]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installeventstore')]", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), '-vm-', copyIndex())]" - ], "properties": "[parameters('osSettings').extentionSettings.eventstore]" } ] diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 new file mode 100644 index 0000000..e67ab15 --- /dev/null +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -0,0 +1,5 @@ +# +# master.ps1 +# +& '..\create-data-disks.ps1' +& '..\install-eventstore.ps1' \ No newline at end of file From 89b8a65daebcdffb874cc94e2be9e606ebbcb080 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 11:01:28 -0600 Subject: [PATCH 04/53] taking out the event store install momentarily... --- azure-resource-manager/EventStoreCluster/Templates/master.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index e67ab15..8600cc7 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -2,4 +2,4 @@ # master.ps1 # & '..\create-data-disks.ps1' -& '..\install-eventstore.ps1' \ No newline at end of file +# & '..\install-eventstore.ps1' \ No newline at end of file From 2322eaa012d47633b975c72971d33c243afb1e90 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 11:15:08 -0600 Subject: [PATCH 05/53] pulled down master.ps1 --- .../EventStoreCluster/Templates/azuredeploy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index fa0f3cc..bd16869 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -167,6 +167,7 @@ "jumpboxTemplateNo": "empty-resources.json", "jumpboxTemplateUrl": "[concat(variables('templateBaseUrl'), variables(concat('jumpboxTemplate',parameters('jumpbox'))))]", "windowsScripts": [ + "[concat(variables('templateBaseUrl'), 'master.ps1')]", "[concat(variables('templateBaseUrl'), 'create-data-disks.ps1')]", "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]" ], From e66f8d100c5e2d652f080d081b035b574c31a2cc Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 11:27:02 -0600 Subject: [PATCH 06/53] brought back install-eventstore --- azure-resource-manager/EventStoreCluster/Templates/master.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 8600cc7..e67ab15 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -2,4 +2,4 @@ # master.ps1 # & '..\create-data-disks.ps1' -# & '..\install-eventstore.ps1' \ No newline at end of file +& '..\install-eventstore.ps1' \ No newline at end of file From ffc601ad19241a5257003dd777514fc70763c2c8 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 13:27:55 -0600 Subject: [PATCH 07/53] Still working on updates to 1.5.1 --- .../EventStoreCluster/Templates/azuredeploy.json | 2 +- .../EventStoreCluster/Templates/azuredeploy.param.dev.json | 2 +- .../Templates/cluster-nodes-0disk-resources.json | 2 +- .../Templates/cluster-nodes-16disk-resources.json | 2 +- .../Templates/cluster-nodes-2disk-resources.json | 2 +- .../Templates/cluster-nodes-4disk-resources.json | 2 +- .../Templates/cluster-nodes-8disk-resources.json | 2 +- .../EventStoreCluster/Templates/jumpbox-resources.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index bd16869..40915fe 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -186,7 +186,7 @@ "typeHandlerVersion": "1.4", "settings": { "fileUris": "[variables('windowsScripts')]", - "commandToExecute": "powershell.exe -File master.ps1" + "commandToExecute": "powershell.exe -File create-data-disks.ps1" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index d674ef4..554c19d 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -12,7 +12,7 @@ "value": "No" }, "vmEventStoreNodeCount": { - "value": 1 + "value": 3 } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json index 7e2b351..a4ff798 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json @@ -140,7 +140,7 @@ "vmSize": "[parameters('vmSize')]" }, "osProfile": { - "computername": "[concat(parameters('namespace'), 'vm', copyIndex())]", + "computerName": "[concat(parameters('namespace'), 'vm', copyIndex())]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json index dfc2d60..570ccd5 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json @@ -157,7 +157,7 @@ "vmSize": "[parameters('vmSize')]" }, "osProfile": { - "computername": "[concat(parameters('namespace'), '-vm-', copyIndex())]", + "computerName": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json index 3dcb114..11e27d3 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json @@ -157,7 +157,7 @@ "vmSize": "[parameters('vmSize')]" }, "osProfile": { - "computername": "[concat(parameters('namespace'), '-vm-', copyIndex())]", + "computerName": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index 3ce6cec..d8efa25 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -157,7 +157,7 @@ "vmSize": "[parameters('vmSize')]" }, "osProfile": { - "computername": "[concat(parameters('namespace'), '-vm-', copyIndex())]", + "computerName": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json index 09d4fa8..46e5513 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json @@ -157,7 +157,7 @@ "vmSize": "[parameters('vmSize')]" }, "osProfile": { - "computername": "[concat(parameters('namespace'), '-vm-', copyIndex())]", + "computerName": "[concat(parameters('namespace'), '-vm-', copyIndex())]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, diff --git a/azure-resource-manager/EventStoreCluster/Templates/jumpbox-resources.json b/azure-resource-manager/EventStoreCluster/Templates/jumpbox-resources.json index 37596ad..3fc5c24 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/jumpbox-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/jumpbox-resources.json @@ -131,7 +131,7 @@ "vmSize": "[variables('vmSize')]" }, "osProfile": { - "computername": "[variables('vmName')]", + "computerName": "[variables('vmName')]", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, From d6f6c04fffacf246af20d040103284a27950e2b7 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 13:32:38 -0600 Subject: [PATCH 08/53] logging create-data-disks to file --- .../EventStoreCluster/Templates/create-data-disks.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 b/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 index 30d3281..bf57476 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 @@ -2,6 +2,11 @@ # This script will create a stripped data disk with all available disks. # Note: For disks to be added to a pool, they must be at least 4GB in size. # +$ErrorActionPreference="SilentlyContinue" +Stop-Transcript | out-null +$ErrorActionPreference = "Continue" +Start-Transcript -path C:\ps-output.txt -append + Write-Verbose 'Creating Storage Pool' $storagePoolFriendlyName = 'LUN-0' @@ -48,3 +53,5 @@ Format-Volume -DriveLetter F ` -NewFileSystemLabel 'Data' ` -Confirm:$false ` -Force + +Stop-Transcript \ No newline at end of file From 84709c602930177420092af557534c9e6c69e8d8 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 14:57:23 -0600 Subject: [PATCH 09/53] PS Transcript (logging) for ES, master, and creating data disks --- .../EventStoreCluster/Templates/azuredeploy.json | 2 +- .../EventStoreCluster/Templates/create-data-disks.ps1 | 2 +- .../EventStoreCluster/Templates/install-eventstore.ps1 | 6 ++++++ .../EventStoreCluster/Templates/master.ps1 | 10 +++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 40915fe..bd16869 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -186,7 +186,7 @@ "typeHandlerVersion": "1.4", "settings": { "fileUris": "[variables('windowsScripts')]", - "commandToExecute": "powershell.exe -File create-data-disks.ps1" + "commandToExecute": "powershell.exe -File master.ps1" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 b/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 index bf57476..3a58229 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/create-data-disks.ps1 @@ -5,7 +5,7 @@ $ErrorActionPreference="SilentlyContinue" Stop-Transcript | out-null $ErrorActionPreference = "Continue" -Start-Transcript -path C:\ps-output.txt -append +Start-Transcript -path C:\ps-output-createdisks.txt -append -noClobber Write-Verbose 'Creating Storage Pool' diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 7aa6875..41dc330 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -49,6 +49,11 @@ function Download-FileTo($DownloadUrl, $path) { return $outFile } +$ErrorActionPreference="SilentlyContinue" +Stop-Transcript | out-null +$ErrorActionPreference = "Continue" +Start-Transcript -path C:\ps-output-es.txt -append -noClobber + $downloadDirectory = 'D:\download' New-Item $downloadDirectory -ItemType Directory | Out-Null @@ -112,3 +117,4 @@ Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set E Add-Content F:\eventstore\start-service.cmd "net start EventStore" Add-Content F:\eventstore\stop-service.cmd "net stop EventStore" +Stop-Transcript \ No newline at end of file diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index e67ab15..2e4fda1 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -1,5 +1,13 @@ # # master.ps1 # + +$ErrorActionPreference="SilentlyContinue" +Stop-Transcript | out-null +$ErrorActionPreference = "Continue" +Start-Transcript -path C:\ps-output-master.txt -append -noClobber + & '..\create-data-disks.ps1' -& '..\install-eventstore.ps1' \ No newline at end of file +& '..\install-eventstore.ps1' + +Stop-Transcript \ No newline at end of file From eea864af24cf82b796ffbfc34fdb6f15145a285b Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 15 Jul 2016 15:24:16 -0600 Subject: [PATCH 10/53] Changed to double quotes to load the other script files --- azure-resource-manager/EventStoreCluster/Templates/master.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 2e4fda1..ea11dff 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -7,7 +7,7 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-master.txt -append -noClobber -& '..\create-data-disks.ps1' -& '..\install-eventstore.ps1' +& "..\create-data-disks.ps1" +& "..\install-eventstore.ps1" Stop-Transcript \ No newline at end of file From 8ec68e1124fd1114abd8eaaa1c26b08783868978 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Sat, 16 Jul 2016 14:06:46 -0600 Subject: [PATCH 11/53] updated the master script to load child scripts --- azure-resource-manager/EventStoreCluster/Templates/master.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index ea11dff..abeb0b6 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -7,7 +7,7 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-master.txt -append -noClobber -& "..\create-data-disks.ps1" -& "..\install-eventstore.ps1" +. .\create-data-disks.ps1 +. .\install-eventstore.ps1 Stop-Transcript \ No newline at end of file From 8918bba279773e727555fbab6577e73b3adf5706 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Sun, 17 Jul 2016 08:25:35 -0600 Subject: [PATCH 12/53] temp parameters to test event store install --- .../EventStoreCluster/Templates/master.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index abeb0b6..3b123a6 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -8,6 +8,11 @@ $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-master.txt -append -noClobber . .\create-data-disks.ps1 -. .\install-eventstore.ps1 + +# TODO: These parameters should come from the template! +. .\install-eventstore.ps1 -EventStoreVersion "3.8.0" ` + -EventStoreDownloadUrl "http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.0.zip" ` + -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" ` + -ClusterSize 3 Stop-Transcript \ No newline at end of file From 4228dd32aa6378f2b3d51c3ef4488e994af91df4 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 19 Jul 2016 09:43:35 -0600 Subject: [PATCH 13/53] commented ExtIpAdvertiseAs for now --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 41dc330..71245e7 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -106,7 +106,7 @@ Add-Content F:\eventstore\config.yaml "Db: F:\eventstore\data`n" Add-Content F:\eventstore\config.yaml "Log: D:\eventstore\logs`n" Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" -Add-Content F:\eventstore\config.yaml "ExtIpAdvertiseAs: $ExtIpAdvertiseAs`n" +# Add-Content F:\eventstore\config.yaml "ExtIpAdvertiseAs: $ExtIpAdvertiseAs`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" Add-Content F:\eventstore\config.yaml "DiscoverViaDns: false`n" Add-Content F:\eventstore\config.yaml "GossipSeed: 10.0.1.4:$IntHttpPort,10.0.1.5:$IntHttpPort,10.0.1.6:$IntHttpPort`n" From 9781225381e32ac4dd540d21da073d3908459d00 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 19 Jul 2016 10:10:54 -0600 Subject: [PATCH 14/53] added nginx configuration --- .../EventStoreCluster.deployproj | 1 + .../Templates/install-nginx.ps1 | 62 +++++++++++++++++++ .../EventStoreCluster/Templates/master.ps1 | 4 ++ 3 files changed, 67 insertions(+) create mode 100644 azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 diff --git a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj index b105d91..c745b18 100644 --- a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj +++ b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj @@ -47,6 +47,7 @@ + diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 new file mode 100644 index 0000000..e41e1d0 --- /dev/null +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -0,0 +1,62 @@ +# +# install_nginx.ps1 +# +param ( + [string] + $NGinxVersion, + [string] + $nginxZip, + [string] + $nssmDownloadUrl +) + +function Extract-ZipFile($file, $destination) { + if (![System.IO.Directory]::Exists($destination)) { + [System.IO.Directory]::CreateDirectory($destination) + } + + $shell = new-object -com shell.application + $zip = $shell.NameSpace($file) + + foreach($item in $zip.items()) { + $shell.Namespace($destination).copyhere($item) + } +} + +function Download-FileTo($DownloadUrl, $path) { + $uri = [System.Uri]$DownloadUrl + $filename = $uri.Segments[$uri.Segments.Length-1] + $outFile = Join-Path $path -ChildPath $filename + + Invoke-WebRequest $DownloadUrl -OutFile $outFile | Out-Null + return $outFile +} + +$ErrorActionPreference="SilentlyContinue" +Stop-Transcript | out-null +$ErrorActionPreference = "Continue" +Start-Transcript -path C:\ps-output-nginx.txt -append -noClobber + +$downloadDirectory = 'D:\download' +New-Item $downloadDirectory -ItemType Directory | Out-Null + +$nssmZip = Download-FileTo -DownloadUrl $nssmDownloadUrl -Path $downloadDirectory +# NSSM is packed with in a folder already +Extract-ZipFile -File $nssmZip -Destination F:\ + +$nginxZip = Download-FileTo -DownloadUrl $nginxZip -Path $downloadDirectory +Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ + +# +# +# +# $ipAddress = (Resolve-DnsName $env:COMPUTERNAME -Type A).IPAddress + +# TODO: Include reverse proxy 80 to 2113 +Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx.exe" +Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" + +Add-Content F:\nginx\start-service.cmd "net start Nginx" +Add-Content F:\nginx\stop-service.cmd "net stop Nginx" + +Stop-Transcript \ No newline at end of file diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 3b123a6..221fd8a 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -15,4 +15,8 @@ Start-Transcript -path C:\ps-output-master.txt -append -noClobber -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" ` -ClusterSize 3 +. .\install-nginx.ps1 -NGinxVersion "1.10.1" ` + -NGinxDownloadUrl "http://nginx.org/download/nginx-1.10.1.zip" ` + -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" + Stop-Transcript \ No newline at end of file From de8980f95804f00223c3c42371fb27eb09521b7c Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 10:19:41 -0600 Subject: [PATCH 15/53] added install-nginx to the download list --- .../EventStoreCluster/Templates/azuredeploy.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index bd16869..12ddc48 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -169,7 +169,8 @@ "windowsScripts": [ "[concat(variables('templateBaseUrl'), 'master.ps1')]", "[concat(variables('templateBaseUrl'), 'create-data-disks.ps1')]", - "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]" + "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]", + "[concat(variables('templateBaseUrl'), 'install-nginx.ps1')]" ], "windowsSettings": { "imageReference": { From d354588396169727ec60133351e1ef3768132e24 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 10:26:23 -0600 Subject: [PATCH 16/53] fired off install and start scripts --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 3 +++ .../EventStoreCluster/Templates/install-nginx.ps1 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 71245e7..f49f9a1 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -117,4 +117,7 @@ Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set E Add-Content F:\eventstore\start-service.cmd "net start EventStore" Add-Content F:\eventstore\stop-service.cmd "net stop EventStore" +. F:\eventstore\install-service.cmd +. F:\eventstore\start-service.cmd + Stop-Transcript \ No newline at end of file diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index e41e1d0..df38a00 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -59,4 +59,7 @@ Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Add-Content F:\nginx\start-service.cmd "net start Nginx" Add-Content F:\nginx\stop-service.cmd "net stop Nginx" +. F:\nginx\install-service.cmd +. F:\nginx\start-service.cmd + Stop-Transcript \ No newline at end of file From e3d6a81309f866de40e1f4d15774819dc8c2bd40 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 12:02:46 -0600 Subject: [PATCH 17/53] took nssm out of the nginx script --- .../EventStoreCluster/Templates/install-nginx.ps1 | 8 +------- .../EventStoreCluster/Templates/master.ps1 | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index df38a00..426391e 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -5,9 +5,7 @@ param ( [string] $NGinxVersion, [string] - $nginxZip, - [string] - $nssmDownloadUrl + $nginxZip ) function Extract-ZipFile($file, $destination) { @@ -40,10 +38,6 @@ Start-Transcript -path C:\ps-output-nginx.txt -append -noClobber $downloadDirectory = 'D:\download' New-Item $downloadDirectory -ItemType Directory | Out-Null -$nssmZip = Download-FileTo -DownloadUrl $nssmDownloadUrl -Path $downloadDirectory -# NSSM is packed with in a folder already -Extract-ZipFile -File $nssmZip -Destination F:\ - $nginxZip = Download-FileTo -DownloadUrl $nginxZip -Path $downloadDirectory Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 221fd8a..ad9c690 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -16,7 +16,6 @@ Start-Transcript -path C:\ps-output-master.txt -append -noClobber -ClusterSize 3 . .\install-nginx.ps1 -NGinxVersion "1.10.1" ` - -NGinxDownloadUrl "http://nginx.org/download/nginx-1.10.1.zip" ` - -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" + -NGinxDownloadUrl "http://nginx.org/download/nginx-1.10.1.zip" Stop-Transcript \ No newline at end of file From 15538c19300ccb8136d8af95525305ee0dc0b63b Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 12:09:39 -0600 Subject: [PATCH 18/53] dropped creating the download directory --- .../EventStoreCluster/Templates/install-nginx.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index 426391e..f2418c2 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -35,8 +35,8 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-nginx.txt -append -noClobber -$downloadDirectory = 'D:\download' -New-Item $downloadDirectory -ItemType Directory | Out-Null +#$downloadDirectory = 'D:\download' +#New-Item $downloadDirectory -ItemType Directory | Out-Null $nginxZip = Download-FileTo -DownloadUrl $nginxZip -Path $downloadDirectory Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ From 6bc2212a4203db35ab7dccab2a079a9d40ff4fd5 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 13:15:59 -0600 Subject: [PATCH 19/53] repaired small glitches around the nginx path --- .../EventStoreCluster/Templates/install-nginx.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index f2418c2..fd6aa95 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -5,7 +5,7 @@ param ( [string] $NGinxVersion, [string] - $nginxZip + $NGinxDownloadUrl ) function Extract-ZipFile($file, $destination) { @@ -35,10 +35,10 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-nginx.txt -append -noClobber -#$downloadDirectory = 'D:\download' +$downloadDirectory = 'D:\download' #New-Item $downloadDirectory -ItemType Directory | Out-Null -$nginxZip = Download-FileTo -DownloadUrl $nginxZip -Path $downloadDirectory +$nginxZip = Download-FileTo -DownloadUrl $NGinxDownloadUrl -Path $downloadDirectory Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ # From 1b2e0993e6ba461a1cb5088386128e67323618a9 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 20 Jul 2016 13:48:03 -0600 Subject: [PATCH 20/53] fixed nginx path --- .../EventStoreCluster/Templates/install-nginx.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index fd6aa95..e46cd11 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -46,8 +46,8 @@ Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ # # $ipAddress = (Resolve-DnsName $env:COMPUTERNAME -Type A).IPAddress -# TODO: Include reverse proxy 80 to 2113 -Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx.exe" +# TODO: Include reverse proxy 80 to 2113, use version to build folder! +Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" Add-Content F:\nginx\start-service.cmd "net start Nginx" From 6929be486264ccbdfa5ae7ef33bbf5b291e36795 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Thu, 21 Jul 2016 09:34:41 -0600 Subject: [PATCH 21/53] Changed the nginx download url to one that belongs to us --- azure-resource-manager/EventStoreCluster/Templates/master.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index ad9c690..1cf2179 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -16,6 +16,6 @@ Start-Transcript -path C:\ps-output-master.txt -append -noClobber -ClusterSize 3 . .\install-nginx.ps1 -NGinxVersion "1.10.1" ` - -NGinxDownloadUrl "http://nginx.org/download/nginx-1.10.1.zip" + -NGinxDownloadUrl "https://landdb.blob.core.windows.net/eventstore-cluster-resources/nginx-1.10.1.zip" Stop-Transcript \ No newline at end of file From ffbf99ca77d362a2a107f001a194bf9f15879bff Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Thu, 21 Jul 2016 14:00:54 -0600 Subject: [PATCH 22/53] ditched IntIp and ExtIp, letting nginx be boss --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index f49f9a1..2d3f79c 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -104,8 +104,8 @@ New-NetFirewallRule -Name Allow_EventStore_Ext_In ` Add-Content F:\eventstore\config.yaml "# default Event Store configuration file`n" Add-Content F:\eventstore\config.yaml "Db: F:\eventstore\data`n" Add-Content F:\eventstore\config.yaml "Log: D:\eventstore\logs`n" -Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" -Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" +#Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" +#Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" # Add-Content F:\eventstore\config.yaml "ExtIpAdvertiseAs: $ExtIpAdvertiseAs`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" Add-Content F:\eventstore\config.yaml "DiscoverViaDns: false`n" From d38a0e45c16f1e5424254ccd7e092dbac8bd0b67 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Thu, 21 Jul 2016 14:42:22 -0600 Subject: [PATCH 23/53] brought back IntIp --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 2d3f79c..34ffcfc 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -104,7 +104,7 @@ New-NetFirewallRule -Name Allow_EventStore_Ext_In ` Add-Content F:\eventstore\config.yaml "# default Event Store configuration file`n" Add-Content F:\eventstore\config.yaml "Db: F:\eventstore\data`n" Add-Content F:\eventstore\config.yaml "Log: D:\eventstore\logs`n" -#Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" +Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" #Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" # Add-Content F:\eventstore\config.yaml "ExtIpAdvertiseAs: $ExtIpAdvertiseAs`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" From 2e7408e2958bfcf70c31712e2456eae09fcfe467 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Thu, 21 Jul 2016 16:02:38 -0600 Subject: [PATCH 24/53] added web ui port to the firewall --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 34ffcfc..010a7e2 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -81,6 +81,13 @@ $ipAddress = (Resolve-DnsName $env:COMPUTERNAME -Type A).IPAddress # Manager Node External HTTP Interface (commercial only) #netsh http add urlacl url=http://$ipAddress:30778/ user="NT AUTHORITY\LOCAL SERVICE" +New-NetFirewallRule -Name Allow_80_In ` + -DisplayName "Allow inbound port 80 traffic" ` + -Protocol TCP ` + -Direction Inbound ` + -Action Allow ` + -LocalPort 80 + New-NetFirewallRule -Name Allow_EventStore_Int_In ` -DisplayName "Allow inbound Internal Event Store traffic" ` -Protocol TCP ` From 0418ce68c274760478bffa2bedd6431940c91bae Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 07:45:53 -0600 Subject: [PATCH 25/53] code cleanup, preparing for a pull request --- .../Scripts/Deploy-AzureResourceGroup.ps1 | 2 +- .../Templates/azuredeploy.param.dev.json | 2 +- .../cluster-nodes-0disk-resources.json | 2 +- .../cluster-nodes-16disk-resources.json | 2 +- .../cluster-nodes-2disk-resources.json | 2 +- .../cluster-nodes-4disk-resources.json | 2 +- .../cluster-nodes-8disk-resources.json | 2 +- .../Templates/install-eventstore.ps1 | 18 +++++------------ .../Templates/install-nginx.ps1 | 20 +++++++++---------- .../EventStoreCluster/Templates/master.ps1 | 9 +++++++-- .../Templates/shared-resources.json | 20 ++++++++++++++++--- 11 files changed, 46 insertions(+), 35 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 index c4ad19e..660cbf8 100644 --- a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 +++ b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 @@ -2,7 +2,7 @@ Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, - [string] $ResourceGroupName = 'EventStoreClusterTake1', + [string] $ResourceGroupName = 'EventStoreClusterTake2', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccountResourceGroupName, diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 554c19d..6eb25c4 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -6,7 +6,7 @@ "value": "EventStoreAdmin" }, "adminPassword": { - "value": "VHkbZ7zNBch2" + "value": "RandomMonkeySurfsOnLava!" }, "jumpbox": { "value": "No" diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json index a4ff798..5cf07d9 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-0disk-resources.json @@ -166,7 +166,7 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installapplications')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json index 570ccd5..4106e5e 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-16disk-resources.json @@ -345,7 +345,7 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installapplications')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json index 11e27d3..deb09ae 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-2disk-resources.json @@ -205,7 +205,7 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installapplications')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index d8efa25..4920635 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -225,7 +225,7 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installapplications')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json index 46e5513..02aaac1 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-8disk-resources.json @@ -265,7 +265,7 @@ "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/createdatadisk')]", + "name": "[concat(parameters('namespace'),'-vm-', copyIndex(), '/installapplications')]", "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 010a7e2..731bb1f 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -23,8 +23,9 @@ param ( [Int] $IntHttpPort = 2112, [Int] - $ExtHttpPort = 2113 - + $ExtHttpPort = 2113, + [string] + $downloadDirectory ) function Extract-ZipFile($file, $destination) { @@ -54,9 +55,6 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-es.txt -append -noClobber -$downloadDirectory = 'D:\download' -New-Item $downloadDirectory -ItemType Directory | Out-Null - $nssmZip = Download-FileTo -DownloadUrl $nssmDownloadUrl -Path $downloadDirectory # NSSM is packed with in a folder already Extract-ZipFile -File $nssmZip -Destination F:\ @@ -81,13 +79,6 @@ $ipAddress = (Resolve-DnsName $env:COMPUTERNAME -Type A).IPAddress # Manager Node External HTTP Interface (commercial only) #netsh http add urlacl url=http://$ipAddress:30778/ user="NT AUTHORITY\LOCAL SERVICE" -New-NetFirewallRule -Name Allow_80_In ` - -DisplayName "Allow inbound port 80 traffic" ` - -Protocol TCP ` - -Direction Inbound ` - -Action Allow ` - -LocalPort 80 - New-NetFirewallRule -Name Allow_EventStore_Int_In ` -DisplayName "Allow inbound Internal Event Store traffic" ` -Protocol TCP ` @@ -112,7 +103,8 @@ Add-Content F:\eventstore\config.yaml "# default Event Store configuration file` Add-Content F:\eventstore\config.yaml "Db: F:\eventstore\data`n" Add-Content F:\eventstore\config.yaml "Log: D:\eventstore\logs`n" Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" -#Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" +# Don't need these, locking down the ES behind NGinx +# Add-Content F:\eventstore\config.yaml "ExtIp: $ipAddress`n" # Add-Content F:\eventstore\config.yaml "ExtIpAdvertiseAs: $ExtIpAdvertiseAs`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" Add-Content F:\eventstore\config.yaml "DiscoverViaDns: false`n" diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index e46cd11..1934f7b 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -5,7 +5,9 @@ param ( [string] $NGinxVersion, [string] - $NGinxDownloadUrl + $NGinxDownloadUrl, + [string] + $downloadDirectory ) function Extract-ZipFile($file, $destination) { @@ -35,18 +37,16 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-nginx.txt -append -noClobber -$downloadDirectory = 'D:\download' -#New-Item $downloadDirectory -ItemType Directory | Out-Null - $nginxZip = Download-FileTo -DownloadUrl $NGinxDownloadUrl -Path $downloadDirectory Extract-ZipFile -File $nginxZip -Destination F:\nginx\bin\ -# -# -# -# $ipAddress = (Resolve-DnsName $env:COMPUTERNAME -Type A).IPAddress - -# TODO: Include reverse proxy 80 to 2113, use version to build folder! +New-NetFirewallRule -Name Allow_80_In ` + -DisplayName "Allow inbound port 80 traffic" ` + -Protocol TCP ` + -Direction Inbound ` + -Action Allow ` + -LocalPort 80 + Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 1cf2179..f8951f4 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -7,15 +7,20 @@ Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path C:\ps-output-master.txt -append -noClobber +$downloadDirectory = 'D:\download' +New-Item $downloadDirectory -ItemType Directory | Out-Null + . .\create-data-disks.ps1 # TODO: These parameters should come from the template! . .\install-eventstore.ps1 -EventStoreVersion "3.8.0" ` -EventStoreDownloadUrl "http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.0.zip" ` -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" ` - -ClusterSize 3 + -ClusterSize 3 ` + -downloadDirectory $downloadDirectory . .\install-nginx.ps1 -NGinxVersion "1.10.1" ` - -NGinxDownloadUrl "https://landdb.blob.core.windows.net/eventstore-cluster-resources/nginx-1.10.1.zip" + -NGinxDownloadUrl "https://landdb.blob.core.windows.net/eventstore-cluster-resources/nginx-1.10.1.zip" ` + -downloadDirectory $downloadDirectory Stop-Transcript \ No newline at end of file diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index 6711d8b..1a5fbe6 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -37,6 +37,20 @@ "location": "[parameters('location')]", "properties": { "securityRules": [ + { + "name": "Allow-EventStore-Web-HTTP", + "properties": { + "description": "Allows inbound web traffic from anyone", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, { "name": "Allow-EventStore-TCP", "properties": { @@ -47,11 +61,11 @@ "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "VirtualNetwork", "access": "Allow", - "priority": 100, + "priority": 110, "direction": "Inbound" } }, - { + { "name": "Allow-EventStore-HTTP", "properties": { "description": "Allows inbound EventStore HTTP traffic from anyone", @@ -61,7 +75,7 @@ "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "VirtualNetwork", "access": "Allow", - "priority": 200, + "priority": 120, "direction": "Inbound" } } From fe02c2d5a8f903a603caa838dd29b75e6bb4f772 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:01:33 -0600 Subject: [PATCH 26/53] automated adding IPs to NICs --- .../Templates/cluster-nodes-4disk-resources.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index 4920635..df6b0ce 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -130,7 +130,8 @@ "privateIPAllocationMethod": "Static", "subnet": { "id": "[variables('subnetRef')]" - } + }, + "publicIPAddress": { "id": "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]"} } } ] From 8230ec3b8e601ab5ae88406cef54d52b75b63aaf Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:07:45 -0600 Subject: [PATCH 27/53] automated adding NSG to the subnet --- .../EventStoreCluster/Templates/shared-resources.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index 1a5fbe6..ac95649 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -106,7 +106,8 @@ { "name": "[parameters('networkSettings').subnet[parameters('subnet')].name]", "properties": { - "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]" + "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]", + "networkSecurityGroup": { "id": "[parameters('networkSettings').networkSecurityGroupName]" } } } ] From ef057a56b24d4cac77ac1d8b1003923b55f4dbd8 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:25:56 -0600 Subject: [PATCH 28/53] reset cluster name --- .../EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 index 660cbf8..3cde79e 100644 --- a/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 +++ b/azure-resource-manager/EventStoreCluster/Scripts/Deploy-AzureResourceGroup.ps1 @@ -2,7 +2,7 @@ Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, - [string] $ResourceGroupName = 'EventStoreClusterTake2', + [string] $ResourceGroupName = 'EventStoreCluster', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccountResourceGroupName, From feae86e3994a4aa6e77673ab4656b62f9a096296 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:36:03 -0600 Subject: [PATCH 29/53] fixed nsg id ref --- .../EventStoreCluster/Templates/shared-resources.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index ac95649..587ca9c 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -107,7 +107,9 @@ "name": "[parameters('networkSettings').subnet[parameters('subnet')].name]", "properties": { "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]", - "networkSecurityGroup": { "id": "[parameters('networkSettings').networkSecurityGroupName]" } + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', [parameters('networkSettings').networkSecurityGroupName])]" + } } } ] From 776a262f829771f0837c834b6003f30a4fe68894 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:42:14 -0600 Subject: [PATCH 30/53] fixed nsg id ref --- .../EventStoreCluster/Templates/shared-resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index 587ca9c..228e2ee 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -108,7 +108,7 @@ "properties": { "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]", "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', [parameters('networkSettings').networkSecurityGroupName])]" + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').networkSecurityGroupName)]" } } } From f33f8486b52346b66a24b51dcef48c40381cb0a4 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:46:49 -0600 Subject: [PATCH 31/53] dropped adding nsg to subnet for the moment --- .../EventStoreCluster/Templates/shared-resources.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index 228e2ee..d38d9ca 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -106,10 +106,11 @@ { "name": "[parameters('networkSettings').subnet[parameters('subnet')].name]", "properties": { - "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').networkSecurityGroupName)]" - } + "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]" + //, + //"networkSecurityGroup": { + // "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').networkSecurityGroupName)]" + //} } } ] From 0e1231ab7b1999006d73b363d496b87250350ae7 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 08:54:21 -0600 Subject: [PATCH 32/53] attempting to bring back adding nsg to subnet --- .../Templates/shared-resources.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index d38d9ca..08dbcb8 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -93,6 +93,9 @@ }, { "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSettings').networkSecurityGroupName)]" + ], "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", "location": "[parameters('location')]", @@ -106,11 +109,10 @@ { "name": "[parameters('networkSettings').subnet[parameters('subnet')].name]", "properties": { - "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]" - //, - //"networkSecurityGroup": { - // "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').networkSecurityGroupName)]" - //} + "addressPrefix": "[parameters('networkSettings').subnet[parameters('subnet')].prefix]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').networkSecurityGroupName)]" + } } } ] From 86e3cf2c6d54a2d85453525bf0c71f30d49ed760 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 09:08:21 -0600 Subject: [PATCH 33/53] fixed bad public ip ref --- .../Templates/cluster-nodes-4disk-resources.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json index df6b0ce..292831f 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/cluster-nodes-4disk-resources.json @@ -131,7 +131,9 @@ "subnet": { "id": "[variables('subnetRef')]" }, - "publicIPAddress": { "id": "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), '-pip-', copyIndex())]"} + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('namespace'), '-pip-', copyIndex()))]" + } } } ] From 4502f376506fdeacbd4b28599fed7d5ea78bd8b4 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Fri, 22 Jul 2016 09:40:12 -0600 Subject: [PATCH 34/53] easy pass --- .../EventStoreCluster/Templates/azuredeploy.param.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 6eb25c4..0696693 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -6,7 +6,7 @@ "value": "EventStoreAdmin" }, "adminPassword": { - "value": "RandomMonkeySurfsOnLava!" + "value": "YourEventStoreVMPassword" }, "jumpbox": { "value": "No" From 33de42d4674b778a710159ded7f607427ab3a4b9 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 09:37:40 -0600 Subject: [PATCH 35/53] Parameterized the templateBaseUrl and included the custom nginx.conf Copy-Item command. --- .../EventStoreCluster.deployproj | 1 + .../Templates/azuredeploy.json | 6 +- .../Templates/azuredeploy.param.dev.json | 5 +- .../Templates/install-nginx.ps1 | 2 + .../EventStoreCluster/Templates/master.ps1 | 3 +- .../EventStoreCluster/Templates/nginx.conf | 119 ++++++++++++++++++ 6 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 azure-resource-manager/EventStoreCluster/Templates/nginx.conf diff --git a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj index c745b18..5d09690 100644 --- a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj +++ b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj @@ -49,6 +49,7 @@ + False diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 12ddc48..771cbc7 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -82,7 +82,7 @@ "vmSizeEventStoreNode": { "type": "string", - "defaultValue": "Standard_D2", + "defaultValue": "Standard_DS3_v2", "allowedValues": [ "Standard_D1", "Standard_D2", @@ -94,7 +94,7 @@ "Standard_A7", "Standard_DS1", "Standard_DS2", - "Standard_DS3", + "Standard_DS3_v2", "Standard_DS4", "Standard_DS13" ], @@ -132,7 +132,7 @@ } }, "variables": { - "templateBaseUrl": "https://raw.githubusercontent.com/agconnections/EventStore-DevOps/master/azure-resource-manager/EventStoreCluster/Templates/", + "templateBaseUrl": "[parameters('templateBaseUrl')]", "locationMap": { "ResourceGroup": "[resourceGroup().location]", "West US": "[parameters('location')]", diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 0696693..e2ba8e4 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -11,8 +11,11 @@ "jumpbox": { "value": "No" }, - "vmEventStoreNodeCount": { + "vmEventStoreNodeCount": { "value": 3 + }, + "templateBaseUrl": { + "value": "https://raw.githubusercontent.com/agconnections/EventStore-DevOps/master/azure-resource-manager/EventStoreCluster/Templates/" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index 1934f7b..e9db9c1 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -47,6 +47,8 @@ New-NetFirewallRule -Name Allow_80_In ` -Action Allow ` -LocalPort 80 +Copy-Item '..\Templates\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force + Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index f8951f4..e0ed63c 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -12,7 +12,6 @@ New-Item $downloadDirectory -ItemType Directory | Out-Null . .\create-data-disks.ps1 -# TODO: These parameters should come from the template! . .\install-eventstore.ps1 -EventStoreVersion "3.8.0" ` -EventStoreDownloadUrl "http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.0.zip" ` -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" ` @@ -20,7 +19,7 @@ New-Item $downloadDirectory -ItemType Directory | Out-Null -downloadDirectory $downloadDirectory . .\install-nginx.ps1 -NGinxVersion "1.10.1" ` - -NGinxDownloadUrl "https://landdb.blob.core.windows.net/eventstore-cluster-resources/nginx-1.10.1.zip" ` + -NGinxDownloadUrl "http://nginx.org/download/nginx-1.10.1.zip" ` -downloadDirectory $downloadDirectory Stop-Transcript \ No newline at end of file diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf new file mode 100644 index 0000000..363aa6c --- /dev/null +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -0,0 +1,119 @@ + +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + server_name localhost; + + #charset koi8-r; + + #access_log logs/host.access.log main; + + location / { + proxy_pass http://127.0.0.1:2113; + + #root html; + #index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} + } + + + # another virtual host using mix of IP-, name-, and port-based configuration + # + #server { + # listen 8000; + # listen somename:8080; + # server_name somename alias another.alias; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + + + # HTTPS server + # + #server { + # listen 443 ssl; + # server_name localhost; + + # ssl_certificate cert.pem; + # ssl_certificate_key cert.key; + + # ssl_session_cache shared:SSL:1m; + # ssl_session_timeout 5m; + + # ssl_ciphers HIGH:!aNULL:!MD5; + # ssl_prefer_server_ciphers on; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + +} From 27fd539bbadd6fc4ef7575159242a0c54565026f Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 09:47:15 -0600 Subject: [PATCH 36/53] Added templateBaseUrl to main template file --- .../EventStoreCluster/Templates/azuredeploy.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 771cbc7..7a07073 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -80,6 +80,13 @@ } }, + "templateBaseUrl": { + "type": "string", + "metadata": { + "description": "Allows the user to specify the location of their own template." + } + }, + "vmSizeEventStoreNode": { "type": "string", "defaultValue": "Standard_DS3_v2", From 54a3388090e826533cc3ecaf1bef793fbe7383af Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 09:51:43 -0600 Subject: [PATCH 37/53] Added Standard_DS3_v2 --- .../EventStoreCluster/Templates/azuredeploy.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 7a07073..8cfc3ab 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -101,6 +101,7 @@ "Standard_A7", "Standard_DS1", "Standard_DS2", + "Standard_DS3", "Standard_DS3_v2", "Standard_DS4", "Standard_DS13" @@ -236,6 +237,11 @@ "nodesPerStorageAccount": 4, "storageAccountType": "Premium_LRS" }, + "Standard_DS3_v2": { + "dataDisks": 8, + "nodesPerStorageAccount": 4, + "storageAccountType": "Premium_LRS" + }, "Standard_DS4": { "dataDisks": 16, "nodesPerStorageAccount": 2, From d6b92defacf49e59ae4cd2fa5990f3a808e1a3c5 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 09:55:00 -0600 Subject: [PATCH 38/53] pw --- .../EventStoreCluster/Templates/azuredeploy.param.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index e2ba8e4..a68d118 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -6,7 +6,7 @@ "value": "EventStoreAdmin" }, "adminPassword": { - "value": "YourEventStoreVMPassword" + "value": "YourEventStoreVMPassword!123" }, "jumpbox": { "value": "No" From 14c8bda8edb3554aa86251ff8cd6c3b7606b3e1b Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 10:48:14 -0600 Subject: [PATCH 39/53] pulled down the nginx.conf for copying --- .../EventStoreCluster/Templates/azuredeploy.json | 3 ++- .../EventStoreCluster/Templates/install-nginx.ps1 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 8cfc3ab..63a1b46 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -178,7 +178,8 @@ "[concat(variables('templateBaseUrl'), 'master.ps1')]", "[concat(variables('templateBaseUrl'), 'create-data-disks.ps1')]", "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]", - "[concat(variables('templateBaseUrl'), 'install-nginx.ps1')]" + "[concat(variables('templateBaseUrl'), 'install-nginx.ps1')]", + "[concat(variables('templateBaseUrl'), 'nginx.conf')]" ], "windowsSettings": { "imageReference": { diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index e9db9c1..7d1bd66 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -47,7 +47,7 @@ New-NetFirewallRule -Name Allow_80_In ` -Action Allow ` -LocalPort 80 -Copy-Item '..\Templates\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force +Copy-Item '..\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" From 581e3f6ff3498b59dedf2e6cc3fe119d8c628245 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 11:36:46 -0600 Subject: [PATCH 40/53] fixed the nginx.conf path --- .../EventStoreCluster/Templates/install-nginx.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index 7d1bd66..85726fd 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -47,7 +47,7 @@ New-NetFirewallRule -Name Allow_80_In ` -Action Allow ` -LocalPort 80 -Copy-Item '..\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force +Copy-Item '.\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" From 8e7902ec7bd740297391255e8f55f8f04434e41f Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 12:16:17 -0600 Subject: [PATCH 41/53] Added RunProjections. --- .../EventStoreCluster/Templates/install-eventstore.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index 43af361..b652007 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -108,6 +108,7 @@ Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" Add-Content F:\eventstore\config.yaml "DiscoverViaDns: false`n" Add-Content F:\eventstore\config.yaml "GossipSeed: 10.0.1.4:$IntHttpPort,10.0.1.5:$IntHttpPort,10.0.1.6:$IntHttpPort`n" +Add-Content F:\eventstore\config.yaml "RunProjections: ALL`n" Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install EventStore F:\eventstore\bin\EventStore.ClusterNode.exe --config F:\eventstore\config.yaml" Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set EventStore Description ""The EventStore service""" From 1752449d3d990ef7a8ff4b43cbccb6ccc02cb937 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 1 Aug 2016 15:10:55 -0600 Subject: [PATCH 42/53] added proxy headers so that enabling projections will work --- azure-resource-manager/EventStoreCluster/Templates/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf index 363aa6c..7426193 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -42,6 +42,8 @@ http { location / { proxy_pass http://127.0.0.1:2113; + proxy_set_header X-Forwarded-Port 80; + proxy_set_header X-Forwarded-Host $http_host; #root html; #index index.html index.htm; From 336808af90cc06040d4e54d0fe208c1154b27da1 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 09:18:01 -0600 Subject: [PATCH 43/53] added all _v2 vm sizes to the configuration --- .../Templates/azuredeploy.json | 66 +++++++++++++++++-- .../Templates/azuredeploy.param.dev.json | 7 +- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 4f94ce4..5c13da6 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -86,7 +86,7 @@ }, "vmSizeEventStoreNode": { "type": "string", - "defaultValue": "Standard_DS3_v2", + "defaultValue": "Standard_DS2_v2", "allowedValues": [ "Standard_D1", "Standard_D2", @@ -98,10 +98,19 @@ "Standard_A7", "Standard_DS1", "Standard_DS2", - "Standard_DS3", - "Standard_DS3_v2", + "Standard_DS3", "Standard_DS4", - "Standard_DS13" + "Standard_DS13", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" ], "metadata": { "description": "Size of the Event Store data nodes" @@ -273,17 +282,62 @@ "nodesPerStorageAccount": 4, "storageAccountType": "Premium_LRS" }, + "Standard_DS4": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS13": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS1_v2": { + "dataDisks": 2, + "nodesPerStorageAccount": 6, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS2_v2": { + "dataDisks": 4, + "nodesPerStorageAccount": 4, + "storageAccountType": "Premium_LRS" + }, "Standard_DS3_v2": { "dataDisks": 8, "nodesPerStorageAccount": 4, "storageAccountType": "Premium_LRS" }, - "Standard_DS4": { + "Standard_DS4_v2": { "dataDisks": 16, "nodesPerStorageAccount": 2, "storageAccountType": "Premium_LRS" }, - "Standard_DS13": { + "Standard_DS5_v2": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS11_v2": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS12_v2": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS13_v2": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS14_v2": { + "dataDisks": 16, + "nodesPerStorageAccount": 2, + "storageAccountType": "Premium_LRS" + }, + "Standard_DS15_v2": { "dataDisks": 16, "nodesPerStorageAccount": 2, "storageAccountType": "Premium_LRS" diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 6415a85..491d33e 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -14,6 +14,11 @@ "vmEventStoreNodeCount": { "value": 3 }, - "githubAccount": { "value": "agconnections" } + "vmSizeEventStoreNode": { + "value": "Standard_DS3_v2" + }, + "githubAccount": { + "value": "agconnections" + } } } From be8d5645f69de97803d869ae857b7f91c35310c0 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 09:32:03 -0600 Subject: [PATCH 44/53] parameterized run-projections, defaulting to "All" --- .../EventStoreCluster/Templates/azuredeploy.json | 11 ++++++++++- .../Templates/install-eventstore.ps1 | 6 ++++-- .../EventStoreCluster/Templates/master.ps1 | 2 ++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 5c13da6..6d6cde6 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -152,6 +152,15 @@ "description": "Event Store version to install" } }, + "esRunProjections": { + "type": "string", + "defaultValue": "All", + "allowedValues": [ + "None", + "System", + "All" + ] + }, "githubAccount": { "type": "string", "defaultValue": "pbolduc", @@ -240,7 +249,7 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[variables('windowsScripts')]", - "commandToExecute": "[concat('powershell.exe -File master.ps1 -ClusterSize ',parameters('vmEventStoreNodeCount'),' -esVer ',parameters('esVersion'))]" + "commandToExecute": "[concat('powershell.exe -File master.ps1 -ClusterSize ',parameters('vmEventStoreNodeCount'),' -esVer ',parameters('esVersion'), ' -esRunProjections ',parameters('esRunProjections'))]" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 index b652007..ea795cc 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-eventstore.ps1 @@ -23,7 +23,9 @@ param ( [Int] $ExtHttpPort = 2113, [string] - $downloadDirectory + $downloadDirectory, + [string] + $RunProjections = "All" ) function Extract-ZipFile($file, $destination) { @@ -108,7 +110,7 @@ Add-Content F:\eventstore\config.yaml "IntIp: $ipAddress`n" Add-Content F:\eventstore\config.yaml "ClusterSize: $ClusterSize`n" Add-Content F:\eventstore\config.yaml "DiscoverViaDns: false`n" Add-Content F:\eventstore\config.yaml "GossipSeed: 10.0.1.4:$IntHttpPort,10.0.1.5:$IntHttpPort,10.0.1.6:$IntHttpPort`n" -Add-Content F:\eventstore\config.yaml "RunProjections: ALL`n" +Add-Content F:\eventstore\config.yaml "RunProjections: $RunProjections`n" Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install EventStore F:\eventstore\bin\EventStore.ClusterNode.exe --config F:\eventstore\config.yaml" Add-Content F:\eventstore\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set EventStore Description ""The EventStore service""" diff --git a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 index 07b67f3..a4d14d7 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/master.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/master.ps1 @@ -4,6 +4,7 @@ param( [Int32]$ClusterSize, [string]$esVer, + [string]$esRunProjections, [string]$nginxVer="1.10.1", [string]$nginxUrl="http://nginx.org/download/nginx-1.10.1.zip" ) @@ -20,6 +21,7 @@ New-Item $downloadDirectory -ItemType Directory | Out-Null # TODO: These parameters should come from the template! . .\install-eventstore.ps1 -EventStoreVersion $esVer ` + -RunProjections $esRunProjections ` -nssmDownloadUrl "https://nssm.cc/release/nssm-2.24.zip" ` -ClusterSize $ClusterSize ` -downloadDirectory $downloadDirectory From 706ae480a7e55e988c51f0f20dd4b66df1b46d55 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 09:50:05 -0600 Subject: [PATCH 45/53] added example ssl configuration (this will be optional in future commits) --- .../EventStoreCluster.deployproj | 2 ++ .../Templates/azuredeploy.json | 4 ++- .../EventStoreCluster/Templates/cacert.pem | 23 +++++++++++++ .../Templates/install-nginx.ps1 | 2 ++ .../EventStoreCluster/Templates/nginx.conf | 34 +++++++++---------- .../EventStoreCluster/Templates/privkey.pem | 27 +++++++++++++++ 6 files changed, 74 insertions(+), 18 deletions(-) create mode 100644 azure-resource-manager/EventStoreCluster/Templates/cacert.pem create mode 100644 azure-resource-manager/EventStoreCluster/Templates/privkey.pem diff --git a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj index ab44c94..0c24979 100644 --- a/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj +++ b/azure-resource-manager/EventStoreCluster/EventStoreCluster.deployproj @@ -45,6 +45,7 @@ + @@ -52,6 +53,7 @@ + False diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index 6d6cde6..f62392d 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -231,7 +231,9 @@ "[concat(variables('templateBaseUrl'), 'install-eventstore.ps1')]", "[concat(variables('templateBaseUrl'), 'install-nginx.ps1')]", "[concat(variables('templateBaseUrl'), 'eventstore-windows-sources.csv')]", - "[concat(variables('templateBaseUrl'), 'nginx.conf')]" + "[concat(variables('templateBaseUrl'), 'nginx.conf')]", + "[concat(variables('templateBaseUrl'), 'cacert.pem')]", + "[concat(variables('templateBaseUrl'), 'privkey.pem')]" ], "windowsSettings": { "imageReference": { diff --git a/azure-resource-manager/EventStoreCluster/Templates/cacert.pem b/azure-resource-manager/EventStoreCluster/Templates/cacert.pem new file mode 100644 index 0000000..6126519 --- /dev/null +++ b/azure-resource-manager/EventStoreCluster/Templates/cacert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID1zCCAr+gAwIBAgIJANlglY0XoRznMA0GCSqGSIb3DQEBBQUAMFAxCzAJBgNV +BAYTAlVTMREwDwYDVQQIEwhLZW50dWNreTEPMA0GA1UEBxMGTXVycmF5MR0wGwYD +VQQKExRBZyBDb25uZWN0aW9ucywgTExDLjAeFw0xNjA4MDIxNTQ2MDJaFw0xOTA4 +MDIxNTQ2MDJaMFAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhLZW50dWNreTEPMA0G +A1UEBxMGTXVycmF5MR0wGwYDVQQKExRBZyBDb25uZWN0aW9ucywgTExDLjCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM8g9qRHP08v8dbtaibb5mSWYlfL +SwhaAl2BCJMDuAyVfagTgOAX9Wx4C+ueLXlbMDhKTKIUFHwRvHxd2Hxt0vBvvyG2 +lW4LZP8lKWVesf3sfT7/g9/nY78LMlSmnDbL8arN0pZdoplE2/KRQyZlgSG8IfLx +lVmFqQ3X2ynJOcz1mb/rJW2hT7kEfX/kjD0QGs3c7AyEQTblpqlxKsb5PiVui4N/ +m8HWSa40cUANq92hgZp0lQEtoUdja49J3dvtlJbAENcQTc9soFV6x+p9yons52bc +czuF86oht4TXIxEHmhpJ0+tMabWaU4MAasvzDf+7N99O4gAp6UhZA/zz3fUCAwEA +AaOBszCBsDAdBgNVHQ4EFgQU29LSoW8IoIRUNLDTC6nYPYO/QRkwgYAGA1UdIwR5 +MHeAFNvS0qFvCKCEVDSw0wup2D2Dv0EZoVSkUjBQMQswCQYDVQQGEwJVUzERMA8G +A1UECBMIS2VudHVja3kxDzANBgNVBAcTBk11cnJheTEdMBsGA1UEChMUQWcgQ29u +bmVjdGlvbnMsIExMQy6CCQDZYJWNF6Ec5zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3 +DQEBBQUAA4IBAQC3vrV+zMFKzjmNZ0WFA28K0Bes0RKxhEI9rVNxQgfZOlN9Th9S +UvF3FQeRYVEIA4jw/vIsbhShGrZt3D09z/r5OPBYuuJ3Dh9ob/W5KbpmLh615Rmv +euKnXNVKh3ylLukJqUCcgRyKi9xrWwGa1rnvXx0/kOIgq0KJIPBgGDJjiwDSD2n+ +5X0h8eGQDxqyB/wmjYhe80FgJrwlmzWx6korZ548N6m8rVLzxJE3TKpdPPzvh7Kp +IzPMhsvJf7Ml5W7o+Ym9Y7Rj+JMls5+6e1Qd65GdZ0+upwBRMPp5hVVYtyn6Mv85 +lhI45Bl/VvG7XDfKaMozHWX2M8DqI4utkKmE +-----END CERTIFICATE----- diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index 85726fd..d686c79 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -48,6 +48,8 @@ New-NetFirewallRule -Name Allow_80_In ` -LocalPort 80 Copy-Item '.\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force +Copy-Item '.\cacert.pem' 'F:\nginx\bin\nginx-1.10.1\conf\cacert.pem' -Force +Copy-Item '.\privkey.pem' 'F:\nginx\bin\nginx-1.10.1\conf\privkey.pem' -Force Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe install Nginx F:\nginx\bin\nginx-1.10.1\nginx.exe" Add-Content F:\nginx\install-service.cmd "F:\nssm-2.24\win64\nssm.exe set Nginx Description ""The Nginx service""" diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf index 7426193..ff14dc2 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -97,25 +97,25 @@ http { #} - # HTTPS server - # - #server { - # listen 443 ssl; - # server_name localhost; - - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; + # HTTPS server + server { + listen 443 ssl; + server_name localhost; - # ssl_session_cache shared:SSL:1m; - # ssl_session_timeout 5m; + ssl_certificate cacert.pem; + ssl_certificate_key privkey.key; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; - # location / { - # root html; - # index index.html index.htm; - # } - #} + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + location / { + proxy_pass http://127.0.0.1:2113; + proxy_set_header X-Forwarded-Port 443; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-Proto https; + } + } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/privkey.pem b/azure-resource-manager/EventStoreCluster/Templates/privkey.pem new file mode 100644 index 0000000..3216c54 --- /dev/null +++ b/azure-resource-manager/EventStoreCluster/Templates/privkey.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAzyD2pEc/Ty/x1u1qJtvmZJZiV8tLCFoCXYEIkwO4DJV9qBOA +4Bf1bHgL654teVswOEpMohQUfBG8fF3YfG3S8G+/IbaVbgtk/yUpZV6x/ex9Pv+D +3+djvwsyVKacNsvxqs3Sll2imUTb8pFDJmWBIbwh8vGVWYWpDdfbKck5zPWZv+sl +baFPuQR9f+SMPRAazdzsDIRBNuWmqXEqxvk+JW6Lg3+bwdZJrjRxQA2r3aGBmnSV +AS2hR2Nrj0nd2+2UlsAQ1xBNz2ygVXrH6n3KieznZtxzO4XzqiG3hNcjEQeaGknT +60xptZpTgwBqy/MN/7s3307iACnpSFkD/PPd9QIDAQABAoIBAHDJy2SjY2cUfYWC +3KXyYp/tf/m8usv+b4FJLUkY4lT/5l/q1uewRDVfnWYdSTfnHvfYBajQdGMnKVMz +qxn+l7nTr+mEyhQVYlbJfqQzj4rtBzqR2tbG4nr6dtq/qxrvrVZMI9s7e7ooU/jf +fwheh5W+I2JuiNwpu2fNXguABtiC/N2MdgmPY8TXjfVIobxAn7Ldj0X7D0DUbn2J +dyka4Es7fkK1ObuPrW0pqBBmvN3+YbLRLywwn7g0PYp7g6JwodSGAu67nWqYwBtI +Q5n50Mq9GM33WeudweGfuhk31yTVZNk75QmVowrEeQFoBGaWFWMluaeU1dcCFvOJ +rO+NezUCgYEA/UErejhcrYntb7f5suS2vJmPM0u8XmT/rYHkpgL1wMnD0Foe11eZ +RJAoshMn7fgY/RSOunQs/e07R6hyqY5Y2RJ0aSgQKKf4TJRllMuv4cCKviJTChRd +znHi4oTIVAZQbGn72s20jEToDQFzFierGaWYYwwdgpfLwFHn3g49Ri8CgYEA0V/J +HoWJSd6bw8Bz5fFMqgKYwVt7UIoCCnFbbsKxhcsWQg63xW9me5iA940lO3o83HYY +dJzqK+EMFiqfWcq/x1K+BL868BrObZ8e8wQx5Rwfh69DP2zQSce7cc5EZF4LxxFK +uLkWgiBHKaI4TgQqXwqnMM7tpRPhClspC0uzORsCgYEAlqhNQAEFiSszN7G/dp++ +4cWMPdzBK3pz63kJV4UNQ2oD9g+Wp05yXCpSO1VP/K4J14yCOANivJCDImbgB2Qq +EMB8xg3SRw1dldj18SWW9PqAzwlGUwm4oFZ5vX12Wx4Ce+w0qn6S+JsJXKtPFo/0 +pmYvmESdzZGV4UwYXq4j33sCgYAJdatvjpb6WG1vNbXG0NUm5UEjk0+J/wJCmIaK +BY/hvKA/0cxpxjO6J9TD2oOxIT+4sjk+o4xM+TkDk19pvihWCB3/tughywRCnarX +Tfw3HsMp7Tg7mF38x2JnrOsYIcukbdqTaAFlVbIBZovmsnd7nc6Z/O9twu0q+51q +Hjx1uwKBgFeswljQYFiYmWYmqj3AijM4VyNoqYWg3+agd4T4V8u5Y+ljI/BiPQgq +r1Jb1ctnCP7hcN+2Fl7ixgtlrH50PUT1XzqTuGbe3bT6ezcdF8XRGgRzUiutnQ9a +MIi2utdBNdRyafQ40wZzLnss6N+H1Kpf1VIdTG9zidEnicVZshho +-----END RSA PRIVATE KEY----- From baa4dae0a0bffa720ef81f2de78a97c1be4a6fb8 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 11:19:03 -0600 Subject: [PATCH 46/53] patched up the location of the pem(s) --- azure-resource-manager/EventStoreCluster/Templates/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf index ff14dc2..589c3a7 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -102,8 +102,8 @@ http { listen 443 ssl; server_name localhost; - ssl_certificate cacert.pem; - ssl_certificate_key privkey.key; + ssl_certificate F:/nginx/bin/nginx-1.10.1/conf/cacert.pem; + ssl_certificate_key F:/nginx/bin/nginx-1.10.1/conf/privkey.pem; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; From 841f7bcb755e20fb91055f5fb81275f97f924fc3 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 11:20:48 -0600 Subject: [PATCH 47/53] added firewall and inbound security rule for 443/ssl --- .../EventStoreCluster/Templates/install-nginx.ps1 | 7 +++++++ .../Templates/shared-resources.json | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index d686c79..a485e93 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -47,6 +47,13 @@ New-NetFirewallRule -Name Allow_80_In ` -Action Allow ` -LocalPort 80 +New-NetFirewallRule -Name Allow_443_In ` + -DisplayName "Allow inbound port 443 traffic" ` + -Protocol TCP ` + -Direction Inbound ` + -Action Allow ` + -LocalPort 443 + Copy-Item '.\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force Copy-Item '.\cacert.pem' 'F:\nginx\bin\nginx-1.10.1\conf\cacert.pem' -Force Copy-Item '.\privkey.pem' 'F:\nginx\bin\nginx-1.10.1\conf\privkey.pem' -Force diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index 08dbcb8..adff875 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -51,6 +51,20 @@ "direction": "Inbound" } }, + { + "name": "Allow-EventStore-Web-HTTPS", + "properties": { + "description": "Allows secure inbound web traffic from anyone", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, { "name": "Allow-EventStore-TCP", "properties": { From 1f16fdad08185142fa891c858b076d2298953631 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 11:50:08 -0600 Subject: [PATCH 48/53] added proxy pass directives for ssl support --- azure-resource-manager/EventStoreCluster/Templates/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf index 589c3a7..c5089c8 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -113,6 +113,8 @@ http { location / { proxy_pass http://127.0.0.1:2113; + proxy_pass_header Set-Cookie; + proxy_pass_header P3P; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Proto https; From f5fe831a52e990c0428b1525ef384b44bd0cdf20 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Tue, 2 Aug 2016 11:55:12 -0600 Subject: [PATCH 49/53] added rules for RDP 3389 --- .../Templates/install-nginx.ps1 | 7 +++++++ .../Templates/shared-resources.json | 20 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 index a485e93..117cb02 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 +++ b/azure-resource-manager/EventStoreCluster/Templates/install-nginx.ps1 @@ -54,6 +54,13 @@ New-NetFirewallRule -Name Allow_443_In ` -Action Allow ` -LocalPort 443 +New-NetFirewallRule -Name Allow_3389_In ` + -DisplayName "Allow inbound port 3389 traffic" ` + -Protocol TCP ` + -Direction Inbound ` + -Action Allow ` + -LocalPort 3389 + Copy-Item '.\nginx.conf' 'F:\nginx\bin\nginx-1.10.1\conf\nginx.conf' -Force Copy-Item '.\cacert.pem' 'F:\nginx\bin\nginx-1.10.1\conf\cacert.pem' -Force Copy-Item '.\privkey.pem' 'F:\nginx\bin\nginx-1.10.1\conf\privkey.pem' -Force diff --git a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json index adff875..4828376 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json +++ b/azure-resource-manager/EventStoreCluster/Templates/shared-resources.json @@ -61,7 +61,7 @@ "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "VirtualNetwork", "access": "Allow", - "priority": 100, + "priority": 110, "direction": "Inbound" } }, @@ -75,7 +75,7 @@ "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "VirtualNetwork", "access": "Allow", - "priority": 110, + "priority": 120, "direction": "Inbound" } }, @@ -89,7 +89,21 @@ "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "VirtualNetwork", "access": "Allow", - "priority": 120, + "priority": 130, + "direction": "Inbound" + } + }, + { + "name": "Allow-RDP-HTTP", + "properties": { + "description": "Allows inbound RDP HTTP traffic from anyone", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 140, "direction": "Inbound" } } From 0f2ddf317b5772f05d1f2d4041a4268dbaa8df37 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 14 Sep 2016 09:50:04 -0600 Subject: [PATCH 50/53] Added a stream entry for 1113 --- .../EventStoreCluster/Templates/nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf index c5089c8..95011f2 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/nginx.conf +++ b/azure-resource-manager/EventStoreCluster/Templates/nginx.conf @@ -13,6 +13,12 @@ events { worker_connections 1024; } +stream { + server { + listen 1113; + proxy_pass 127.0.0.1:1113; + } +} http { include mime.types; From 3b4945295313364da5ac3153f6f870f232389ea7 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Mon, 10 Oct 2016 11:38:29 -0600 Subject: [PATCH 51/53] added vmEventStoreDataDiskSize as a param --- .../EventStoreCluster/Templates/azuredeploy.param.dev.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 491d33e..02a508e 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -15,7 +15,10 @@ "value": 3 }, "vmSizeEventStoreNode": { - "value": "Standard_DS3_v2" + "value": "Standard_DS3_v2" + }, + "vmEventStoreDataDiskSize": { + "value": 128 }, "githubAccount": { "value": "agconnections" From 5974e4d63223c71b8d931aa88c29028feb4949c1 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 14 Dec 2016 11:06:52 -0600 Subject: [PATCH 52/53] Updated sources and added some parameters to avoid naming collisions in azure --- .../Templates/azuredeploy.json | 24 ++++++++++++++++--- .../Templates/azuredeploy.param.dev.json | 15 +++++++++--- .../Templates/eventstore-ubuntu-sources.txt | 4 ++++ .../Templates/eventstore-windows-sources.csv | 8 +++++-- 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index f62392d..c082188 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -48,6 +48,20 @@ "description": "Virtual Network" } }, + "subnetName": { + "type": "string", + "defaultValue": "eventstore", + "metadata": { + "description": "Subnet" + } + }, + "namespace": { + "type": "string", + "defaultValue": "es", + "metadata": { + "description": "Namespace for vms, ips, etc." + } + }, "OS": { "type": "string", "defaultValue": "windows", @@ -98,7 +112,7 @@ "Standard_A7", "Standard_DS1", "Standard_DS2", - "Standard_DS3", + "Standard_DS3", "Standard_DS4", "Standard_DS13", "Standard_DS1_v2", @@ -125,8 +139,12 @@ }, "esVersion": { "type": "string", - "defaultValue": "3.8.1", + "defaultValue": "3.9.3", "allowedValues": [ + "3.9.3", + "3.9.2", + "3.9.1", + "3.9.0", "3.8.1", "3.8.0", "3.7.0", @@ -214,7 +232,7 @@ "addressPrefix": "10.0.0.0/16", "subnet": { "eventstore": { - "name": "eventstore", + "name": "[parameters('subnetName')]", "prefix": "10.0.1.0/28", "networkPrefix": "10.0.1", "vnet": "[parameters('virtualNetworkName')]" diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json index 02a508e..9ca0b5d 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.param.dev.json @@ -6,11 +6,20 @@ "value": "EventStoreAdmin" }, "adminPassword": { - "value": "YourEventStoreVMPassword!123" + "value": "YourEventStoreVMPassword!123" }, - "jumpbox": { + "jumpbox": { "value": "No" }, + "namespace": { + "value": "test-es" + }, + "subnetName": { + "value": "test-eventstore" + }, + "virtualNetworkName": { + "value": "test-es-vnet" + }, "vmEventStoreNodeCount": { "value": 3 }, @@ -21,7 +30,7 @@ "value": 128 }, "githubAccount": { - "value": "agconnections" + "value": "agconnections" } } } diff --git a/azure-resource-manager/EventStoreCluster/Templates/eventstore-ubuntu-sources.txt b/azure-resource-manager/EventStoreCluster/Templates/eventstore-ubuntu-sources.txt index 4f84350..d320687 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/eventstore-ubuntu-sources.txt +++ b/azure-resource-manager/EventStoreCluster/Templates/eventstore-ubuntu-sources.txt @@ -2,6 +2,10 @@ # to do: make this file contents something unbuntu shell script can process natively # +"3.9.3": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.9.3.tar.gz", +"3.9.2": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.9.2.tar.gz", +"3.9.1": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.9.1.tar.gz", +"3.9.0": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.9.0.tar.gz", "3.8.1": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.8.1.tar.gz", "3.8.0": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.8.0.tar.gz", "3.7.0": "http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.7.0.tar.gz", diff --git a/azure-resource-manager/EventStoreCluster/Templates/eventstore-windows-sources.csv b/azure-resource-manager/EventStoreCluster/Templates/eventstore-windows-sources.csv index a6483bb..9951652 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/eventstore-windows-sources.csv +++ b/azure-resource-manager/EventStoreCluster/Templates/eventstore-windows-sources.csv @@ -1,4 +1,8 @@ -"3.8.1",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.1.zip +"3.9.3",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.9.3.zip +"3.9.2",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.9.2.zip +"3.9.1",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.9.1.zip +"3.9.0",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.9.0.zip +"3.8.1",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.1.zip "3.8.0",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.8.0.zip "3.7.0",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.7.0.zip "3.6.3",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.6.3.zip @@ -17,4 +21,4 @@ "3.0.3",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.0.3.zip "3.0.2",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.0.2.zip "3.0.1",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.0.1.zip -"3.0.0",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.0.0.zip +"3.0.0",http://download.geteventstore.com/binaries/EventStore-OSS-Win-v3.0.0.zip \ No newline at end of file From a4c09fcbfa9b365122bef188fd3268f08d504059 Mon Sep 17 00:00:00 2001 From: Corey Perkins Date: Wed, 14 Dec 2016 11:39:12 -0600 Subject: [PATCH 53/53] used the namespace setting for the cluster nodes. --- .../EventStoreCluster/Templates/azuredeploy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json index c082188..1312d88 100644 --- a/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json +++ b/azure-resource-manager/EventStoreCluster/Templates/azuredeploy.json @@ -517,7 +517,7 @@ "value": "[parameters('vmEventStoreDataDiskSize')]" }, "namespace": { - "value": "es" + "value": "[parameters('namespace')]" }, "osSettings": { "value": "[variables('osSettings')]"