Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Commit for 1.1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsevedge committed Feb 28, 2018
1 parent 32b7713 commit 6a06339
Show file tree
Hide file tree
Showing 29 changed files with 3,546 additions and 1,806 deletions.
540 changes: 540 additions & 0 deletions experimental/cluster/1nic/BYOL/azuredeploy.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions experimental/cluster/1nic/BYOL/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.1.2.0",
"parameters": {
"numberOfInstances": {
"value": 2
},
"adminUsername": {
"value": "azureuser"
},
"adminPassword": {
"value": "GEN_UNIQUE"
},
"dnsLabel": {
"value": "REQUIRED"
},
"instanceType": {
"value": "Standard_D2_v2"
},
"imageName": {
"value": "Good"
},
"licenseKey1": {
"value": "REQUIRED"
},
"licenseKey2": {
"value": "REQUIRED"
},
"restrictedSrcAddress": {
"value": "*"
},
"tagValues": {
"value": {
"application": "APP",
"cost": "COST",
"environment": "ENV",
"group": "GROUP",
"owner": "OWNER"
}
}
}
}
42 changes: 25 additions & 17 deletions experimental/cluster/1nic/Deploy_via_PS.ps1
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Params below match to parameteres in the azuredeploy.json that are gen-unique, otherwsie pointing to
# the azuredeploy.parameters.json file for default values. Some options below are mandatory, some(such as deployment password for BIG IP)
# can be supplied inline when running this script but if they arent then the default will be used as specificed in below param arguments
# Example Command: .\Deploy_via_PS.ps1 -solutionDeploymentName deploynamestring -numberOfInstances 2 -adminUsername azureuser -adminPassword password
# -dnsLabel dnslabestring -licenseKey1 XXXX-XXXX-XXXX-XXXX -licenseKey2 XXXX-XXXX-XXXX-XXXX
## Script parameters being asked for below match to parameters in the azuredeploy.json file, otherwise pointing to the ##
## azuredeploy.parameters.json file for values to use. Some options below are mandatory, some(such as region) can ##
## be supplied inline when running this script but if they aren't then the default will be used as specificed below. ##
## Example Command: .\Deploy_via_PS.ps1 -licenseType PAYG -licensedBandwidth 200m -numberOfInstances 2 -adminUsername azureuser -adminPassword <value> -dnsLabel <value> -instanceType Standard_D2_v2 -imageName Good -restrictedSrcAddress "*"-resourceGroupName <value>

param(

[Parameter(Mandatory=$True)]
[string]
$solutionDeploymentName,
$licenseType,

[Parameter(Mandatory=$True)]
[ValidateSet("2")]
[string]
$numberOfInstances,
$licensedBandwidth = $(if($licenseType -eq "PAYG") { Read-Host -prompt "licensedBandwidth"}),

[string]
$instanceType = "Standard_D2_v2",
$licenseKey1 = $(if($licenseType -eq "BYOL") { Read-Host -prompt "licenseKey1"}),

[string]
$imageName = "Best",
$licenseKey2 = $(if($licenseType -eq "BYOL") { Read-Host -prompt "licenseKey2"}),

[Parameter(Mandatory=$True)]
[string]
$numberOfInstances,

[Parameter(Mandatory=$True)]
[string]
Expand All @@ -34,14 +36,14 @@ param(

[Parameter(Mandatory=$True)]
[string]
$licenseKey1,
$instanceType,

[Parameter(Mandatory=$True)]
[string]
$licenseKey2,
$imageName,

[string]
$restrictedSrcAddress = "*",
$restrictedSrcAddress = "*",

[Parameter(Mandatory=$True)]
[string]
Expand Down Expand Up @@ -76,9 +78,15 @@ New-AzureRmResourceGroup -Name $resourceGroupName -Location "$region"

# Create Arm Deployment
$pwd = ConvertTo-SecureString -String $adminPassword -AsPlainText -Force

# Create Arm Deployment
$deployment = New-AzureRmResourceGroupDeployment -Name $resourceGroupName -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath -TemplateParameterFile $parametersFilePath -Verbose -solutionDeploymentName "$solutionDeploymentName" -numberOfInstances "$numberOfInstances" -instanceType "$instanceType" -imageName "$imageName" -adminUsername "$adminUsername" -adminPassword $pwd -dnsLabel "$dnsLabel" -licenseKey1 "$licenseKey1" -licenseKey2 "$licenseKey2" -restrictedSrcAddress "$restrictedSrcAddress"
if ($licenseType -eq "BYOL") {
if ($templateFilePath -eq "azuredeploy.json") { $templateFilePath = ".\BYOL\azuredeploy.json"; $parametersFilePath = ".\BYOL\azuredeploy.parameters.json" }
$deployment = New-AzureRmResourceGroupDeployment -Name $resourceGroupName -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath -TemplateParameterFile $parametersFilePath -Verbose -numberOfInstances "$numberOfInstances" -adminUsername "$adminUsername" -adminPassword $pwd -dnsLabel "$dnsLabel" -instanceType "$instanceType" -imageName "$imageName" -restrictedSrcAddress "$restrictedSrcAddress" -licenseKey1 "$licenseKey1" -licenseKey2 "$licenseKey2"
} elseif ($licenseType -eq "PAYG") {
if ($templateFilePath -eq "azuredeploy.json") { $templateFilePath = ".\PAYG\azuredeploy.json"; $parametersFilePath = ".\PAYG\azuredeploy.parameters.json" }
$deployment = New-AzureRmResourceGroupDeployment -Name $resourceGroupName -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath -TemplateParameterFile $parametersFilePath -Verbose -numberOfInstances "$numberOfInstances" -adminUsername "$adminUsername" -adminPassword $pwd -dnsLabel "$dnsLabel" -instanceType "$instanceType" -imageName "$imageName" -restrictedSrcAddress "$restrictedSrcAddress" -licensedBandwidth "$licensedBandwidth"
} else {
Write-Error -Message "Uh oh, something went wrong! Please select valid license type of PAYG or BYOL."
}

# Print Output of Deployment to Console
$deployment
Loading

0 comments on commit 6a06339

Please sign in to comment.