Skip to content

Instantly share code, notes, and snippets.

View paulyuk's full-sized avatar

Paul Yuknewicz paulyuk

View GitHub Profile
@paulyuk
paulyuk / localsettings.md
Created November 13, 2024 05:18
local.settings.json

RAG

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "AZURE_OPENAI_ENDPOINT": "https://cog-c33gk4hhzykak.openai.azure.com/",
 "CHAT_MODEL_DEPLOYMENT_NAME": "chat",
@paulyuk
paulyuk / dotnetconf2024-samples.md
Last active November 15, 2024 17:43
Samples - .NET Conf 2024 Building and Scaling Intelligent Apps

Samples for Building and Deploying Cloud Native Intelligent Apps

.NET Conf 2024

by Scott Hunter @coolcsh and Paul Yuknewicz @paulyuk

Here are all the demos shown in our session with full repos, azd templates, and a few notes. Enjoy, and let us know what you think! -- Scott and Paul

Part 1 - Aspire 9 & Functions

@paulyuk
paulyuk / devdays-snippets.md
Last active October 23, 2024 11:35
Developer Days 2024

Configuring scale

General command to set

az functionapp scale config set --resource-group <RESOURCE_GROUP> --name <APP_NAME> --trigger-type http --trigger-settings perInstanceConcurrency=10

e.g. set to 2 events per instance

@paulyuk
paulyuk / redis.yaml
Last active July 24, 2024 05:41
redis.yaml that works with `dapr init -k --dev`
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
metadata:
# These settings will work out of the box if you use `helm install
# bitnami/redis`. If you have your own setup, replace

How to - Securing your Azure Function

Paul's secret mision "do this, and dont do that"

Using indentity

Using identity for AzureWebJobsStorage

Using identity for Bindings

Using identity for Deployment

Networking

Setting up vnet in your function app

@paulyuk
paulyuk / flex-commands.md
Last active October 23, 2024 11:21
Extreme Scale Snippets

Snippets for Functions Under the Hood at Scale

Configuring scale

General command to set

az functionapp scale config set --resource-group <RESOURCE_GROUP> --name <APP_NAME> --trigger-type http --trigger-settings perInstanceConcurrency=10

e.g. set to 2 events per instance

@paulyuk
paulyuk / function-user-identity-101.md
Last active June 7, 2024 19:37
Converting a Function App to Managed Identity - 101

Converting a Function App to Managed Identity - 101

Overview

This shows how to take a simple Function App (e.g. the output of our client tools templates for a trigger or binding) or a simple sample and "modernize" it from using ConnectionStrings and secrets in favor of Managed Identity and RBAC.

Assumptions

  • User-assigned managed identity is prefered. Beware if you do not select an identity to use in code (ClientId), it will default to system assigned.
  • local development will make Connections to local emulators if they exist, and otherwise will make remote cloud connections to resource using identity based connections. Some resources like Service Bus, AI Cognitive, Open AI, and Datalake will
@paulyuk
paulyuk / flex-scaling-notes.md
Last active September 23, 2024 10:11
Flex Consumption Scaling Under the Hood Notes
@paulyuk
paulyuk / gist:c0a6ad7fd125a931c66788f57d205800
Created April 3, 2024 15:16
Flex beta function - from Portal (eastasia)
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_py_flex_beta_function2_name": {
"defaultValue": "py-flex-beta-function2",
"type": "String"
},
"serverfarms_py_flex_beta_function2FlexPlan_externalid": {
"defaultValue": "/subscriptions/ca5ce512-88e1-44b1-97c6-22caf84fb2b0/resourceGroups/py-flex-beta-2/providers/Microsoft.Web/serverfarms/py-flex-beta-function2FlexPlan",
@paulyuk
paulyuk / azurefunctionsps.md
Last active June 20, 2023 21:00
Install tools for Azure Functions PowerShell prerelease

PowerShell

install latest - 7.3

winget search Microsoft.PowerShell
winget install --id Microsoft.Powershell

or alternatively:

OPTIONAL install PowerShell preview - 7.4