зеркало из https://github.com/microsoft/Azure-DDP.git
Removed unnecessary files
This commit is contained in:
Родитель
525634ca3f
Коммит
2808906208
|
@ -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])"
|
||||
}
|
|
@ -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])"
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
<!--Set Cluster Variables-->
|
||||
|
||||
<Cluster>
|
||||
<!--Set the subscription-->
|
||||
<SubscriptionName>MTC Workshop</SubscriptionName>
|
||||
|
||||
<!--Affinity Group Settings-->
|
||||
<!--affinityGroupLocation is the location where the cluster will deploy. East US, West US, East Asia, Southeast Asia, North Europe, West Europe are examples of valid locations-->
|
||||
<!--affinityGroupName must be globally unique-->
|
||||
<affinityGroupLocation>West US</affinityGroupLocation>
|
||||
<affinityGroupName>clb0West</affinityGroupName>
|
||||
<affinityGroupDescription>Affinity Group DDP Sample</affinityGroupDescription>
|
||||
<affinityGroupLabel>AG for DDP Sample</affinityGroupLabel>
|
||||
|
||||
<!--Virtual Network Settings-->
|
||||
<!--If the virtual network already exists, input the vnet settings -->
|
||||
<!--If the virtual networ doesn't exist, the scripts will generate the vnet based on the settings -->
|
||||
<!--Valid address space settings include 192.168.0.0, 10.0.0.0 and 172.16.0.0 -->
|
||||
<!--Network faq is here http://msdn.microsoft.com/en-us/library/windowsazure/dn133803.aspx -->
|
||||
<virtualNetworkName>clb01</virtualNetworkName>
|
||||
<virtualNetworkAddressSpace>172.16.0.0</virtualNetworkAddressSpace>
|
||||
<virtualNetworkCIDR>17</virtualNetworkCIDR>
|
||||
<virtualSubnetname>App</virtualSubnetname>
|
||||
<subnetAddressSpace>172.16.0.0</subnetAddressSpace>
|
||||
<subnetCIDR>17</subnetCIDR>
|
||||
|
||||
<!--Storage Account Settings-->
|
||||
<!--All storage account names must be globally unique-->
|
||||
<storageAccountName>clb0</storageAccountName>
|
||||
<storageAccountList>
|
||||
<Name>clb001</Name>
|
||||
<Name>clb002</Name>
|
||||
</storageAccountList>
|
||||
|
||||
<!--Virtual Machine Settings-->
|
||||
<!--cloudServicePrefix must be globally unique-->
|
||||
<adminUserName>clusteradmin</adminUserName>
|
||||
<adminPassword>Password.1</adminPassword>
|
||||
<vmNamePrefix>clb0</vmNamePrefix>
|
||||
<cloudServicePrefix>clb0</cloudServicePrefix>
|
||||
|
||||
<!--do not change the hosts/hostscript names-->
|
||||
<hostsfile>.\hosts.txt</hostsfile>
|
||||
<hostscript>.\hostscript.sh</hostscript>
|
||||
|
||||
<!--Set Management Node Variables-->
|
||||
<ManagementNode>
|
||||
<galleryimageName>OpenLogic</galleryimageName>
|
||||
<instanceSize>A7</instanceSize>
|
||||
<diskSizeInGB>500</diskSizeInGB>
|
||||
<numOfDisks>2</numOfDisks>
|
||||
<installerPort>8080</installerPort>
|
||||
</ManagementNode>
|
||||
|
||||
<!--Set Clone Node Variable-->
|
||||
<CloneNode>
|
||||
<galleryimageName>OpenLogic</galleryimageName>
|
||||
<instanceSize>A7</instanceSize>
|
||||
</CloneNode>
|
||||
|
||||
<!--Set Clone Image Variables-->
|
||||
<CloneImage>
|
||||
<vmName>clb0c</vmName>
|
||||
<cloneimageName>clb0c</cloneimageName>
|
||||
<cloneimageLabel>Test 0 Clone</cloneimageLabel>
|
||||
</CloneImage>
|
||||
|
||||
<!--Set Cluster Nodes Variables-->
|
||||
<ClusterNodes>
|
||||
<instanceSize>A5</instanceSize>
|
||||
<diskSizeInGB>1000</diskSizeInGB>
|
||||
<numOfDisks>4</numOfDisks>
|
||||
<vmNamePrefix>clb0</vmNamePrefix>
|
||||
<cloudServicePrefix>clb0</cloudServicePrefix>
|
||||
<numNodes>8</numNodes>
|
||||
<numCloudServices>2</numCloudServices>
|
||||
</ClusterNodes>
|
||||
</Cluster>
|
|
@ -1,78 +0,0 @@
|
|||
<!--Set Cluster Variables-->
|
||||
|
||||
<Cluster>
|
||||
<!--Set the subscription-->
|
||||
<SubscriptionName>MTC Workshop</SubscriptionName>
|
||||
|
||||
<!--Affinity Group Settings-->
|
||||
<!--affinityGroupLocation is the location where the cluster will deploy. East US, West US, East Asia, Southeast Asia, North Europe, West Europe are examples of valid locations-->
|
||||
<!--affinityGroupName must be globally unique-->
|
||||
<affinityGroupLocation>West US</affinityGroupLocation>
|
||||
<affinityGroupName>ddptest3</affinityGroupName>
|
||||
<affinityGroupDescription>Affinity Group DDP Sample</affinityGroupDescription>
|
||||
<affinityGroupLabel>AG for DDP Sample</affinityGroupLabel>
|
||||
|
||||
<!--Virtual Network Settings-->
|
||||
<!--If the virtual network already exists, input the vnet settings -->
|
||||
<!--If the virtual networ doesn't exist, the scripts will generate the vnet based on the settings -->
|
||||
<!--Valid address space settings include 192.168.0.0, 10.0.0.0 and 172.16.0.0 -->
|
||||
<!--Network faq is here http://msdn.microsoft.com/en-us/library/windowsazure/dn133803.aspx -->
|
||||
<virtualNetworkName>ddptestv4</virtualNetworkName>
|
||||
<virtualNetworkAddressSpace>172.16.0.0</virtualNetworkAddressSpace>
|
||||
<virtualNetworkCIDR>17</virtualNetworkCIDR>
|
||||
<virtualSubnetname>App</virtualSubnetname>
|
||||
<subnetAddressSpace>172.16.0.0</subnetAddressSpace>
|
||||
<subnetCIDR>17</subnetCIDR>
|
||||
|
||||
<!--Storage Account Settings-->
|
||||
<!--All storage account names must be globally unique-->
|
||||
<storageAccountName>ddptest3</storageAccountName>
|
||||
<storageAccountList>
|
||||
<Name>ddptest31</Name>
|
||||
<Name>ddptest32</Name>
|
||||
</storageAccountList>
|
||||
|
||||
<!--Virtual Machine Settings-->
|
||||
<!--cloudServicePrefix must be globally unique-->
|
||||
<adminUserName>clusteradmin</adminUserName>
|
||||
<adminPassword>Password.1</adminPassword>
|
||||
<vmNamePrefix>ddptest3a</vmNamePrefix>
|
||||
<cloudServicePrefix>ddptest3</cloudServicePrefix>
|
||||
|
||||
<!--do not change the hosts/hostscript names-->
|
||||
<hostsfile>.\hosts.txt</hostsfile>
|
||||
<hostscript>.\hostscript.sh</hostscript>
|
||||
|
||||
<!--Set Management Node Variables-->
|
||||
<ManagementNode>
|
||||
<galleryimageName>OpenLogic</galleryimageName>
|
||||
<instanceSize>A7</instanceSize>
|
||||
<diskSizeInGB>100</diskSizeInGB>
|
||||
<numOfDisks>2</numOfDisks>
|
||||
<installerPort>8080</installerPort>
|
||||
</ManagementNode>
|
||||
|
||||
<!--Set Clone Node Variable-->
|
||||
<CloneNode>
|
||||
<galleryimageName>OpenLogic</galleryimageName>
|
||||
<instanceSize>A7</instanceSize>
|
||||
</CloneNode>
|
||||
|
||||
<!--Set Clone Image Variables-->
|
||||
<CloneImage>
|
||||
<vmName>ddptest3ac</vmName>
|
||||
<cloneimageName>ddptest3c</cloneimageName>
|
||||
<cloneimageLabel>Test 0 Clone</cloneimageLabel>
|
||||
</CloneImage>
|
||||
|
||||
<!--Set Cluster Nodes Variables-->
|
||||
<ClusterNodes>
|
||||
<instanceSize>A7</instanceSize>
|
||||
<diskSizeInGB>100</diskSizeInGB>
|
||||
<numOfDisks>4</numOfDisks>
|
||||
<vmNamePrefix>ddptest3</vmNamePrefix>
|
||||
<cloudServicePrefix>ddptest3</cloudServicePrefix>
|
||||
<numNodes>8</numNodes>
|
||||
<numCloudServices>2</numCloudServices>
|
||||
</ClusterNodes>
|
||||
</Cluster>
|
|
@ -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
|
||||
|
|
@ -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)
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
|
@ -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"
|
Загрузка…
Ссылка в новой задаче