Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade .NET 6 and func runtime v4 #6

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions deployment/provision_application_owner_system.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@


param (
[Parameter(Mandatory=$True)][string]$subscription,
[Parameter(Mandatory=$True)][string]$aosEnvironment,
[Parameter(Mandatory=$True)][string]$maskinportenclient,
[Parameter(Mandatory=$True)][string]$maskinportenclientcert,
[Parameter(Mandatory=$True)][string]$subscription,
[Parameter(Mandatory=$True)][string]$aosEnvironment,
[Parameter(Mandatory=$True)][string]$maskinportenclient,
[Parameter(Mandatory=$True)][string]$maskinportenclientcert,
[Parameter(Mandatory=$True)][string]$maskinportenclientcertpwd,
[Parameter(Mandatory=$True)][string]$maskinportenuri,
[Parameter(Mandatory=$True)][string]$appsuri,
[Parameter(Mandatory=$True)][string]$platformuri,
[Parameter(Mandatory=$True)][string]$maskinportenuri,
[Parameter(Mandatory=$True)][string]$appsuri,
[Parameter(Mandatory=$True)][string]$platformuri,
[string]$location = "norwayeast",
[string]$resourcePrefix = "aos"
)
Expand All @@ -27,9 +27,9 @@ param (
az account set --subscription $subscription

$aosResourceGroupName = "$resourcePrefix-$aosEnvironment-rg"
$keyvaultname = "$resourcePrefix-$aosEnvironment-keyvault"
$keyvaultname = "$resourcePrefix-$aosEnvironment-keyvault"
$storageAccountName = $resourcePrefix+$aosEnvironment+"storage"
$functionName = "$resourcePrefix-$aosEnvironment-function"
$functionName = "$resourcePrefix-$aosEnvironment-function"


#### Check if resource group for AKS exists
Expand Down Expand Up @@ -60,7 +60,7 @@ Write-Output "Import Maskinporten cert"
az keyvault certificate import --vault-name $keyvaultname -n maskinportenclientcert -f $maskinportenclientcert --password $maskinportenclientcertpwd

Write-Output "Create Function App"
az functionapp create --resource-group $aosResourceGroupName --consumption-plan-location $location --runtime dotnet-isolated --functions-version 3 --name $functionName --storage-account $storageAccountName
az functionapp create --resource-group $aosResourceGroupName --consumption-plan-location $location --runtime dotnet --runtime-version 6 --functions-version 4 --name $functionName --storage-account $storageAccountName
az functionapp identity assign -g $aosResourceGroupName -n $functionName
$funcprincialId = az functionapp identity show --name $functionName --resource-group $aosResourceGroupName --query principalId --output tsv

Expand All @@ -80,7 +80,7 @@ az functionapp config appsettings set --name $functionname --resource-group $aos
az functionapp config appsettings set --name $functionname --resource-group $aosResourceGroupName --settings "KeyVault:KeyVaultURI=$vaultUri"


Write-Output "Set config"
Write-Output "Publish app"
Set-Location ..\src\Altinn-application-owner-system\Functions
func azure functionapp publish $functionName
func azure functionapp publish $functionName --csharp
Set-Location ..\..\..\deployment
Loading