Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
updated new-wttenvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
meyergm committed May 6, 2016
2 parents d76e9a0 + a8ab8ef commit 6d9b8b9
Show file tree
Hide file tree
Showing 87 changed files with 3,705 additions and 1,623 deletions.
Binary file modified Azure SQL HOL Configuration Guide - Final.docx
Binary file not shown.
Binary file modified Azure SQL HOL Manual - Final.docx
Binary file not shown.
Binary file modified ElasticLoadGenerator/ElasticPoolLoadGenerator.exe
Binary file not shown.
13 changes: 7 additions & 6 deletions ElasticLoadGenerator/ElasticPoolLoadGenerator.exe.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

<appSettings>
<!-- Default Screen Values -->
<add key="PrimaryDatabase" value="Customer1" />
<add key="SecondaryDatabase" value="Customer2" />
<add key="PrimaryDatabase" value="Customer2" />
<add key="SecondaryDatabase" value="Customer3" />
<add key="Username" value="developer" />
<add key="Password" value="P@ssword1" />
<add key="BatchSize" value="5000" />
<add key="LoadRecordLimit" value="100000" />
<add key="Loaders" value="3"/>
<add key="BatchSize" value="1800" />
<add key="LoadRecordLimit" value="25000" />

<!-- Purchase Values -->
<add key="ConcertId" value="1" />
Expand All @@ -17,8 +18,8 @@
<add key="CustomerName" value="Generator" />

<!-- Timing in Seconds -->
<add key="Runtime" value="10800" /> <!-- 1080 -->
<add key="Sleeptime" value="130" /> <!-- 300 -->
<add key="Runtime" value="1080" /> <!-- 10800 -->
<add key="Sleeptime" value="300" /> <!-- 90 -->

<!-- Database settings -->
<add key="TransientFaultHandlingRetryCount" value="30" />
Expand Down
Binary file modified ElasticLoadGenerator/ElasticPoolLoadGenerator.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<add key="SecondaryDatabase" value="Customer2" />
<add key="Username" value="developer" />
<add key="Password" value="P@ssword1" />
<add key="BatchSize" value="80" />
<add key="LoadRecordLimit" value="5000" />
<add key="Loaders" value="3"/>
<add key="BatchSize" value="1800" />
<add key="LoadRecordLimit" value="25000" />

<!-- Purchase Values -->
<add key="ConcertId" value="1" />
Expand All @@ -18,7 +19,7 @@

<!-- Timing in Seconds -->
<add key="Runtime" value="1080" /> <!-- 1080 -->
<add key="Sleeptime" value="5" /> <!-- 300 -->
<add key="Sleeptime" value="300" /> <!-- 300 -->

<!-- Database settings -->
<add key="TransientFaultHandlingRetryCount" value="30" />
Expand Down
Binary file modified Powershell/Deploy-DBSchema.ps1
Binary file not shown.
14 changes: 5 additions & 9 deletions Powershell/Deploy-WTTAzureDWDatabase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function Deploy-WTTAzureDWDatabase
}
Else
{
$DWServer = (Find-AzureRmResource -ResourceType "Microsoft.Sql/servers" -ResourceNameContains "primary" -ExpandProperties).properties.FullyQualifiedDomainName
$DWServer = (Find-AzureRmResource -ResourceType "Microsoft.Sql/servers" -ResourceNameContains "primary" -ExpandProperties -ResourceGroupNameContains $WTTEnvironmentApplicationName).properties.FullyQualifiedDomainName
# Set working location
Push-Location -StackName wtt
# Create Database tables
Expand All @@ -163,15 +163,11 @@ function Deploy-WTTAzureDWDatabase
# Set working location
Pop-Location -StackName wtt

# Downgrade to 400 units
WriteLabel("Downgrading DataWarehouse database to 400 Units")
$null = Set-AzureRmSqlDatabase -RequestedServiceObjectiveName "DW400" -ServerName $ServerName -DatabaseName $DWDatabaseName -ResourceGroupName $WTTEnvironmentApplicationName
# Downgrade to 100 units
WriteLabel("Downgrading DataWarehouse database to 100 Units")
$null = Set-AzureRmSqlDatabase -RequestedServiceObjectiveName "DW100" -ServerName $ServerName -DatabaseName $DWDatabaseName -ResourceGroupName $WTTEnvironmentApplicationName
WriteValue("Successful")

WriteLabel("Pausing DataWarehouse database")
$null = Suspend-AzureRMSqlDatabase –ResourceGroupName $WTTEnvironmentApplicationName –ServerName $ServerName –DatabaseName $DWDatabaseName
WriteValue("Successful")
Start-Sleep -s 180
Start-Sleep -s 180
}
}
}
Expand Down
74 changes: 46 additions & 28 deletions Powershell/Deploy-WTTEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@
[Parameter(Mandatory=$false, HelpMessage="Please specify the primary location for your WTT Environment ('East US', 'West US', 'South Central US', 'North Central US', 'Central US', 'East Asia', 'West Europe', 'East US 2', 'Japan East', 'Japan West', 'Brazil South', 'North Europe', 'Southeast Asia', 'Australia East', 'Australia Southeast')?")]
[ValidateSet('East US', 'West US', 'South Central US', 'North Central US', 'Central US', 'East Asia', 'West Europe', 'East US 2', 'Japan East', 'Japan West', 'Brazil South', 'North Europe', 'Southeast Asia', 'Australia East', 'Australia Southeast', 'EastUS', 'WestUS', 'SouthCentralUS', 'NorthCentralUS', 'CentralUS', 'EastAsia', 'WestEurope', 'EastUS2', 'JapanEast', 'JapanWest', 'BrazilSouth', 'NorthEurope', 'SoutheastAsia', 'AustraliaEast', 'AustraliaSoutheast')]
[String]
$WTTEnvironmentPrimaryServerLocation,

