From 1060c5e6deb7ecbc229e5c4aa4b3c099b2d69a4d Mon Sep 17 00:00:00 2001 From: gcrowell vch ds Date: Tue, 2 May 2017 13:26:54 -0700 Subject: [PATCH] eden param changes --- .../deploy_dsc/make_file.ps1 | 1 - .../deploy_shared/deploy.ps1 | 22 +++++++------- .../azuredeploy_subnet.parameters.json | 4 +-- .../azuredeploy_vms.parameters.json | 14 ++++----- .../deploy_workload/deploy_subnet.ps1 | 4 +-- .../deploy_workload/deploy_vms.ps1 | 5 +--- powershell_utils/GetAvailableVmImages.ps1 | 30 +++++++++---------- powershell_utils/StopAllVms/Stop-AllVms.ps1 | 2 +- 8 files changed, 39 insertions(+), 43 deletions(-) diff --git a/json_deployment_templates/deploy_dsc/make_file.ps1 b/json_deployment_templates/deploy_dsc/make_file.ps1 index da78199..ad2962c 100644 --- a/json_deployment_templates/deploy_dsc/make_file.ps1 +++ b/json_deployment_templates/deploy_dsc/make_file.ps1 @@ -5,6 +5,5 @@ Configuration MakeFile { Ensure = "Present" Contents = 'Hello World!' } - } } \ No newline at end of file diff --git a/json_deployment_templates/deploy_shared/deploy.ps1 b/json_deployment_templates/deploy_shared/deploy.ps1 index cd50bf8..deb713a 100644 --- a/json_deployment_templates/deploy_shared/deploy.ps1 +++ b/json_deployment_templates/deploy_shared/deploy.ps1 @@ -7,20 +7,20 @@ $resource_group_name = "vchds-sp-test-rg" # Azure login; only need to login once per powershell session -Login-AzureRmAccount +# Login-AzureRmAccount # # create new resource group $location = "canadacentral" -New-AzureRmResourceGroup -Name $resource_group_name -Location $location - -# deploy resources declared in $template_path -$template_path = "azuredeploy_vnet.json" -$parameter_path = "azuredeploy_vnet.parameters.json" -$deployment_name = "vnetDeployment" -Write-Host ("Testing deployment of template:`n`t{0}" -f $template_path) -Test-AzureRmResourceGroupDeployment -ResourceGroupName $resource_group_name -TemplateFile $template_path -TemplateParameterFile $parameter_path -Write-Host ("Deploying of template:`n`t{0}" -f $template_path) -New-AzureRmResourceGroupDeployment -Name $deployment_name -ResourceGroupName $resource_group_name -TemplateFile $template_path -TemplateParameterFile $parameter_path +# New-AzureRmResourceGroup -Name $resource_group_name -Location $location + +# # deploy resources declared in $template_path +# $template_path = "azuredeploy_vnet.json" +# $parameter_path = "azuredeploy_vnet.parameters.json" +# $deployment_name = "vnetDeployment" +# Write-Host ("Testing deployment of template:`n`t{0}" -f $template_path) +# Test-AzureRmResourceGroupDeployment -ResourceGroupName $resource_group_name -TemplateFile $template_path -TemplateParameterFile $parameter_path +# Write-Host ("Deploying of template:`n`t{0}" -f $template_path) +# New-AzureRmResourceGroupDeployment -Name $deployment_name -ResourceGroupName $resource_group_name -TemplateFile $template_path -TemplateParameterFile $parameter_path # deploy resources declared in $template_path $template_path = "azuredeploy_storage.json" diff --git a/json_deployment_templates/deploy_workload/azuredeploy_subnet.parameters.json b/json_deployment_templates/deploy_workload/azuredeploy_subnet.parameters.json index c0c0492..c768ca2 100644 --- a/json_deployment_templates/deploy_workload/azuredeploy_subnet.parameters.json +++ b/json_deployment_templates/deploy_workload/azuredeploy_subnet.parameters.json @@ -3,14 +3,14 @@ "contentVersion": "1.0.0.0", "parameters": { "virtualNetworkName": { - "value": "vchdsVNET", + "value": "vchds-sp-test-vnet", "metadata": { "description": "assumes already exists (eg by azuredeploy_shared.json)" } }, "subnetName": { - "value": "spsubnet" + "value": "sp-subnet" }, "addressStub": { "value": "10.0.1." diff --git a/json_deployment_templates/deploy_workload/azuredeploy_vms.parameters.json b/json_deployment_templates/deploy_workload/azuredeploy_vms.parameters.json index a3f19da..27f02fb 100644 --- a/json_deployment_templates/deploy_workload/azuredeploy_vms.parameters.json +++ b/json_deployment_templates/deploy_workload/azuredeploy_vms.parameters.json @@ -3,26 +3,26 @@ "contentVersion": "1.0.0.0", "parameters": { "storageAccountName": { - "value": "vchdsstorageaccountwork", + "value": "vchdsspteststorage", "metadata": { "description": "assumes already exists (eg by azuredeploy_shared.json)" } }, "virtualNetworkName": { - "value": "vchdsVNET", + "value": "vchds-sp-test-vnet", "metadata": { "description": "assumes already exists (eg by azuredeploy_shared.json)" } }, "subnetName": { - "value": "jsonjoiner", + "value": "sp-subnet", "metadata": { "description": "assumes already exists (eg by azuredeploy_subnet.json)" } }, "addressStub": { - "value": "10.0.2.", + "value": "10.0.1.", "metadata": { "description": "assumes already exists (eg by azuredeploy_subnet.json)" } @@ -43,15 +43,15 @@ "value": { "publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", - "sku": "2012-R2-Datacenter", + "sku": "2008-R2-SP1", "version": "latest" } }, "vmCount": { - "value": 3 + "value": 4 }, "vmSize": { - "value": "Standard_DS13_v2" + "value": "Standard_DS3_v2" } } } \ No newline at end of file diff --git a/json_deployment_templates/deploy_workload/deploy_subnet.ps1 b/json_deployment_templates/deploy_workload/deploy_subnet.ps1 index 451c589..35806e2 100644 --- a/json_deployment_templates/deploy_workload/deploy_subnet.ps1 +++ b/json_deployment_templates/deploy_workload/deploy_subnet.ps1 @@ -3,11 +3,11 @@ # set current working directory Set-Location -Path $PSScriptRoot -$resource_group_name = "vchdsrgwork" +$resource_group_name = "vchds-sp-test-rg" $location = "canadacentral" # Azure login; only need to login once per powershell session -# Login-AzureRmAccount +Login-AzureRmAccount # deploy resources declared in $template_path $template_path = "azuredeploy_subnet.json" diff --git a/json_deployment_templates/deploy_workload/deploy_vms.ps1 b/json_deployment_templates/deploy_workload/deploy_vms.ps1 index 261d903..34910bc 100644 --- a/json_deployment_templates/deploy_workload/deploy_vms.ps1 +++ b/json_deployment_templates/deploy_workload/deploy_vms.ps1 @@ -1,9 +1,6 @@ -# https://github.com/VCHDecisionSupport/azure-quickstart-templates/tree/master/sharepoint-three-vm -# https://github.com/Azure/azure-quickstart-templates/blob/master/201-vm-dynamic-data-disks-selection/azuredeploy.json - # set current working directory Set-Location -Path $PSScriptRoot -$resource_group_name = "addcquickstart" +$resource_group_name = "vchds-sp-test-rg" $location = "canadacentral" # Azure login; only need to login once per powershell session diff --git a/powershell_utils/GetAvailableVmImages.ps1 b/powershell_utils/GetAvailableVmImages.ps1 index e2fe027..44aa95f 100644 --- a/powershell_utils/GetAvailableVmImages.ps1 +++ b/powershell_utils/GetAvailableVmImages.ps1 @@ -16,24 +16,23 @@ If($IsSignedIn -eq $false) } -$env:dataCentre = "canadacentral" - +$location = "canadacentral" # VM Sizes -Get-AzureRmVMSize -Location $env:dataCentre | Format-Table +Get-AzureRmVMSize -Location $location | Format-Table # All Providers -Get-AzureRmResourceProvider -Location $env:dataCentre -ListAvailable +Get-AzureRmResourceProvider -Location $location -ListAvailable # Microsoft Publishers -(Get-AzureRmVMImagePublisher -Location $env:dataCentre| Where-Object {$_.PublisherName -like '*microsoft*' }).PublisherName +(Get-AzureRmVMImagePublisher -Location $location| Where-Object {$_.PublisherName -like '*microsoft*' }).PublisherName # Windows Server + R Server images $publisherName = "MicrosoftRServer" -$offers = (Get-AzureRmVMImageOffer -Location $env:dataCentre -PublisherName $publisherName).Offer +$offers = (Get-AzureRmVMImageOffer -Location $location -PublisherName $publisherName).Offer $skus = New-Object System.Collections.ArrayList foreach($offer in $offers) { - $offerSkus = Get-AzureRmVMImageSku -Location $env:dataCentre -PublisherName $PublisherName -Offer $offer + $offerSkus = Get-AzureRmVMImageSku -Location $location -PublisherName $PublisherName -Offer $offer foreach($sku in $offerSkus) { $i = $skus.Add($sku) @@ -43,11 +42,11 @@ $skus | Format-Table # Windows Server + SQL Server images $publisherName = "MicrosoftSQLServer" -$offers = (Get-AzureRmVMImageOffer -Location $env:dataCentre -PublisherName $publisherName).Offer +$offers = (Get-AzureRmVMImageOffer -Location $location -PublisherName $publisherName).Offer $skus = New-Object System.Collections.ArrayList foreach($offer in $offers) { - $offerSkus = Get-AzureRmVMImageSku -Location $env:dataCentre -PublisherName $PublisherName -Offer $offer + $offerSkus = Get-AzureRmVMImageSku -Location $location -PublisherName $PublisherName -Offer $offer foreach($sku in $offerSkus) { $i = $skus.Add($sku) @@ -55,12 +54,13 @@ foreach($offer in $offers) } $skus | Format-Table +# Windows Server images +$publisherName = "MicrosoftWindowsServer" +$offer = "WindowsServer" +Get-AzureRmVMImageSku -Location $location -PublisherName $PublisherName -Offer $offer | Format-Table + # Share Point images $publisherName = "MicrosoftSharePoint" -$offer = (Get-AzureRmVMImageOffer -Location $env:dataCentre -PublisherName $publisherName).Offer -Get-AzureRmVMImageSku -Location $env:dataCentre -PublisherName $PublisherName -Offer $offer | Format-Table +$offer = (Get-AzureRmVMImageOffer -Location $location -PublisherName $publisherName).Offer +Get-AzureRmVMImageSku -Location $location -PublisherName $PublisherName -Offer $offer | Format-Table -# Windows Server images -$publisherName = "MicrosoftWindowsServer" -$offer = (Get-AzureRmVMImageOffer -Location $env:dataCentre -PublisherName $publisherName).Offer -Get-AzureRmVMImageSku -Location $env:dataCentre -PublisherName $PublisherName -Offer $offer | Format-Table diff --git a/powershell_utils/StopAllVms/Stop-AllVms.ps1 b/powershell_utils/StopAllVms/Stop-AllVms.ps1 index df3f335..b3f9cc9 100644 --- a/powershell_utils/StopAllVms/Stop-AllVms.ps1 +++ b/powershell_utils/StopAllVms/Stop-AllVms.ps1 @@ -5,7 +5,7 @@ # Set-Location -Path $PSScriptRoot -# Login-AzureRmAccount +Login-AzureRmAccount $SkipList = $null, $null Write-Host ("Geting list of virtual machines in subscription...`n")