azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Added csharp azure sql functions template

Open madebygps opened this issue 3 years ago • 7 comments

Here's the csharp azure sql functions dotnet 6 out of process template. The holdup was issues with out of process host runtime when deployed on Linux consumption plan. I asked the team, and they said deploying to windows consumption would be fine for now.

I've also updated the readme to reflect correct prerequisites.

madebygps avatar Aug 30 '22 01:08 madebygps

This PR completes https://github.com/Azure/azure-dev/issues/316

madebygps avatar Aug 30 '22 01:08 madebygps

A few things here.

  • I renamed the template from csharp-cosmos-sql-func to csharp-cosmos-sql-func-isolated so folder names changed in project and api.
  • Created functions-csharp-isolated.bicep in common > infra > bicep > core > host
  • Created api-functions-csharp-isolated.bicep in todo > common > infra > bicep > app
  • Updated azure.yaml, repo.yaml, main.bicep, resources.bicep in todo> projects > csharp-cosmos-sql-func-isolated
  • Updated project readme

madebygps avatar Sep 20 '22 13:09 madebygps

We've decided to switch this to use Azure SQL instead of Cosmos SQL. @madebygps is going to research function bindings for the change.

jongio avatar Sep 21 '22 17:09 jongio

@jongio I've converted api to work with azure sql instead of cosmos sql.

  • removed isolated from api and project folder names
  • kept common app bicep to include csharp
  • changed common host bicep to functions-dotnet.bicep

madebygps avatar Sep 28 '22 14:09 madebygps

We might be missing endpoint for swagger UI, and I couldn't get local debugging to work. Otherwise, changes looks good to me.

weikanglim avatar Oct 06 '22 19:10 weikanglim

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551 --version '' --verbose

pwsh:

Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551' -Version '' -Verbose

Windows

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551' -Version '' -Verbose;"

Standalone Binary

  • Linux - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/azd-linux-amd64.tar.gz
  • MacOS - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/azd-darwin-amd64.zip
  • Windows - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/551/azd-windows-amd64.zip

Container

docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-551

azure-sdk avatar Oct 20 '22 20:10 azure-sdk

Repoman Generation Results

Repoman pushed changes to remotes for the following projects:

Project: todo-csharp-sql-swa-func

Remote: azure-samples-staging

Branch: pr/551

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-sql-swa-func -b pr/551

View Changes | Compare Changes


azure-sdk avatar Oct 20 '22 21:10 azure-sdk