Merge branch 'fix-custom-image' of https://github.com/arroyc/azure-slave-plugin into arroyc-fix-custom-image

This commit is contained in:
Claudiu Guiman 2016-11-28 13:54:05 -08:00
commit 830de58bbe
3 changed files with 12 additions and 23 deletions

View File

@ -342,12 +342,21 @@ public class AzureVMManagementServiceDelegate {
final StorageManagementClient storageClient = ServiceDelegateHelper.getStorageManagementClient(config);
rmClient.getResourceGroupsOperations().createOrUpdate(resourceGroupName, new ResourceGroup(location));
<<<<<<< HEAD
=======
try
{
>>>>>>> 17b8539365c3ff9c006753579036ecd4440ea752
StorageAccountCreateParameters createParams = new StorageAccountCreateParameters();
createParams.setLocation(location);
createParams.setAccountType(AccountType.StandardLRS);
storageClient.getStorageAccountsOperations().create(resourceGroupName, targetStorageAccount, createParams);
}catch (Exception e)
{
LOGGER.log(Level.INFO, e.getMessage());
}
// Get the storage account name and key
String storageAccountKey = storageClient.getStorageAccountsOperations().listKeys(resourceGroupName, targetStorageAccount)
.getStorageAccountKeys().getKey1();

View File

@ -10,19 +10,10 @@
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
"publicIPAddressType": "Dynamic",
"storageAccountContainerName": "vhds",
"storageAccountContainerName": "[uniqueString(resourceGroup().id, deployment().name)]",
"storageAccountType": "Standard_LRS"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"properties": {
"accountType": "[variables('storageAccountType')]"
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
@ -76,7 +67,6 @@
"count": "[parameters('count')]"
},
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[concat('Microsoft.Network/networkInterfaces/', variables('vmName'), copyIndex(), 'NIC')]"
],
"properties": {

View File

@ -13,7 +13,7 @@
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
"publicIPAddressType": "Dynamic",
"storageAccountContainerName": "vhds",
"storageAccountContainerName": "[uniqueString(resourceGroup().id, deployment().name)]",
"storageAccountType": "Standard_LRS",
"startupScriptURI": "",
"startupScriptName": "",
@ -21,15 +21,6 @@
"clientSecrets": []
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"properties": {
"accountType": "[variables('storageAccountType')]"
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
@ -83,7 +74,6 @@
"count": "[parameters('count')]"
},
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[concat('Microsoft.Network/networkInterfaces/', variables('vmName'), copyIndex(), 'NIC')]"
],
"properties": {