From 2808906208faf57126479bba436b6033f5d28361 Mon Sep 17 00:00:00 2001 From: Lara Rubbelke Date: Sun, 29 Jun 2014 22:41:26 -0500 Subject: [PATCH] Removed unnecessary files --- PoSH/New Folder/0_Create_VM - Copy.ps1 | 163 ------------ PoSH/New Folder/0_Create_VMold.ps1 | 163 ------------ PoSH/New Folder/4_Cluster_Nodes_s.ps1 | 232 ------------------ PoSH/New Folder/ClusterConfig Sample 2.xml | 78 ------ PoSH/New Folder/ClusterConfig Sample lara.xml | 78 ------ .../Execute Scripts v3 Config test.ps1 | 120 --------- PoSH/New Folder/azure.err | 13 - PoSH/New Folder/jobs test.ps1 | 12 - PoSH/New Folder/testloop.ps1 | 76 ------ PoSH/New Folder/testloop2.ps1 | 81 ------ PoSH/New Folder/testloopsing.ps1 | 72 ------ 11 files changed, 1088 deletions(-) delete mode 100644 PoSH/New Folder/0_Create_VM - Copy.ps1 delete mode 100644 PoSH/New Folder/0_Create_VMold.ps1 delete mode 100644 PoSH/New Folder/4_Cluster_Nodes_s.ps1 delete mode 100644 PoSH/New Folder/ClusterConfig Sample 2.xml delete mode 100644 PoSH/New Folder/ClusterConfig Sample lara.xml delete mode 100644 PoSH/New Folder/Execute Scripts v3 Config test.ps1 delete mode 100644 PoSH/New Folder/azure.err delete mode 100644 PoSH/New Folder/jobs test.ps1 delete mode 100644 PoSH/New Folder/testloop.ps1 delete mode 100644 PoSH/New Folder/testloop2.ps1 delete mode 100644 PoSH/New Folder/testloopsing.ps1 diff --git a/PoSH/New Folder/0_Create_VM - Copy.ps1 b/PoSH/New Folder/0_Create_VM - Copy.ps1 deleted file mode 100644 index 152370f..0000000 --- a/PoSH/New Folder/0_Create_VM - Copy.ps1 +++ /dev/null @@ -1,163 +0,0 @@ -<############################################################################################################# -Distributed Data Platform on Azure Virtual Machines - -.SYNOPSIS - Creates a Linux Virtual Machine for use with distributed data platform deployments on Azure virtual machines. -.DESCRIPTION - Used to automate the creation of Windows Azure VMs to support the deploying distributed data platforms - on Windows Azure Virtual Machines. This script will be run from master scripts. - - The virtual machines will be named based on a prefix. The VMs are distributed evenly across the cloud services. - Each VM will have attached data disks that are written to a storage account defined in the variable array. - All OS disks are written to the default storage account where the image is stored. - -.EXAMPLE - .\0_Create-VM.ps1 -imageName "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-saucy-13_10-amd64-server-20140119-en-us-30GB" ` - -adminUserName "clusteradmin" ` - -adminPassword "Password.1" ` - -instanceSize "ExtraLarge" ` - -diskSizeInGB 100 ` - -vmName "clusternode" ` - -affinityGroupName "clusterag" ` - -virtualSubnetname "App" ` - -virtualNetworkName "DDP-Network" ` - -storageAccountName "clustersa" ` - -$storageAccountNameDisk "clustersa1" ` - -cloudServiceName "clusternode" ` - -numofDisks 2 - -subscriptionName "MySubscription" - -############################################################################################################> - - -param( - # The name of the image. Can be wildcard pattern. - [Parameter(Mandatory = $true)] - [string]$imageName, - - # The administrator username. - [Parameter(Mandatory = $true)] - [string]$adminUserName, - - # The administrator password. - [Parameter(Mandatory = $true)] - [string]$adminPassword, - - # The size of the instances. - [Parameter(Mandatory = $true)] - [string]$instanceSize, - - # The size of the disk(s). - [Parameter(Mandatory = $true)] - [int]$diskSizeInGB, - - # The name of the vm. - [Parameter(Mandatory = $true)] - [string]$vmName, - - # The name of the affinity group. - [Parameter(Mandatory = $true)] - [string]$affinityGroupName, - - # The name of the virtual network. - [Parameter(Mandatory = $true)] - [string]$virtualNetworkName, - - # The name of the virtual subnet. - [Parameter(Mandatory = $true)] - [string]$virtualSubnetname, - - # The name of the storage account. - [Parameter(Mandatory = $true)] - [string]$storageAccountName, - - # The name of the storage account for data disks. - [Parameter(Mandatory = $true)] - [string]$storageAccountNameDisk, - - # The name of the cloud service. - [Parameter(Mandatory = $true)] - [string]$cloudServiceName, - - # Number of data disks to add to each virtual machine - [Parameter(Mandatory = $true)] - [int]$numOfDisks, - - # Subscription name for creating objects - [Parameter(Mandatory = $true)] - [String]$subscriptionName - ) - -########################################################################################################### -## Select the subscription -## Set the default storage account -########################################################################################################### -$subscriptionInfo = Get-AzureSubscription -SubscriptionName $subscriptionName -$subName = $subscriptionInfo | %{ $_.SubscriptionName } - -Set-AzureSubscription -SubscriptionName $subName –CurrentStorageAccount $storageAccountName -Select-AzureSubscription -SubscriptionName $subName -Current - - -########################################################################################################### -# Create overall configuration -## Set the VM size, name and general configuration -## Attach disks -########################################################################################################### -$vmConfig = New-AzureVMConfig -Name $vmName -InstanceSize $instanceSize -ImageName $imageName - -$vmDetails = Add-AzureProvisioningConfig -Linux ` - -LinuxUser $adminUserName ` - -Password $adminPassword ` - -VM $vmConfig - - # Add disks to the configuration - for ($index = 0; $index -lt $numOfDisks; $index++) - { - $diskLabel = "$vmName$index" - $vmConfig = $vmConfig | Add-AzureDataDisk -CreateNew ` - -DiskSizeInGB $diskSizeInGB ` - -DiskLabel $diskLabel ` - -HostCaching None ` - -LUN $index ` - -MediaLocation "https://$storageAccountNameDisk.blob.core.windows.net/vhd/$vmName$index.vhd" - } - -<# -# Sets SSH endpoint to port 22 passthrough -Remove-AzureEndpoint "SSH" -VM $vmConfig -Add-AzureEndpoint -Protocol tcp ` - -PublicPort 22 ` - -LocalPort 22 -Name "SSH" -VM $vmConfig -#> - -# Adds the subnet to the configuration -Set-AzureSubnet $virtualSubnetname -VM $vmConfig - -########################################################################################################### -# Create the virtual machine -## If the cloud service exists, create the VM in the existing service -## If the cloud service doesn't exist, create the cloud service and the VM -########################################################################################################### -if (Test-AzureName -Service $cloudServiceName) -{$result = New-AzureVM -ServiceName $cloudServiceName ` - -VMs @($vmDetails) ` - -VNetName $virtualNetworkName ` - #-ErrorVariable creationError - } -else -{$result = New-AzureVM -ServiceName $cloudServiceName ` - -VMs @($vmDetails) ` - -AffinityGroup $affinityGroupName ` - -VNetName $virtualNetworkName ` - #-ErrorVariable creationError - } - -if($?) -{ - Write-Output "Service $cloudServiceName was created successfully. Result is $($result.OperationDescription) $vmName." -} -else -{ - throw "Service $cloudServiceName could not be created - Error is: $($creationError[0])" -} diff --git a/PoSH/New Folder/0_Create_VMold.ps1 b/PoSH/New Folder/0_Create_VMold.ps1 deleted file mode 100644 index 152370f..0000000 --- a/PoSH/New Folder/0_Create_VMold.ps1 +++ /dev/null @@ -1,163 +0,0 @@ -<############################################################################################################# -Distributed Data Platform on Azure Virtual Machines - -.SYNOPSIS - Creates a Linux Virtual Machine for use with distributed data platform deployments on Azure virtual machines. -.DESCRIPTION - Used to automate the creation of Windows Azure VMs to support the deploying distributed data platforms - on Windows Azure Virtual Machines. This script will be run from master scripts. - - The virtual machines will be named based on a prefix. The VMs are distributed evenly across the cloud services. - Each VM will have attached data disks that are written to a storage account defined in the variable array. - All OS disks are written to the default storage account where the image is stored. - -.EXAMPLE - .\0_Create-VM.ps1 -imageName "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-saucy-13_10-amd64-server-20140119-en-us-30GB" ` - -adminUserName "clusteradmin" ` - -adminPassword "Password.1" ` - -instanceSize "ExtraLarge" ` - -diskSizeInGB 100 ` - -vmName "clusternode" ` - -affinityGroupName "clusterag" ` - -virtualSubnetname "App" ` - -virtualNetworkName "DDP-Network" ` - -storageAccountName "clustersa" ` - -$storageAccountNameDisk "clustersa1" ` - -cloudServiceName "clusternode" ` - -numofDisks 2 - -subscriptionName "MySubscription" - -############################################################################################################> - - -param( - # The name of the image. Can be wildcard pattern. - [Parameter(Mandatory = $true)] - [string]$imageName, - - # The administrator username. - [Parameter(Mandatory = $true)] - [string]$adminUserName, - - # The administrator password. - [Parameter(Mandatory = $true)] - [string]$adminPassword, - - # The size of the instances. - [Parameter(Mandatory = $true)] - [string]$instanceSize, - - # The size of the disk(s). - [Parameter(Mandatory = $true)] - [int]$diskSizeInGB, - - # The name of the vm. - [Parameter(Mandatory = $true)] - [string]$vmName, - - # The name of the affinity group. - [Parameter(Mandatory = $true)] - [string]$affinityGroupName, - - # The name of the virtual network. - [Parameter(Mandatory = $true)] - [string]$virtualNetworkName, - - # The name of the virtual subnet. - [Parameter(Mandatory = $true)] - [string]$virtualSubnetname, - - # The name of the storage account. - [Parameter(Mandatory = $true)] - [string]$storageAccountName, - - # The name of the storage account for data disks. - [Parameter(Mandatory = $true)] - [string]$storageAccountNameDisk, - - # The name of the cloud service. - [Parameter(Mandatory = $true)] - [string]$cloudServiceName, - - # Number of data disks to add to each virtual machine - [Parameter(Mandatory = $true)] - [int]$numOfDisks, - - # Subscription name for creating objects - [Parameter(Mandatory = $true)] - [String]$subscriptionName - ) - -########################################################################################################### -## Select the subscription -## Set the default storage account -########################################################################################################### -$subscriptionInfo = Get-AzureSubscription -SubscriptionName $subscriptionName -$subName = $subscriptionInfo | %{ $_.SubscriptionName } - -Set-AzureSubscription -SubscriptionName $subName –CurrentStorageAccount $storageAccountName -Select-AzureSubscription -SubscriptionName $subName -Current - - -########################################################################################################### -# Create overall configuration -## Set the VM size, name and general configuration -## Attach disks -########################################################################################################### -$vmConfig = New-AzureVMConfig -Name $vmName -InstanceSize $instanceSize -ImageName $imageName - -$vmDetails = Add-AzureProvisioningConfig -Linux ` - -LinuxUser $adminUserName ` - -Password $adminPassword ` - -VM $vmConfig - - # Add disks to the configuration - for ($index = 0; $index -lt $numOfDisks; $index++) - { - $diskLabel = "$vmName$index" - $vmConfig = $vmConfig | Add-AzureDataDisk -CreateNew ` - -DiskSizeInGB $diskSizeInGB ` - -DiskLabel $diskLabel ` - -HostCaching None ` - -LUN $index ` - -MediaLocation "https://$storageAccountNameDisk.blob.core.windows.net/vhd/$vmName$index.vhd" - } - -<# -# Sets SSH endpoint to port 22 passthrough -Remove-AzureEndpoint "SSH" -VM $vmConfig -Add-AzureEndpoint -Protocol tcp ` - -PublicPort 22 ` - -LocalPort 22 -Name "SSH" -VM $vmConfig -#> - -# Adds the subnet to the configuration -Set-AzureSubnet $virtualSubnetname -VM $vmConfig - -########################################################################################################### -# Create the virtual machine -## If the cloud service exists, create the VM in the existing service -## If the cloud service doesn't exist, create the cloud service and the VM -########################################################################################################### -if (Test-AzureName -Service $cloudServiceName) -{$result = New-AzureVM -ServiceName $cloudServiceName ` - -VMs @($vmDetails) ` - -VNetName $virtualNetworkName ` - #-ErrorVariable creationError - } -else -{$result = New-AzureVM -ServiceName $cloudServiceName ` - -VMs @($vmDetails) ` - -AffinityGroup $affinityGroupName ` - -VNetName $virtualNetworkName ` - #-ErrorVariable creationError - } - -if($?) -{ - Write-Output "Service $cloudServiceName was created successfully. Result is $($result.OperationDescription) $vmName." -} -else -{ - throw "Service $cloudServiceName could not be created - Error is: $($creationError[0])" -} diff --git a/PoSH/New Folder/4_Cluster_Nodes_s.ps1 b/PoSH/New Folder/4_Cluster_Nodes_s.ps1 deleted file mode 100644 index 2932d17..0000000 --- a/PoSH/New Folder/4_Cluster_Nodes_s.ps1 +++ /dev/null @@ -1,232 +0,0 @@ -<############################################################################################################# -Distributed Data Platform on Azure Virtual Machines - -.SYNOPSIS - Create the Management node for distributed data platform deployments on Azure virtual machines. The script will create the virtual network, - storage accounts, and affinity groups. - - The virtual machines will be named based on a prefix. - -.EXAMPLE - .\3_Cluster_Nodes.ps1 -imageName "clusternodec" ` - -adminUserName "clusteradmin" ` - -adminPassword "Password.1" ` - -instanceSize "ExtraLarge" ` - -diskSizeInGB 0 ` - -numofDisks 0 ` - -vmNamePrefix "clusternode" ` - -cloudServicePrefix "clusternode" ` - -numCloudServices 3 ` - -numNodes 6 ` - -affinityGroupName "clusterag" ` - -virtualNetworkName "DDP-Network" ` - -virtualSubnetname "App" ` - -storageAccountName "clustersa" ` - -storageAccountList "clustersa1", "clustersa2", "clustersa3", "clustersa4" ` - -hostsfile ".\hosts.txt" ` - -hostscript ".\hostscript.sh" - -subscriptionName "MySubscription" - -############################################################################################################> - -param( - # The name of the image used to create the vms. - [Parameter(Mandatory = $true)] - [string]$imageName, - - # The administrator username. - [Parameter(Mandatory = $true)] - [string]$adminUserName, - - # The administrator password. - [Parameter(Mandatory = $true)] - [string]$adminPassword, - - # The size of the instances. - [Parameter(Mandatory = $true)] - [string]$instanceSize, - - # The size of the disk(s). - [Parameter(Mandatory = $true)] - [int]$diskSizeInGB, - - # Number of data disks to add to each virtual machine - [Parameter(Mandatory = $true)] - [int]$numOfDisks, - - # The name of the vm. - [Parameter(Mandatory = $true)] - [string]$vmNamePrefix, - - # The name of the cloud service. - [Parameter(Mandatory = $true)] - [string]$cloudServicePrefix, - - # The name of the cloud service. - [Parameter(Mandatory = $true)] - [int]$numCloudServices, - - # The number of nodes. - [Parameter(Mandatory = $true)] - [string]$numNodes, - - # The name of the affinity group. - [Parameter(Mandatory = $true)] - [string]$affinityGroupName, - - # The name of the virtual network. - [Parameter(Mandatory = $true)] - [string]$virtualNetworkName, - - # The name of the virtual subnet. - [Parameter(Mandatory = $true)] - [string]$virtualSubnetname, - - # The name of the primary storage account. - [Parameter(Mandatory = $true)] - [string]$storageAccountName, - - # The name of the storage accounts for the data disks. - [Parameter(Mandatory = $true)] - [array]$storageAccountList, - - # The location of the hosts file. - [Parameter(Mandatory = $false)] - [string]$hostsfile = ".\hosts.txt", - - # The location of the script to push updates to the cluster nodes. - [Parameter(Mandatory = $false)] - [string]$hostscript = ".\hostscript.sh", - - # Subscription name for creating objects - [Parameter(Mandatory = $true)] - [String]$subscriptionName - ) -########################################################################################################### -## Select the subscription -########################################################################################################### -Select-AzureSubscription -SubscriptionName $subscriptionName - -########################################################################################################### -## Check if the storage accounts exist. If not, create the storage accounts. -## Storage accounts should have been created in the step 1_Management_Node. -########################################################################################################### -get-job | ? {($_.State -ne "Running") -and ($_.State -ne "Blocked")} | remove-job - -$jobs = @() -foreach ($storageAccount in $storageAccountList) - { - - $jobs += Start-Job -FilePath .\0_Create_Storage_Account.ps1 ` - -ArgumentList $affinityGroupName, ` - $storageAccount, ` - $subscriptionName - - Write-Progress -Activity "Submitting storage account for creation" - } -Write-Progress "Submitting storage account for creation" -Completed - -Write-Progress "Waiting for storage account creation jobs to finish..." -PercentComplete -1 -$jobs | Wait-Job | Out-Null -Write-Progress "Waiting for storage account creation jobs to finish..." -Completed - - -########################################################################################################### -## Select the image created in previous step. Image is used to provision -## cluster nodes. -########################################################################################################### -$image = Get-AzureVMImage -ImageName $imageName - - -########################################################################################################### -## Create the virtual machines for the cluster nodes -### Write the hostscript and hosts file -### Set static IP on the VM -### First iteration will create the inital vm in each cloud service. -### First vm in each cloud service will create the cloud service and require longer locks. -########################################################################################################### -$countStorageAccount = $storageAccountList.Length -$countService = 1 -$countVM = 1 -$storageAccountIndex = 0 - -for ($countVM = 1; $countVM -le $numCloudServices; $countVM++) -{ -# if ($countService -gt $numCloudServices) {$countService = 1} - if ($storageAccountIndex -eq $countStorageAccount) {$storageAccountIndex = 0} - - .\0_Create_Cluster_Nodes.ps1 -imageName $imageName ` - -adminUserName $adminUserName ` - -adminPassword $adminPassword ` - -instanceSize $instanceSize ` - -diskSizeInGB $diskSizeInGB ` - -numofDisks $numOfDisks ` - -vmNamePrefix $vmNamePrefix ` - -cloudServicePrefix $cloudServicePrefix ` - -affinityGroupName $affinityGroupName ` - -virtualNetworkName $virtualNetworkName ` - -virtualSubnetname $virtualSubnetname ` - -storageAccountName $storageAccountName ` - -storageAccountList $storageAccountList ` - -hostsfile $hostsfile ` - -hostscript $hostscript ` - -subscriptionName $subscriptionName ` - -countService $countService ` - -countVM $countVM ` - -storageAccountIndex $storageAccountIndex - - $countService++ - $storageAccountIndex++ -} - -########################################################################################################### -## Create the virtual machines for the cluster nodes -### Write the hostscript and hosts file -### Set static IP on the VM -### First iteration will create the inital vm in each cloud service. -### First vm in each cloud service will create the cloud service and require longer locks. -########################################################################################################### -$countStorageAccount = $storageAccountList.Length -$countService = 1 -$countVM = $numCloudServices + 1 -#$storageAccountIndex = 0 - -for ($countVM = 1; $countVM -le $numNodes; $countVM++) -{ - if ($countService -gt $numCloudServices) {$countService = 1} - if ($storageAccountIndex -eq $countStorageAccount) {$storageAccountIndex = 0} - - $jobs += Start-Job -FilePath .\0_Create_Cluster_Nodes.ps1 ` - -ArgumentList $imageName, ` - $adminUserName, ` - $adminPassword, ` - $instanceSize, ` - $diskSizeInGB, ` - $numOfDisks, ` - $vmNamePrefix, ` - $cloudServicePrefix, ` - $affinityGroupName, ` - $virtualNetworkName, ` - $virtualSubnetname, ` - $storageAccountName, ` - $storageAccountList, ` - $hostsfile, ` - $hostscript, ` - $subscriptionName, ` - $countService, ` - $countVM, ` - $storageAccountIndex - - - $countService++ - $storageAccountIndex++ - - Write-Progress -Activity "Submitting virtual machine for creation" -} -Write-Progress "Submitting virtual machine for creation" -Completed - -Write-Progress "Waiting for virtual machine creation jobs to finish..." -PercentComplete -1 -$jobs | Wait-Job | Out-Null -Write-Progress "Waiting for virtual machine creation jobs to finish..." -Completed - - diff --git a/PoSH/New Folder/ClusterConfig Sample 2.xml b/PoSH/New Folder/ClusterConfig Sample 2.xml deleted file mode 100644 index 4a74039..0000000 --- a/PoSH/New Folder/ClusterConfig Sample 2.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - MTC Workshop - - - - - West US - clb0West - Affinity Group DDP Sample - AG for DDP Sample - - - - - - - clb01 - 172.16.0.0 - 17 - App - 172.16.0.0 - 17 - - - - clb0 - - clb001 - clb002 - - - - - clusteradmin - Password.1 - clb0 - clb0 - - - .\hosts.txt - .\hostscript.sh - - - - OpenLogic - A7 - 500 - 2 - 8080 - - - - - OpenLogic - A7 - - - - - clb0c - clb0c - Test 0 Clone - - - - - A5 - 1000 - 4 - clb0 - clb0 - 8 - 2 - - \ No newline at end of file diff --git a/PoSH/New Folder/ClusterConfig Sample lara.xml b/PoSH/New Folder/ClusterConfig Sample lara.xml deleted file mode 100644 index 32efbb8..0000000 --- a/PoSH/New Folder/ClusterConfig Sample lara.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - MTC Workshop - - - - - West US - ddptest3 - Affinity Group DDP Sample - AG for DDP Sample - - - - - - - ddptestv4 - 172.16.0.0 - 17 - App - 172.16.0.0 - 17 - - - - ddptest3 - - ddptest31 - ddptest32 - - - - - clusteradmin - Password.1 - ddptest3a - ddptest3 - - - .\hosts.txt - .\hostscript.sh - - - - OpenLogic - A7 - 100 - 2 - 8080 - - - - - OpenLogic - A7 - - - - - ddptest3ac - ddptest3c - Test 0 Clone - - - - - A7 - 100 - 4 - ddptest3 - ddptest3 - 8 - 2 - - \ No newline at end of file diff --git a/PoSH/New Folder/Execute Scripts v3 Config test.ps1 b/PoSH/New Folder/Execute Scripts v3 Config test.ps1 deleted file mode 100644 index a10458e..0000000 --- a/PoSH/New Folder/Execute Scripts v3 Config test.ps1 +++ /dev/null @@ -1,120 +0,0 @@ -$subscriptionName = "MTC Workshop" -Select-AzureSubscription -SubscriptionName $subscriptionName - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" - -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample lara.xml" - -################################################################################# -## Management Node -################################################################################# -$subscriptionName = "MTC Workshop" -Select-AzureSubscription -SubscriptionName $subscriptionName - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample lara.xml" - -.\1_Management_Node.ps1 -imageName $ddpconfig.Cluster.ManagementNode.galleryimageName ` - -adminUserName $ddpconfig.Cluster.adminUserName ` - -adminPassword $ddpconfig.Cluster.adminPassword` - -instanceSize $ddpconfig.Cluster.ManagementNode.instanceSize` - -diskSizeInGB $ddpconfig.Cluster.ManagementNode.diskSizeInGB ` - -numOfDisks $ddpconfig.Cluster.ManagementNode.numOfDisks ` - -vmNamePrefix $ddpconfig.Cluster.vmNamePrefix ` - -cloudServiceName $ddpconfig.Cluster.cloudServicePrefix ` - -storageAccountName $ddpconfig.Cluster.storageAccountName ` - -storageAccountList $ddpconfig.Cluster.storageAccountList.Name ` - -affinityGroupLocation $ddpconfig.Cluster.affinityGroupLocation ` - -affinityGroupName $ddpconfig.Cluster.affinityGroupName ` - -affinityGroupDescription $ddpconfig.Cluster.affinityGroupDescription ` - -affinityGroupLabel $ddpconfig.Cluster.affinityGroupLabel ` - -virtualNetworkName $ddpconfig.Cluster.virtualNetworkName ` - -virtualNetworkAddressSpace $ddpconfig.Cluster.virtualNetworkAddressSpace ` - -virtualNetworkCIDR $ddpconfig.Cluster.VirtualNetworkCIDR ` - -virtualSubnetname $ddpconfig.Cluster.virtualSubnetname ` - -subnetAddressSpace $ddpconfig.Cluster.SubnetAddressSpace ` - -subnetCIDR $ddpconfig.Cluster.SubnetCIDR ` - -installerPort 7180 ` - -hostscript $ddpconfig.Cluster.hostscript ` - -hostsfile $ddpconfig.Cluster.hostsfile ` - -subscriptionName $ddpconfig.Cluster.SubscriptionName - - -################################################################################# -## Clone Node -## Create the clone node used for generating the data nodes and name nodes. -################################################################################# -$subscriptionName = "MTC Workshop" -Select-AzureSubscription -SubscriptionName $subscriptionName - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample lara.xml" - -.\2_Clone_Node.ps1 -imageName $ddpconfig.Cluster.CloneNode.galleryimageName ` - -adminUserName $ddpconfig.Cluster.adminUserName ` - -adminPassword $ddpconfig.Cluster.adminPassword ` - -instanceSize $ddpconfig.Cluster.CloneNode.instanceSize ` - -diskSizeInGB 0 ` - -numOfDisks 0 ` - -vmNamePrefix $ddpconfig.Cluster.vmNamePrefix ` - -cloudServiceName $ddpconfig.Cluster.cloudServicePrefix ` - -storageAccountName $ddpconfig.Cluster.storageAccountName ` - -affinityGroupName $ddpconfig.Cluster.affinityGroupName ` - -virtualNetworkName $ddpconfig.Cluster.virtualNetworkName ` - -virtualSubnetname $ddpconfig.Cluster.virtualSubnetname ` - -subscriptionName $ddpconfig.Cluster.SubscriptionName - - -################################################################################# -## Manual Updates -################################################################################# -## Before you continue, complete the manual updates from the documentation to prepare the -## cluster nodes. - - -################################################################################# -## Capture the image -################################################################################# -$subscriptionName = "MTC Workshop" -Select-AzureSubscription -SubscriptionName $subscriptionName - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample lara.xml" - -$vmName = $ddpconfig.Cluster.vmNamePrefix + "c" - -.\3_Capture_Image.ps1 -cloudServiceName $ddpconfig.Cluster.cloudServicePrefix ` - -vmName $vmName ` - -imageName $ddpconfig.Cluster.CloneImage.cloneimageName ` - -imageLabel $ddpconfig.Cluster.CloneImage.cloneimageLabel ` - -subscriptionName $ddpconfig.Cluster.SubscriptionName - - -################################################################################# -## Create the worker nodes -################################################################################# -$subscriptionName = "MTC Workshop" -Select-AzureSubscription -SubscriptionName $subscriptionName - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample lara.xml" - -.\4_Cluster_Nodes.ps1 -imageName $ddpconfig.Cluster.CloneImage.cloneimageName ` - -adminUserName $ddpconfig.Cluster.adminUserName ` - -adminPassword $ddpconfig.Cluster.adminPassword ` - -instanceSize $ddpconfig.Cluster.ClusterNodes.instanceSize ` - -diskSizeInGB $ddpconfig.Cluster.ClusterNodes.diskSizeInGB ` - -numOfDisks $ddpconfig.Cluster.ClusterNodes.numOfDisks ` - -vmNamePrefix $ddpconfig.Cluster.ClusterNodes.vmNamePrefix ` - -cloudServicePrefix $ddpconfig.Cluster.ClusterNodes.cloudServicePrefix ` - -numCloudServices $ddpconfig.Cluster.ClusterNodes.numCloudServices ` - -numNodes $ddpconfig.Cluster.ClusterNodes.numNodes ` - -affinityGroupName $ddpconfig.Cluster.affinityGroupName ` - -virtualNetworkName $ddpconfig.Cluster.virtualNetworkName ` - -virtualSubnetname $ddpconfig.Cluster.virtualSubnetname ` - -storageAccountName $ddpconfig.Cluster.storageAccountName ` - -storageAccountList $ddpconfig.Cluster.storageAccountList.Name ` - -hostsfile $ddpconfig.Cluster.hostsfile ` - -hostscript $ddpconfig.Cluster.hostscript ` - -subscriptionName $ddpconfig.Cluster.SubscriptionName - diff --git a/PoSH/New Folder/azure.err b/PoSH/New Folder/azure.err deleted file mode 100644 index 44fab36..0000000 --- a/PoSH/New Folder/azure.err +++ /dev/null @@ -1,13 +0,0 @@ -Sat Jun 28 2014 15:18:21 GMT-0500 (Central Daylight Time): -[Error: Missing attribute value] -Error: Missing attribute value - at XMLFragment.attribute (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\node_modules\xmlbuilder\lib\XMLFragment.js:268:15) - at C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\node_modules\azure\node_modules\azure-mgmt\lib\models\servicemanagementserialize.js:540:35 - at Array.forEach (native) - at ServiceManagementSerialize.buildNetworkConfiguration (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\node_modules\azure\node_modules\azure-mgmt\lib\models\servicemanagementserialize.js:536:38) - at Object.ServiceManagementService.setNetworkConfig (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\node_modules\azure\node_modules\azure-mgmt\lib\servicemanagementservice.js:2114:32) - at Object.exports.doServiceManagementOperation (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\lib\util\utils.js:218:22) - at setNetworkConfig (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\lib\commands\asm\network.js:1029:11) - at __$createVNet (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\lib\commands\asm\network.js:791:30) - at __tryCatch (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\node_modules\streamline\lib\callbacks\runtime.js:141:4) - at ___ (C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\lib\commands\asm\network.js:789:141) diff --git a/PoSH/New Folder/jobs test.ps1 b/PoSH/New Folder/jobs test.ps1 deleted file mode 100644 index 5a886be..0000000 --- a/PoSH/New Folder/jobs test.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -$jobs.ChildJobs |where {$_.state -eq "Failed" -and $_.Id -gt 200} | Receive-Job -Name $_.JobId -Keep - -Receive-Job -Name Job203 -Keep -Receive-Job - -Select-AzureSubscription "MTC Workshop" - -Select-AzureSubscription -SubscriptionName $subscriptionName - -$jobs.ChildJobs |where {$_.state -eq "Failed" -and $_.Id -gt 200}| Format-List -Property * - -Get-Job | Format-List -Property * -$jobs.ChildJobs |Select -ExpandProperty $_.Command \ No newline at end of file diff --git a/PoSH/New Folder/testloop.ps1 b/PoSH/New Folder/testloop.ps1 deleted file mode 100644 index 1a34ca1..0000000 --- a/PoSH/New Folder/testloop.ps1 +++ /dev/null @@ -1,76 +0,0 @@ - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample 2.xml" - -$imageName = $ddpconfig.Cluster.CloneImage.cloneimageName -$adminUserName = $ddpconfig.Cluster.adminUserName -$adminPassword = $ddpconfig.Cluster.adminPassword -$instanceSize = $ddpconfig.Cluster.ClusterNodes.instanceSize -$diskSizeInGB= $ddpconfig.Cluster.ClusterNodes.diskSizeInGB -$numOfDisks= $ddpconfig.Cluster.ClusterNodes.numOfDisks -$vmNamePrefix= $ddpconfig.Cluster.ClusterNodes.vmNamePrefix -$cloudServicePrefix= $ddpconfig.Cluster.ClusterNodes.cloudServicePrefix -$numCloudServices= $ddpconfig.Cluster.ClusterNodes.numCloudServices -$numNodes= $ddpconfig.Cluster.ClusterNodes.numNodes -$affinityGroupName= $ddpconfig.Cluster.affinityGroupName -$virtualNetworkName= $ddpconfig.Cluster.virtualNetworkName -$virtualSubnetname= $ddpconfig.Cluster.virtualSubnetname -$storageAccountName= $ddpconfig.Cluster.storageAccountName -$storageAccountList= $ddpconfig.Cluster.storageAccountList.Name -$hostsfile= $ddpconfig.Cluster.hostsfile -$hostscript= $ddpconfig.Cluster.hostscript -$subscriptionName= $ddpconfig.Cluster.SubscriptionName - -# Following modifies the Write-Output behavior to turn the messages on globally for this session -$VerbosePreference = "Continue" -$DebugPreference = "Continue" - -Select-AzureSubscription -SubscriptionName $subscriptionName -azure account set $subscriptionName - - -$countStorageAccount = $storageAccountList.Count -$countService = 1 -$countVM = 1 -$storageAccountIndex = 0 -$jobs = @() -for ($countVM = 1; $countVM -le $numNodes; $countVM++) -{ - if ($countService -gt [int]$numCloudServices) {$countService = 1} - if ($storageAccountIndex -eq $countStorageAccount) {$storageAccountIndex = 0} - - $cloudServiceName = "$cloudServicePrefix$countService" - $vmName = "$vmNamePrefix$countVM" - $storageAccount = $storageAccountList[$storageAccountIndex] - - - $jobs += Start-Job -FilePath "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH\0_Create_Cluster_Nodes.ps1" ` - -ArgumentList "ncdv3c", ` - "clusteradmin", ` - "Password.1", ` - "extralarge", ` - 10, ` - 1, ` - $vmName, ` - "ncdv3", ` - "ncdv3", ` - "ncdv3", ` - "App", ` - "ncdv3", ` - "ncdv3", ` - ".\hosts", ` - ".\hostscript.sh", ` - "MTC Workshop" - - $countService++ - $storageAccountIndex++ - - Write-Progress -Activity "Submitting machine for creation" -Status $vmName -PercentComplete ($countVM / $numNodes * 100) -} -Write-Progress "Submitting virtual machine for creation" -Completed - -Write-Progress "Waiting for virtual machine creation jobs to finish..." -PercentComplete -1 -$jobs | Wait-Job | Out-Null -Write-Progress "Waiting for virtual machine creation jobs to finish..." -Completed - - diff --git a/PoSH/New Folder/testloop2.ps1 b/PoSH/New Folder/testloop2.ps1 deleted file mode 100644 index 4b5839b..0000000 --- a/PoSH/New Folder/testloop2.ps1 +++ /dev/null @@ -1,81 +0,0 @@ - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample 2.xml" - -$imageName = $ddpconfig.Cluster.CloneImage.cloneimageName -$adminUserName = $ddpconfig.Cluster.adminUserName -$adminPassword = $ddpconfig.Cluster.adminPassword -$instanceSize = $ddpconfig.Cluster.ClusterNodes.instanceSize -$diskSizeInGB= $ddpconfig.Cluster.ClusterNodes.diskSizeInGB -$numOfDisks= $ddpconfig.Cluster.ClusterNodes.numOfDisks -$vmNamePrefix= $ddpconfig.Cluster.ClusterNodes.vmNamePrefix -$cloudServicePrefix= $ddpconfig.Cluster.ClusterNodes.cloudServicePrefix -$numCloudServices= $ddpconfig.Cluster.ClusterNodes.numCloudServices -$numNodes= $ddpconfig.Cluster.ClusterNodes.numNodes -$affinityGroupName= $ddpconfig.Cluster.affinityGroupName -$virtualNetworkName= $ddpconfig.Cluster.virtualNetworkName -$virtualSubnetname= $ddpconfig.Cluster.virtualSubnetname -$storageAccountName= $ddpconfig.Cluster.storageAccountName -$storageAccountList= $ddpconfig.Cluster.storageAccountList.Name -$hostsfile= $ddpconfig.Cluster.hostsfile -$hostscript= $ddpconfig.Cluster.hostscript -$subscriptionName= $ddpconfig.Cluster.SubscriptionName - -# Following modifies the Write-Output behavior to turn the messages on globally for this session -$VerbosePreference = "Continue" -$DebugPreference = "Continue" - -Select-AzureSubscription -SubscriptionName $subscriptionName -azure account set $subscriptionName - - -$countStorageAccount = $storageAccountList.Count -$countService = 1 -$countVM = 1 -$storageAccountIndex = 0 -$jobs = @() -for ($countVM = 1; $countVM -le $numNodes; $countVM++) -{ - if ($countService -gt [int]$numCloudServices) {$countService = 1} - if ($storageAccountIndex -eq $countStorageAccount) {$storageAccountIndex = 0} - - $cloudServiceName = "$cloudServicePrefix$countService" - $vmName = "$vmNamePrefix$countVM" - $storageAccount = $storageAccountList[$storageAccountIndex] - $path = Resolve-Path ".\" + "\0_Create_Cluster_Nodes.ps1" - - - $jobs += Start-Job -FilePath "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH\0_Create_Cluster_Nodes.ps1" ` - -ArgumentList "ncdv3c", ` - "clusteradmin", ` - "Password.1", ` - "extralarge", ` - 10, ` - 1, ` - "ncdlara$countVM", ` - "ncdv3", ` - "ncdv3", ` - "ncdv3", ` - "App", ` - "ncdv3", ` - "ncdv3", ` - ".\hosts", ` - ".\hostscript.sh", ` - "MTC Workshop", ` - $path - - $countService++ - $storageAccountIndex++ - - Write-Progress -Activity "Submitting machine for creation" -Status $vmName -PercentComplete ($countVM / $numNodes * 100) -} -Write-Progress "Submitting virtual machine for creation" -Completed - -Write-Progress "Waiting for virtual machine creation jobs to finish..." -PercentComplete -1 -$jobs | Wait-Job | Out-Null -Write-Progress "Waiting for virtual machine creation jobs to finish..." -Completed - - -$jobs.ChildJobs - -Receive-Job -Name Job7 -Keep \ No newline at end of file diff --git a/PoSH/New Folder/testloopsing.ps1 b/PoSH/New Folder/testloopsing.ps1 deleted file mode 100644 index 1cc01f8..0000000 --- a/PoSH/New Folder/testloopsing.ps1 +++ /dev/null @@ -1,72 +0,0 @@ - -cd "C:\Users\larar\Source\Workspaces\Distributed Data Cluster on Azure\GitHubScripts\PoSH" -[xml]$ddpconfig = Get-Content ".\ClusterConfig Sample.xml" - -$imageName = $ddpconfig.Cluster.CloneImage.cloneimageName -$adminUserName = $ddpconfig.Cluster.adminUserName -$adminPassword = $ddpconfig.Cluster.adminPassword -$instanceSize = $ddpconfig.Cluster.ClusterNodes.instanceSize -$diskSizeInGB= $ddpconfig.Cluster.ClusterNodes.diskSizeInGB -$numOfDisks= $ddpconfig.Cluster.ClusterNodes.numOfDisks -$vmNamePrefix= $ddpconfig.Cluster.ClusterNodes.vmNamePrefix -$cloudServicePrefix= $ddpconfig.Cluster.ClusterNodes.cloudServicePrefix -$numCloudServices= $ddpconfig.Cluster.ClusterNodes.numCloudServices -$numNodes= $ddpconfig.Cluster.ClusterNodes.numNodes -$affinityGroupName= $ddpconfig.Cluster.affinityGroupName -$virtualNetworkName= $ddpconfig.Cluster.virtualNetworkName -$virtualSubnetname= $ddpconfig.Cluster.virtualSubnetname -$storageAccountName= $ddpconfig.Cluster.storageAccountName -$storageAccountList= $ddpconfig.Cluster.storageAccountList.Name -$hostsfile= $ddpconfig.Cluster.hostsfile -$hostscript= $ddpconfig.Cluster.hostscript -$subscriptionName= $ddpconfig.Cluster.SubscriptionName - - -Select-AzureSubscription -SubscriptionName $subscriptionName -azure account set $subscriptionName - -$countStorageAccount = $storageAccountList.Count -$countService = 2 -$countVM = 1 -[int]$storageAccountIndex = 0 - - $cloudServiceName = $cloudServicePrefix+[string]$countService - $vmName = $vmNamePrefix+[string]$countVM - $storageAccount = $storageAccountList[$storageAccountIndex] - -.\0_Create_Cluster_Nodes.ps1 ` --imageName "ncdv3c" ` - -adminUserName "clusteradmin" ` - -adminPassword "Password.1" ` - -instanceSize "ExtraLarge" ` - -diskSizeinGB 10 ` - -numOfDisks 1 ` - -vmName $vmName ` - -cloudServiceName "ncdv3" ` - -affinityGroupName "ncdv3" ` - -virtualNetworkName "ncdv3" ` - -virtualSubnetName "App" ` - -storageAccountName "ncdv3" ` - -storageAccount "ncdv3" ` - -hostsfile ".\hostsfile" ` - -hostscript ".\hostscript" ` - -subscriptionName "MTC Workshop" - - -.\0_Create_Cluster_Nodes.ps1 - "ncdv3c" ` - "clusteradmin" ` - "Password.1" ` - "extralarge" ` - 10 ` - 1 ` - $vmName ` - "ncdv3" ` - "ncdv3" ` - "ncdv3" ` - "App" ` - "ncdv3" ` - "ncdv3" ` - ".\hosts" ` - ".\hostscript.sh" ` - "MTC Workshop" \ No newline at end of file