#This parameter is used by deploy-wttenvironment.ps1
[Parameter(Mandatory = $false)]
[string]
$deployADF,

#This parameter is used by deploy-wttenvironment.ps1
[Parameter(Mandatory = $false)]
[string]
$deployDW
$WTTEnvironmentPrimaryServerLocation
)

Clear
Expand All @@ -49,10 +39,6 @@
Get-ChildItem -Path $localPath -Filter *.ps1 | ForEach { . $_.FullName }
WriteValue("Done")

#set up parameters to deploy ADF or DW
$deployADF = ""
$deployDW = ""

# Select a subscription to use for deployment. Calls the initsubscription function at the end of this script.
WriteLabel("Initializing Azure Subscription")
LineBreak
Expand Down Expand Up @@ -91,9 +77,47 @@
}
else
{

WriteError("Resource Group Name Exists")
$WTTEnvironmentApplicationName = " "
$exists = $false
LineBreak
$Title = "$WTTEnvironmentApplicationName has been found"
$message = "Do you wish to redeploy $WTTEnvironmentApplicationName ?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes"
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No"
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 0)
$answer = switch ($result)
{
0 {"You selected Yes."}
1 {"You selected No."}
}
if($answer -like "y*")
{
$exists = $true
$WTTEnvironmentPriServerLocation = (Find-AzureRmResource -ResourceType "Microsoft.Sql/servers" -ResourceNameContains $WTTEnvironmentApplicationName"primary" -ResourceGroupNameContains $WTTEnvironmentApplicationName -ErrorAction SilentlyContinue).location
$wTTEnvironmentPrimaryServerLocation =
Switch ($wTTEnvironmentPriServerLocation)
{
'WestUS' {'West US'}
'NorthEurope' {'North Europe'}
'WestEurope' {'West Europe'}
'EastUS' {'East US'}
'NorthCentralUS' {'East US'}
'SouthCentralUS' {'South Central US'}
'EastUS2' {'East US 2'}
'CentralUS' {'Central US'}
'BrazilSouth' {'Brazil South'}
'SoutheastAsia' {'Southeast Asia'}
'EastAsia' {'EastAsia'}
'JapanEast' {'Japan East'}
'JapanWest' {'Japan West'}
}
}
else
{
$WTTEnvironmentApplicationName = " "
$exists = $false
}
}
}until($exists -eq $true)
}
Expand All @@ -113,20 +137,14 @@

[int]$xMenuChoiceA = 0
while ( $xMenuChoiceA -lt 1 -or $xMenuChoiceA -gt 4 )
{
WriteLabelSwitch("1. Base WingTip Tickets")
WriteLabelSwitch("2. WingTip Tickets with Azure Data Factory")
WriteLabelSwitch("3. WingTip Tickets with Azure Data Warehouse")
WriteLabelSwitch("4. All of the WingTip Tickets Services")
WriteReadLabel("Enter an option 1 to 4..." )
{
WriteLabelSwitch("1. All of the WingTip Tickets Services")
WriteReadLabel("Enter option 1 to deploy..." )
[Int]$xMenuChoiceA = read-host
}
Switch( $xMenuChoiceA )
{
1{new-wttenvironment -WTTEnvironmentApplicationName $WTTEnvironmentApplicationName -WTTEnvironmentPrimaryServerLocation $WTTEnvironmentPrimaryServerLocation -deployADF 0 -deployDW 0}
2{new-wttenvironment -WTTEnvironmentApplicationName $WTTEnvironmentApplicationName -WTTEnvironmentPrimaryServerLocation $WTTEnvironmentPrimaryServerLocation -deployADF 1 -deployDW 0}
3{new-wttenvironment -WTTEnvironmentApplicationName $WTTEnvironmentApplicationName -WTTEnvironmentPrimaryServerLocation $WTTEnvironmentPrimaryServerLocation -deployADF 0 -deployDW 1}
4{new-wttenvironment -WTTEnvironmentApplicationName $WTTEnvironmentApplicationName -WTTEnvironmentPrimaryServerLocation $WTTEnvironmentPrimaryServerLocation -deployADF 1 -deployDW 1}
1{new-wttenvironment -WTTEnvironmentApplicationName $WTTEnvironmentApplicationName -WTTEnvironmentPrimaryServerLocation $WTTEnvironmentPrimaryServerLocation}
}
}

Expand Down Expand Up @@ -160,7 +178,7 @@ function InitSubscription()
}

LineBreak
WriteLabel("Your Azure Subscriptions: ")
WriteLabel("Your Azure Subscriptions")
$subList | Format-Table RowNumber,SubscriptionId,SubscriptionName -AutoSize
WriteReadLabel("Enter the row number (1 - $subCount) of a subscription")
$rowNum = Read-Host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Get-WTTSqlDatabaseServerV12RegionAvailability()
'JapanWest' {'Japan West'}
}

return ,$wTTEnvironmentPriServerLocation, $wTTEnvironmentSecondServerLocation
return $wTTEnvironmentPriServerLocation, $wTTEnvironmentSecondServerLocation
break
}

Expand Down
Loading

0 comments on commit 6d9b8b9

Please sign in to comment.