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

docs(platforms): Azure Functions (TS and .NET) #1617

Closed
wants to merge 13 commits into from

Conversation

kamranayub
Copy link
Contributor

@kamranayub kamranayub commented Mar 7, 2023

This is a set of how-to guides for getting up and running with Azure Functions (TS/.NET) using a template I've created (it will look familiar to the stock sample app).

Related to #1616

TODO

  • Update to use RavenSettings__CertPem setting in Azure (.NET)
  • Update to use DB_CERT_PEM setting in Azure (Node.js)
  • Add screencaps

Post-publish / later

@kamranayub
Copy link
Contributor Author

I may also add support for Azure Key Vault, since for AWS Lambda I am adding Secrets Manager support. This would provide another secure way for Linux + Node.js RavenDB functions to load a certificate. Since it costs money, it would be available but optional.

There would then be 3 primary ways (on the Consumption plan):

  • Physical file (.pfx) -- Linux or Windows
  • Portal + Certificate Store -- Windows
  • Azure Key Vault -- Linux or Windows

@kamranayub kamranayub marked this pull request as ready for review June 28, 2023 15:06
@kamranayub kamranayub requested a review from ayende June 29, 2023 19:56
Copy link
Member

@ayende ayende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good


Azure Functions allows you to deploy Function Apps on Linux or Windows. For RavenDB, this mainly affects the way certificates are loaded and handled.

**Using a Windows deployment plus .NET Azure Functions will provide the most secure and performant option.** This will allow you to upload client certificates through the Portal and make them accessible to your .NET functions with the `WEBSITE_LOAD_CERTIFICATES` application setting. Further, .NET Core functions have the lowest cold start times compared to Node.js.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you use .net on linux functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can, but you can't load certificates through this setting on a consumption plan, you'd need to deploy a certificate. On an app service plan, you have to load it from a special directory, I don't think the "certificate store" method works.

It could be worth showing how to do this, it's a bit more involved and I haven't tested that, just based on the docs I've seen around it.

So Windows is the simplest method. I could see it being useful to show some example of a Linux app service function.

Comment on lines +257 to +258
[docs-get-started]: /docs/article-page/nodejs/start/getting-started
[ravendb-nodejs]: /docs/article-page/nodejs/client-api/session/what-is-a-session-and-how-does-it-work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://ravendb.net + current URL

The provided certificate may not be the right one, may have the wrong password, or may lack
permissions. Double-check that the certificate works locally.

[docs-create-db]: /docs/article-page/nodejs/studio/database/create-new-database/general-flow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://ravendb.net + current URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants