-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
110 changed files
with
2,020 additions
and
1,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
param | ||
( | ||
[string] $prefix, | ||
[string] $resourceGroupName, | ||
[string] $batchAccountName, | ||
[string] $storageAccountName, | ||
[string] $userAssignedIdentity, | ||
[string] $location | ||
[string] $location, | ||
[string] $path = "..\..\..\src\TestConfig" | ||
) | ||
Write-Host "Create Batch Account: $batchAccountName" -ForegroundColor Cyan | ||
# $identity = az identity show --name $userAssignedIdentity --resource-group $resourceGroupName -o tsv --query id | ||
if("" -ne $prefix) | ||
{ | ||
. ./../prefix_resource_names.ps1 -prefix $prefix | ||
. ./../key_file_names.ps1 -prefix $prefix -path $path | ||
} | ||
|
||
$params = "{ ""namePrefix"":{""value"":""$prefix""}," | ||
if("" -ne $batchAccountName) { $params += """batchAccountName"":{""value"":""$batchAccountName""}," } | ||
if("" -ne $storageAccountName) { $params += """storageAccountName"":{""value"":""$storageAccountName""}," } | ||
if("" -ne $userAssignedIdentity) { $params += """identityName"":{""value"":""$userAssignedIdentity""}," } | ||
$params = $params.TrimEnd(",") | ||
$params += "}" | ||
$params = $params | ConvertTo-Json | ||
Write-Host $params | ||
|
||
# Write-Host "Using User Assigned Identity ID : $identity" -ForegroundColor Green | ||
# az batch account create --name $batchAccountName --resource-group $resourceGroupName --storage-account $storageAccountName --location $location -o table --identity-type UserAssigned --ids $identity | ||
$scriptDir = Split-Path $script:MyInvocation.MyCommand.Path | ||
az deployment group create --resource-group $resourceGroupName --template-file "$($scriptDir)/azuredeploy_batch.bicep" --parameters batchAccountName="$batchAccountName" identityName="$userAssignedIdentity" storageAccountName="$storageAccountName" -o table | ||
az deployment group create --resource-group $resourceGroupName --template-file "$($scriptDir)/../Modules/batch.bicep" --parameters $params -o table |
20 changes: 0 additions & 20 deletions
20
scripts/templates/Batch/create_batch_account_fromprefix.ps1
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
scripts/templates/ContainerApp/create_containerapp_env.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
param | ||
( | ||
[string] $prefix, | ||
[string] $resourceGroupName, | ||
[string] $containerAppEnvName, | ||
[string] $logAnalyticsWorkspace, | ||
[string] $containerRegistryName, | ||
[string] $location, | ||
[string] $resourceGroupName, | ||
[string] $subnetId | ||
[string] $subnetId, | ||
[string] $path = "..\..\..\src\TestConfig" | ||
) | ||
Write-Host "Create Container App Environment" -ForegroundColor Cyan | ||
|
||
$logAnalyticsClientId = az monitor log-analytics workspace show --query customerId -g $resourceGroupName -n $logAnalyticsWorkspace | ||
$logAnalyticsKey = az monitor log-analytics workspace get-shared-keys --query primarySharedKey -g $resourceGroupName -n $logAnalyticsWorkspace | ||
|
||
Write-Host "Creating Container App Environment: $containerAppEnvName" -ForegroundColor DarkGreen | ||
if("" -eq $subnetId) | ||
if("" -ne $prefix) | ||
{ | ||
az containerapp env create -n "$containerAppEnvName" -g "$resourceGroupName" --logs-workspace-id "$logAnalyticsClientId" --logs-workspace-key "$logAnalyticsKey" --location "$location" -o table | ||
. ./../prefix_resource_names.ps1 -prefix $prefix | ||
. ./../key_file_names.ps1 -prefix $prefix -path $path | ||
} | ||
else | ||
Write-Host "Creating Container App Environment: $containerAppEnvName" -ForegroundColor DarkGreen | ||
if("" -eq $subnetId) | ||
{ | ||
az containerapp env create -n "$containerAppEnvName" -g "$resourceGroupName" --logs-workspace-id "$logAnalyticsClientId" --logs-workspace-key "$logAnalyticsKey" --location "$location" --infrastructure-subnet-resource-id "$subnetId" -o table | ||
$subnetId = az network vnet subnet show --resource-group $resourceGroupName --vnet-name $vnet --name $containerAppSubnet --query id -o tsv | ||
} | ||
$logAnalyticsClientId = az monitor log-analytics workspace show --query customerId -g $resourceGroupName -n $logAnalyticsWorkspace | ||
$logAnalyticsKey = az monitor log-analytics workspace get-shared-keys --query primarySharedKey -g $resourceGroupName -n $logAnalyticsWorkspace | ||
|
||
|
||
$scriptDir = Split-Path $script:MyInvocation.MyCommand.Path | ||
az deployment group create --resource-group $resourceGroupName --template-file "$($scriptDir)/../Modules/containerappenv.bicep" --parameters containerAppEnvName=$containerAppEnvName logAnalyticsClientId=$logAnalyticsClientId logAnalyticsKey=$logAnalyticsKey subnetId=$subnetId -o table |
28 changes: 0 additions & 28 deletions
28
scripts/templates/ContainerApp/create_containerapp_env_fromprefix.ps1
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
scripts/templates/ContainerRegistry/create_container_registry.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
scripts/templates/ContainerRegistry/create_container_registry_fromprefix.ps1
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.