-
Notifications
You must be signed in to change notification settings - Fork 24
Azure Resource Manager based deployment #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bruinbrown
wants to merge
6
commits into
mbraceproject:master
Choose a base branch
from
CompositionalIT:cit/master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c83a4a4
Initial work on introducing ARM template support.
isaacabraham 72d9315
Further work on automated GH release of Azure Resource Manager
bruinbrown db60f0f
Added in Azure Resource Manager deployment code into build scripts
bruinbrown 7452e4f
Reset organisation names in build script and moved template file to s…
bruinbrown 660e9f3
Updated README.md
bruinbrown 6c81fc2
Azure worker zip file contents are now listed assembly per line
bruinbrown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # MBrace Deployment with Azure Resource Manager | ||
| Deploy an MBrace cluster to Azure as an App Service webjob along with all of the required additional Azure dependencies. | ||
|
|
||
| ## How to use | ||
| 1. Open up a Powershell window. | ||
| 2. CD to this directory. | ||
| 3. Execute the following commands: | ||
|
|
||
| ```lang=powershell | ||
| ## Logs into Azure using your credentials - no need for pub setting | ||
| Login-AzureRmAccount | ||
|
|
||
| ## Create a "resource group" for the cluster, called MyCluster | ||
| New-AzureRmResourceGroup -Name MyCluster -Location "North Europe" | ||
|
|
||
| 4. You will notice the output of this operation will contain the Service Bus and Storage Account keys - these can be used to connect to the cluster. | ||
|
|
||
| 5. You can easily fine tune the process as follows: | ||
|
|
||
| ## Optional, if you have multiple subscriptions | ||
| Set-AzureRmContext -SubscriptionName "My Subscription" | ||
|
|
||
| ## Create an 'small' MBrace cluster called MyCluster | ||
| New-AzureRmResourceGroupDeployment -ResourceGroupName MyCluster -TemplateFile .\azuredeploy.json -TemplateParameterFile "small-cluster.json" | ||
|
|
||
| ## Resize the cluster to a 'medium' sized cluster (2 nodes) | ||
| New-AzureRmResourceGroupDeployment -ResourceGroupName MyCluster -TemplateFile .\azuredeploy.json -TemplateParameterFile "medium-cluster.json" | ||
|
|
||
| ## Manually configure the cluster size to 8 large nodes (S3 = large) | ||
| New-AzureRmResourceGroupDeployment -ResourceGroupName MyCluster -TemplateFile .\azuredeploy.json -clusterSize 8 -nodeSize S3 | ||
|
|
||
| ## Destroy the cluster | ||
| Remove-AzureRmResourceGroup -Name "MyCluster" | ||
| ``` | ||
|
|
||
| ## Benefits over Cloud Service deployment | ||
| * Rapid provisioning / deprovisioning | ||
| * Code-free - no requirements for MBrace to use MAML to provision a cluster | ||
| * Simpler model for cluster provisioning with ready-made "small" "medium" and "large" cluster parameter files. | ||
| * Built in Azure diagnostics / charting within the Portal | ||
| * Fully supported by Microsoft going forwards | ||
| * Easier management - a single MBrace Worker executable / package that is accessible over HTTP can function across | ||
| all node sizes, unlike Cloud Services. Packages are simple zip files - no need to create cspackages. | ||
|
|
||
| ## Restrictions | ||
| * Requires PowerShell currently. This could be removed using the .NET ARM SDK | ||
| * As this implementation of MBrace runs in a web job in the Azure App Service, it does not have admin privileges. Therefore, it cannot retrieve PerfMon | ||
| counters for the purposes of metrics e.g. ``ShowWorkers()``. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| { | ||
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "alwaysOn": { | ||
| "type": "bool", | ||
| "defaultValue": true | ||
| }, | ||
| "nodeSize": { | ||
| "type": "string", | ||
| "defaultValue": "F1", | ||
| "allowedValues": [ | ||
| "F1", | ||
| "D1", | ||
| "B1", | ||
| "B2", | ||
| "B3", | ||
| "S1", | ||
| "S2", | ||
| "S3", | ||
| "P1", | ||
| "P2", | ||
| "P3", | ||
| "P4" | ||
| ], | ||
| "metadata": { | ||
| "description": "The size of each node. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" | ||
| } | ||
| }, | ||
| "clusterSize": { | ||
| "type": "int", | ||
| "defaultValue": 1, | ||
| "minValue": 1, | ||
| "metadata": { | ||
| "description": "The number of nodes in a cluster." | ||
| } | ||
| } | ||
| }, | ||
| "variables": { | ||
| "farmName": "[concat('mbfarm-', uniqueString(resourceGroup().id))]", | ||
| "serverFarmId": "[concat('Microsoft.Web/serverfarms/', variables('farmName'))]", | ||
| "storageAccount": "[concat('mbstorage', uniqueString(resourceGroup().id))]", | ||
| "serviceBus": "[concat('mbmsg', uniqueString(resourceGroup().id))]", | ||
| "serviceBusAuthRule": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', variables('serviceBus'), 'RootManageSharedAccessKey')]", | ||
| "webappName": "[concat('mbapp-', uniqueString(resourceGroup().id))]" | ||
| }, | ||
| "resources": [ | ||
| { | ||
| "name": "[variables('storageAccount')]", | ||
| "type": "Microsoft.Storage/storageAccounts", | ||
| "location": "[resourceGroup().location]", | ||
| "apiVersion": "2015-06-15", | ||
| "dependsOn": [], | ||
| "tags": { | ||
| "displayName": "Storage Account" | ||
| }, | ||
| "properties": { | ||
| "accountType": "Standard_LRS" | ||
| } | ||
| }, | ||
| { | ||
| "name": "[variables('serviceBus')]", | ||
| "type": "Microsoft.ServiceBus/namespaces", | ||
| "location": "[resourceGroup().location]", | ||
| "apiVersion": "2015-08-01", | ||
| "dependsOn": [], | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "Microsoft.Web/serverfarms", | ||
| "name": "[variables('farmName')]", | ||
| "apiVersion": "2015-08-01", | ||
| "location": "[resourceGroup().location]", | ||
| "tags": { | ||
| "displayName": "Service Farm" | ||
| }, | ||
| "sku": { | ||
| "name": "[parameters('nodeSize')]", | ||
| "capacity": "[parameters('clusterSize')]" | ||
| }, | ||
| "properties": { | ||
| "name": "[variables('farmName')]" | ||
| } | ||
| }, | ||
| { | ||
| "name": "[variables('webappName')]", | ||
| "type": "Microsoft.Web/sites", | ||
| "location": "[resourceGroup().location]", | ||
| "apiVersion": "2015-08-01", | ||
| "dependsOn": [ | ||
| "[variables('serverFarmId')]", | ||
| "[concat('Microsoft.ServiceBus/namespaces/', variables('serviceBus'))]", | ||
| "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccount'))]" | ||
| ], | ||
| "tags": { | ||
| "[concat('hidden-related:', resourceGroup().id, variables('serverFarmId'))]": "Resource", | ||
| "displayName": "MBraceWorker" | ||
| }, | ||
| "properties": { | ||
| "name": "[variables('webappName')]", | ||
| "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', variables('farmName'))]", | ||
| "siteConfig": { | ||
| "AlwaysOn": "[parameters('alwaysOn')]" | ||
| } | ||
| }, | ||
| "resources": [ | ||
| { | ||
| "name": "appsettings", | ||
| "apiVersion": "2015-08-01", | ||
| "type": "config", | ||
| "properties": { | ||
| "storage connection string": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]", | ||
| "service bus connection string": "[listkeys(variables('serviceBusAuthRule'), '2015-08-01').primaryConnectionString]" | ||
| }, | ||
| "tags": { | ||
| "displayName": "MBraceWorkerSettings" | ||
| }, | ||
| "dependsOn": [ | ||
| "[concat('Microsoft.Web/sites/', variables('webappName'))]" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "MSDeploy", | ||
| "type": "extensions", | ||
| "location": "[resourceGroup().location]", | ||
| "apiVersion": "2015-08-01", | ||
| "dependsOn": [ | ||
| "[concat('Microsoft.Web/sites/', variables('webappName'))]" | ||
| ], | ||
| "tags": { | ||
| "displayName": "webdeploy" | ||
| }, | ||
| "properties": { | ||
| "packageUri": "https://isaac.blob.core.windows.net/data/mbraceworker.zip", | ||
| "dbType": "None", | ||
| "connectionString": "" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "outputs": { | ||
| "storageConnectionString": { | ||
| "type": "string", | ||
| "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]" | ||
| }, | ||
| "serviceBusConnectionString": { | ||
| "type": "string", | ||
| "value": "[listkeys(variables('serviceBusAuthRule'), '2015-08-01').primaryConnectionString]" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "nodeSize": { "value": "S3" }, | ||
| "clusterSize": { "value": 4 } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "nodeSize": { "value": "B2" }, | ||
| "clusterSize": { "value": 3 } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "nodeSize": { "value": "B1" }, | ||
| "clusterSize": { "value": 1 } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "nodeSize": { "value": "F1" }, | ||
| "clusterSize": { "value": 1 }, | ||
| "alwaysOn": { "value": false } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format one-file-per-line so it's easier to see what's in the zip?
I suppose there's no other way to get this list of files....?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is, we could scrape the bin directory but we'd end up with assemblies which aren't really necessary like all of the Azure management libraries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is an easier way to maintain the blacklist of the files that we don't want and subtract that from the set of all files?