Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
465 commits
Select commit Hold shift + click to select a range
26f358d
add debug
nagendramishr Oct 24, 2025
4c90040
rem debug
nagendramishr Oct 24, 2025
26150fc
ren maxPasses to maxLoop
nagendramishr Oct 24, 2025
bae67e6
fix multipass mode
nagendramishr Oct 24, 2025
7f70e0a
call apropriate iterator
nagendramishr Oct 24, 2025
235947a
call apropriate iterator
nagendramishr Oct 24, 2025
10edb4d
add MaxAttempts and IterationMode
nagendramishr Oct 24, 2025
16dbdeb
implemt singlePass and multiPass modes, rename maxLoop to maxAttempts
nagendramishr Oct 24, 2025
357b661
rename maxLoop to maxAttempts
nagendramishr Oct 24, 2025
775a724
call apropriate host iterator depending on config, exit after 1st 412…
nagendramishr Oct 24, 2025
97f5dfb
added Microsoft.Extensions.Logging.Abstractions for logging debug sce…
nagendramishr Oct 28, 2025
2e84182
pull code from backends into a backendTokenProvider service
nagendramishr Oct 28, 2025
9c46f99
expand parser to allow each endpoint to specify its own oauth audience
nagendramishr Oct 28, 2025
da5843a
add Authentication type
nagendramishr Oct 28, 2025
b768c9f
moving audience into backendconfig
nagendramishr Oct 28, 2025
38ae529
remove dead code
nagendramishr Oct 28, 2025
cec4c89
remove unused TelemetryClient
nagendramishr Oct 28, 2025
a4a2142
remove unused TelemetryClient, set auth based on backend
nagendramishr Oct 28, 2025
d8491de
move OAuth into backendconfig, add direct and APIM types
nagendramishr Oct 28, 2025
81b170a
remove unused TelemetryClient
nagendramishr Oct 28, 2025
9ff310e
register BackendTokenProvider with DI
nagendramishr Oct 28, 2025
c3ad35c
shutdown BackendTokenProvider after backends have stopped
nagendramishr Oct 28, 2025
6e2ff36
move auth check into BackendHostConfig, make waiting for token awaitable
nagendramishr Oct 29, 2025
c49cd07
add debug to indicate if auth token was provided
nagendramishr Oct 29, 2025
27a6ad4
rename to BaseHostHealth.cs
nagendramishr Oct 29, 2025
81ee773
ren files
nagendramishr Oct 29, 2025
a999b80
rename BackendHostConfig => HostConfig, BackendHostHealth => BaseHost…
nagendramishr Oct 29, 2025
f25ebbf
create Probable HostHealth and a nonProbable HostHealth class
nagendramishr Oct 29, 2025
508d2eb
rename HostConfig => Config to improve readability
nagendramishr Oct 29, 2025
397ab35
add URL matching when selecting hosts for the iterators
nagendramishr Oct 29, 2025
1464c97
move iterator realted code into Backends/Iterators
nagendramishr Oct 30, 2025
6dfdbc8
move iterator realted code into Backends/Iterators
nagendramishr Oct 30, 2025
187e98e
move iterator realted code into Backends/Iterators
nagendramishr Oct 30, 2025
001eefd
rename IBackendHostIterator => IHostIterator, BackendHostIteratorFact…
nagendramishr Oct 30, 2025
78584c3
Delete test/openai/call-nvmtr2apim.sh
nagendramishr Oct 30, 2025
30944f5
Delete test/openai/call-localhost.sh
nagendramishr Oct 30, 2025
592275d
Delete test/openai/call-nvmtr2apim.sh
nagendramishr Oct 30, 2025
302a27d
Merge branch 'feature-direct-backend' of github.com:microsoft/SimpleL…
nagendramishr Oct 30, 2025
f0757df
Delete test/openai/call-localhost.sh
nagendramishr Oct 30, 2025
d3e9023
Merge branch 'feature-direct-backend' of github.com:microsoft/SimpleL…
nagendramishr Oct 30, 2025
addbcad
extracted circuitbreaker code into its own class
nagendramishr Oct 30, 2025
4409538
defer the creation of the backends until after DI is completed
nagendramishr Oct 30, 2025
13663fa
give each backend its own circuit breaker
nagendramishr Oct 30, 2025
93306ba
move OAuth code into try catch, use the backend level CB
nagendramishr Oct 30, 2025
6ccc629
rework to use a circular bool[] rather than a queue<bool>
nagendramishr Oct 30, 2025
7da2e3f
fix for timeouts > 100 seconds
nagendramishr Nov 3, 2025
2ec9c0b
add testing scenarios
nagendramishr Nov 10, 2025
4b79227
add testing scenarios
nagendramishr Nov 10, 2025
7afc41e
fix logging
nagendramishr Nov 10, 2025
5728d07
track stream processor name for logging
nagendramishr Nov 10, 2025
8c9a7c7
fixes for messages injected via service bus
nagendramishr Nov 10, 2025
c15925a
fix logging
nagendramishr Nov 10, 2025
ec42774
fixes for messages injected via service bus
nagendramishr Nov 10, 2025
79acd6a
fixes for messages injected via service bus
nagendramishr Nov 10, 2025
504e550
fix logging
nagendramishr Nov 10, 2025
cd1184b
fix logging
nagendramishr Nov 10, 2025
f35384f
fix logging
nagendramishr Nov 10, 2025
f66af61
auto format
nagendramishr Nov 10, 2025
d61f333
move classification to config
nagendramishr Nov 10, 2025
b210493
move classification to config
nagendramishr Nov 10, 2025
13bd69d
dont force probepath in directmode
nagendramishr Nov 10, 2025
037bc71
add concept of a global circuit breaker
nagendramishr Nov 10, 2025
8aeaba4
move classification to config
nagendramishr Nov 10, 2025
abe0817
fix logging
nagendramishr Nov 10, 2025
8178780
dont update backup status unless in async mode
nagendramishr Nov 10, 2025
6e015c6
fixes for messages injected via service bus
nagendramishr Nov 10, 2025
e604715
fix logging
nagendramishr Nov 10, 2025
55bf98e
update to use ActivityLog Array rather than updating a string, use la…
nagendramishr Nov 13, 2025
28dae02
convert logInformation to logDebug
nagendramishr Nov 18, 2025
b1f2d1d
add comment
nagendramishr Nov 18, 2025
934f607
add comment
nagendramishr Nov 18, 2025
79e2df3
add BackgroundRequestCompleted to identify completed background jobs
nagendramishr Nov 18, 2025
f1aa04c
add comment
nagendramishr Nov 18, 2025
4795aaf
add comment
nagendramishr Nov 18, 2025
38d30f9
update status updates for background requests
nagendramishr Nov 18, 2025
89d420b
implement BackgroundCompleted
nagendramishr Nov 18, 2025
dc44591
updates for demo
nagendramishr Nov 18, 2025
c9ea327
remove dead code
nagendramishr Nov 19, 2025
c870d35
log exception type and message
nagendramishr Nov 19, 2025
6b3206a
move into its own class
nagendramishr Nov 19, 2025
5c67fb5
fix bug where direct hosts were being probed
nagendramishr Nov 19, 2025
ce8e708
remove unused GetHostIterator
nagendramishr Nov 19, 2025
89c2952
reuseParsedConfig, bug fixes for directMode, streamling path matching
nagendramishr Nov 19, 2025
d740289
streamline partiap path match, return updated path with the prefix
nagendramishr Nov 19, 2025
aeeafc5
add ip to host config parsing
nagendramishr Nov 19, 2025
91a8351
new class to indicate partial match + updated path without the prefix
nagendramishr Nov 19, 2025
210d0dd
remove debug stack trace printouts
nagendramishr Nov 19, 2025
eadacdf
for direct mode, use the modified path, use specified tokenprocessor,…
nagendramishr Nov 19, 2025
1451daa
remove debug
nagendramishr Nov 19, 2025
5661aed
add support for using managed identity for EventHub logs, cleaned up …
nagendramishr Nov 20, 2025
ca5d536
log startup error
nagendramishr Nov 20, 2025
4bbb56e
initial version of EventHub2Storage
nagendramishr Nov 21, 2025
d816a29
rename vars to adhere to coding convention
nagendramishr Nov 21, 2025
ecab627
add Async to method name as needed
nagendramishr Nov 21, 2025
da17dfd
minor changes to closer align to best practices
nagendramishr Nov 21, 2025
03db732
Replaced String Interpolation with Structured Parameters for logging
nagendramishr Nov 21, 2025
7ca356d
add comment blocks
nagendramishr Nov 21, 2025
f722cd9
move stream processor logic out of ProxyWorker and into StreamProcess…
nagendramishr Nov 21, 2025
546f9a6
move health probe related code into HealthCheckService
nagendramishr Nov 21, 2025
ceaef06
move HealthCheck into DI
nagendramishr Nov 21, 2025
dcb5f5d
continue cleanup and simplification
nagendramishr Nov 21, 2025
c58b45e
use the new requestType for simpler logic
nagendramishr Nov 21, 2025
5efc362
move code to lifecycle class in order to simplify proxy, simplify exc…
nagendramishr Nov 21, 2025
92694bd
string interpolation is faster than concat, add readonly fields. rena…
nagendramishr Nov 21, 2025
de9f262
cleanup disposal leak
nagendramishr Nov 21, 2025
573a63b
pull code out to eventDataBuilder
nagendramishr Nov 24, 2025
0ae3bf8
pull code out to eventDataBuilder, strip out optional headers
nagendramishr Nov 24, 2025
50455b5
remove warnings
nagendramishr Nov 24, 2025
724073d
remove warnings
nagendramishr Nov 24, 2025
5778a73
add Hostname for probe and calling
nagendramishr Nov 24, 2025
fdd5d21
split Strip Headers into StripRequest and StripResponse Headers
nagendramishr Nov 24, 2025
9907474
remove warnings
nagendramishr Nov 24, 2025
6d0fc68
split Strip Headers into StripRequest and StripResponse Headers
nagendramishr Nov 24, 2025
5f35b7e
re-order to a more logical structure
nagendramishr Nov 24, 2025
7fcaf6b
init the static logger
nagendramishr Nov 24, 2025
d5cbe7a
uncomment auth header, call GetStats
nagendramishr Nov 24, 2025
512338c
sentEventBuilder to proxyworker
nagendramishr Nov 24, 2025
cb24fe6
add debug logging
nagendramishr Nov 24, 2025
ae8beed
fix newlines
nagendramishr Nov 24, 2025
21c16aa
add gemini2-5.pro
nagendramishr Nov 24, 2025
2d7b7a4
fixes for testing
nagendramishr Nov 24, 2025
9ebe618
moved code arount to simplify setup
nagendramishr Nov 24, 2025
241e8df
improved logging details, return 408 on timeout, 429 on concurrency l…
nagendramishr Nov 26, 2025
8cbb20f
remove unnecessary retry exceeded response section
nagendramishr Nov 26, 2025
dc697c3
added EVENTHUB_STARTUP_SECONDS to configure startup delay
nagendramishr Dec 1, 2025
21ed3f5
use reflection rather than specific field names
nagendramishr Dec 1, 2025
a24e568
updated library versions for Core, Identity, ServiceBus, BlobStorage …
nagendramishr Dec 1, 2025
cce8530
minor perf improvement for checking headers
nagendramishr Dec 1, 2025
0b1e61c
add support for echo api
nagendramishr Dec 1, 2025
833d19b
added consolidated config env var: AsyncSBConfig
nagendramishr Dec 2, 2025
4ee8646
fix filename, cleanup race condition, remove potential dataloss
nagendramishr Dec 2, 2025
9d47bad
check for unauthorized errors
nagendramishr Dec 2, 2025
eaaf9b1
updates for header removal
nagendramishr Dec 2, 2025
3850202
consolidate config for blobstorage
nagendramishr Dec 2, 2025
691b42a
add backup stats to health probe
nagendramishr Dec 2, 2025
e1d082e
return better responses when storage is disabled
nagendramishr Dec 2, 2025
c45da68
add connection stats for health probe
nagendramishr Dec 2, 2025
277b8ab
enhance logging
nagendramishr Dec 2, 2025
631df43
don't activate async mode if blob storage is disabled
nagendramishr Dec 2, 2025
ba0587e
update to use key=value, ... rather than key:value, ...
nagendramishr Dec 2, 2025
1e4e9a4
add SAS token toggle to disable SAS tokens at the profile level
nagendramishr Dec 3, 2025
671ed04
add SAS token toggle to disable SAS tokens at the profile level
nagendramishr Dec 3, 2025
09359c4
add SAS token toggle to disable SAS tokens at the profile level
nagendramishr Dec 3, 2025
93d698e
add code to retry blob operations on failure
nagendramishr Dec 3, 2025
0b5b55c
add code to get the nonSAS uri for a blob
nagendramishr Dec 3, 2025
890dcd8
add debug/trace logging to help trace an operations
nagendramishr Dec 3, 2025
00d8570
add enhanced logging policy
nagendramishr Dec 4, 2025
7984a5b
add null check for backup service
nagendramishr Dec 4, 2025
004af8c
remove log when servicebus is not being used
nagendramishr Dec 4, 2025
fa934e7
add AsyncAllowed in user profiles
nagendramishr Dec 4, 2025
bb957d3
better error checking during asyncFeeder startup
nagendramishr Dec 4, 2025
b28d655
bug fix for when async mode is disabled
nagendramishr Dec 4, 2025
4b1810e
remove debug
nagendramishr Dec 4, 2025
45fa79b
add queue blob writer
nagendramishr Dec 8, 2025
33c45de
capture backend config errors
nagendramishr Dec 8, 2025
825b27b
fix background request calling URL's
nagendramishr Dec 8, 2025
7f65d00
add circuitbreaker stats, logging
nagendramishr Dec 8, 2025
938a932
add circuitbreaker stats, logging
nagendramishr Dec 8, 2025
17055b7
streamline blob creation until needed
nagendramishr Dec 8, 2025
00c4934
return 503 instead of -1 on error
nagendramishr Dec 8, 2025
a44afc8
streamline blob creation until needed
nagendramishr Dec 8, 2025
b43368b
streamline blob creation until needed
nagendramishr Dec 8, 2025
8906352
add .body to blob name
nagendramishr Dec 8, 2025
5aed899
log to events.json instead of events.log
nagendramishr Dec 9, 2025
8b4953f
add UserConfigRequired
nagendramishr Dec 9, 2025
41b6c21
add code to check number of user profiles if UserConfigRequired is set
nagendramishr Dec 9, 2025
56238bd
integrate user profile check into health probe
nagendramishr Dec 9, 2025
d312373
added check for status 200 with no content
nagendramishr Dec 9, 2025
c9c8129
added check for status 200 with no content
nagendramishr Dec 9, 2025
e03b119
update version to 2.2.8.p2
nagendramishr Dec 9, 2025
1b070f4
implement optimization, if several writes to the same blob, only do t…
nagendramishr Dec 11, 2025
03f8d73
add trace logs
nagendramishr Dec 11, 2025
b8ca2b2
add AsyncTTLSecs
nagendramishr Dec 11, 2025
00819b6
add trace logs
nagendramishr Dec 11, 2025
bb0108d
adapt build to include shared code
nagendramishr Dec 11, 2025
cc22827
adapt build to include shared code
nagendramishr Dec 11, 2025
914f45b
use AsyncTTLSecs for upgraded async requests
nagendramishr Dec 11, 2025
f3b8ce9
add options to AsyncWorker constructor to support AsyncTTLSecs
nagendramishr Dec 11, 2025
23a6fe9
logging fix, fix accidental indent
nagendramishr Dec 11, 2025
ca42a46
logging fix
nagendramishr Dec 11, 2025
a67d785
bug fix for probe requests to bypass the queue and locks, add guard t…
nagendramishr Dec 11, 2025
159211a
simplify startup to inject null classes when async is disabled
nagendramishr Dec 12, 2025
d3b7d37
remove noisy log when async is disabled
nagendramishr Dec 12, 2025
0a099da
add state to circuit breaker event log
nagendramishr Dec 12, 2025
ed83f22
add state to circuit breaker event log
nagendramishr Dec 12, 2025
f9a98c4
add state to circuit breaker event log
nagendramishr Dec 12, 2025
9d41ddf
simplify startup to inject null classes when async is disabled
nagendramishr Dec 12, 2025
4df028b
simplify startup to inject null classes when async is disabled
nagendramishr Dec 12, 2025
409466c
pull out the AsyncFactory interface into its on file
nagendramishr Dec 12, 2025
b6ac953
improve the message when a circuit breaker is triggered, attempt to …
nagendramishr Dec 12, 2025
af34336
revert to 40ms delay
nagendramishr Dec 12, 2025
7dbbf71
rename to uppercase
nagendramishr Dec 17, 2025
88f12b7
rename to uppercase, add deploy script
nagendramishr Dec 17, 2025
1881abd
initial checkin
nagendramishr Jan 12, 2026
be0e324
cleanup for function deployment, move optional CosmosDB files into su…
nagendramishr Jan 12, 2026
64d76fa
initial version
nagendramishr Jan 12, 2026
7b1adba
cleanup
nagendramishr Jan 12, 2026
873b33c
local testing update
nagendramishr Jan 12, 2026
5b1888d
remove health probe from proxyWorker, bug fixes
nagendramishr Jan 12, 2026
4cb534f
pull workerState into its own class file
nagendramishr Jan 12, 2026
c2ab848
signalimg improvements
nagendramishr Jan 12, 2026
07112d2
add dispose to remove GC complexity
nagendramishr Jan 12, 2026
d1cdf5c
pull out workerstate, add gethealthstatus for probeserver to call, up…
nagendramishr Jan 12, 2026
21081a2
dispose batches after use
nagendramishr Jan 12, 2026
57e6b3b
add config for health probe sidecar
nagendramishr Jan 12, 2026
ed26f0c
add config for health probe sidecar
nagendramishr Jan 12, 2026
0dfed05
fixes to send host header to host
nagendramishr Jan 12, 2026
a2d85de
update to dotnet 10
nagendramishr Jan 12, 2026
e2e411b
uses probeserver to handle probe requests, if probeserver is disabled…
nagendramishr Jan 12, 2026
0991eaa
uses probeserver to handle probe requests, if probeserver is disabled…
nagendramishr Jan 12, 2026
2419e2a
add probe server to DI, log stack trace for errors
nagendramishr Jan 12, 2026
64f46c7
add support for /health and /forcegc back in
nagendramishr Jan 13, 2026
7e2a241
reuse event objects
nagendramishr Jan 13, 2026
44edcd9
limit the latency queue size to 1000
nagendramishr Jan 13, 2026
28e610a
use hashset instead of int[] for allowablecodes, reuse event object
nagendramishr Jan 13, 2026
46a61b8
bug fix for not starting up eventhub client
nagendramishr Jan 13, 2026
1d85d8b
add /health and /forcegc responses
nagendramishr Jan 13, 2026
8e6ab44
re-enable health probe, reuse event objects
nagendramishr Jan 13, 2026
664fc6c
added profileError, move Ver, Revision and ContainerApp to transmit side
nagendramishr Jan 13, 2026
00b6977
added a simpler constructor
nagendramishr Jan 13, 2026
3e124cd
updated release notes
nagendramishr Jan 13, 2026
886dd15
improve the logging details
nagendramishr Jan 15, 2026
2b7b10a
extract healprobe to new method, match with non-stream code flow, add…
nagendramishr Jan 15, 2026
73f54bd
explain the different request types
nagendramishr Jan 15, 2026
dabce15
track the response message (for streaming)
nagendramishr Jan 15, 2026
5297011
add support to reload config and abort a test
nagendramishr Jan 15, 2026
c12712c
remove dead code
nagendramishr Jan 15, 2026
f137ea3
add forcegc
nagendramishr Jan 15, 2026
d306771
reorg the deployment folder
nagendramishr Jan 15, 2026
c086a29
add doc
nagendramishr Jan 15, 2026
bbc1fd4
share host iterators based on the path
nagendramishr Jan 15, 2026
e76d5d5
add TrackWorkers flag
nagendramishr Jan 15, 2026
7ccbb0f
observe TrackWorkers
nagendramishr Jan 15, 2026
efc6961
return early if not doing async
nagendramishr Jan 15, 2026
abe12f1
add error log when response is not defined
nagendramishr Jan 15, 2026
b4949d5
Add helper method to output proxyData details
nagendramishr Jan 15, 2026
42d5ba1
merged latest code changes
nagendramishr Jan 16, 2026
95d9241
cleanup for readability
nagendramishr Jan 16, 2026
759fbdf
sidecar updates
nagendramishr Jan 16, 2026
0f1fd55
explain the apim policy better, have a single master readme.md at the…
nagendramishr Jan 16, 2026
6b5f094
improve for clarity
nagendramishr Jan 16, 2026
cff085b
update release note
nagendramishr Jan 16, 2026
7224f24
update to return the novel rather than "welcome to azure"
nagendramishr Jan 16, 2026
5a0b3cf
read the token processor from an env var, default to OpenAI
nagendramishr Jan 16, 2026
fc06330
read the token processor from an env var, default to OpenAI
nagendramishr Jan 16, 2026
1d9fbdf
Merge branch 'Streaming-Release-TR' into feature-direct-backend
nagendramishr Jan 16, 2026
2aa8e7b
Merge pull request #106 from microsoft/feature-direct-backend
nagendramishr Jan 16, 2026
3040328
added back missing rel notes
nagendramishr Jan 16, 2026
1c15c77
manually recopy files across
nagendramishr Jan 16, 2026
abd96f7
remove warnings
nagendramishr Jan 16, 2026
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
2 changes: 2 additions & 0 deletions .azure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore local development environment file which is auto-generated
local-dev.env
143 changes: 143 additions & 0 deletions .azure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# SimpleL7Proxy Deployment with Azure Developer CLI (AZD)

This guide helps you deploy the SimpleL7Proxy service to Azure using the Azure Developer CLI (AZD).

## Prerequisites

1. [Azure Developer CLI (AZD)](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd)
2. [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
3. [Docker](https://www.docker.com/products/docker-desktop/)

## Deployment Steps

### 1. Clone the Repository

```bash
git clone <repository-url>
cd SimpleL7Proxy
```

### 2. Run the Setup Script

#### For Windows:

```powershell
# Run in PowerShell
.\.azure\setup.ps1
```

#### For Linux/macOS:

```bash
# Make the script executable
chmod +x .azure/setup.sh

# Run the setup script
./.azure/setup.sh
```

The setup script will:
- Verify prerequisites
- Ask you for deployment configuration
- Create an AZD environment with your settings

### 3. Deploy the Infrastructure

```bash
azd provision
```

This command will deploy the Azure infrastructure defined in the Bicep templates:
- Azure Container Registry
- Azure Container App Environment
- Azure Container App
- Storage Account
- Log Analytics Workspace (if enabled)
- Application Insights (if enabled)
- Virtual Network (if enabled)

### 4. Build and Deploy the Application

#### For Windows:

```powershell
# Run in PowerShell
.\.azure\deploy.ps1
```

#### For Linux/macOS:

```bash
# Make the script executable
chmod +x .azure/deploy.sh

# Run the deployment script
./.azure/deploy.sh
```

The deployment script will:
- Build the Docker image
- Push it to Azure Container Registry
- Update the Container App with the new image

Alternatively, you can use the AZD all-in-one command:

```bash
azd up
```

## Configuration Options

For detailed configuration options, see the [questionnaire](questionnaire.md).

Key configuration areas include:
- Azure environment settings
- Container configuration
- Network configuration
- Authentication settings
- Storage configuration
- Backend services
- Monitoring configuration
- Advanced settings

## Deployment Scenarios

To simplify the deployment process, several predefined scenarios are available that configure common deployment patterns:

### Available Scenarios

1. **Local Proxy with Public APIM** - For local development with a public APIM backend
2. **ACA Proxy with Public APIM** - For Azure Container Apps deployment with a public APIM backend
3. **VNET Proxy Deployment** - For secure deployment within a Virtual Network

When running the setup script, you can choose to use one of these predefined scenarios instead of manually configuring all settings.

For more information about scenarios and how to customize them, see the [scenarios README](scenarios/README.md).

## Post-Deployment

After deployment:

1. Access your SimpleL7Proxy service at the URL provided at the end of the deployment
2. Configure additional settings through environment variables in the Azure Portal
3. Monitor your service using Application Insights

## Troubleshooting

If you encounter issues:

1. Check Azure Container App logs in the Azure Portal
2. Verify the Azure Container App configuration
3. Check Application Insights for error logs

## Cleanup

To remove deployed resources:

```bash
azd down
```

## Additional Documentation

For more information about SimpleL7Proxy, refer to the [main documentation](../README.md).
87 changes: 87 additions & 0 deletions .azure/aca-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash

# ACA-specific setup helper for SimpleL7Proxy
echo "========================================================"
echo " SimpleL7Proxy Azure Container Apps (ACA) Setup"
echo "========================================================="
echo ""

read_input() {
local prompt="$1"
local default="$2"
local input=""
if [ -n "$default" ]; then
prompt="$prompt [$default]"
fi
read -p "$prompt: " input
if [ -z "$input" ] && [ -n "$default" ]; then
input="$default"
fi
echo "$input"
}

echo "🔧 Configuring Container App settings (ACA)..."

# Container App name
default_app_name="${env_AZURE_CONTAINER_APP_NAME:-s7p-${environment}}"
container_app_name=$(read_input "Enter Container App name" "$default_app_name")

# Container registry
default_acr="${env_AZURE_CONTAINER_REGISTRY_NAME:-}"
container_registry=$(read_input "Enter container registry name or leave blank for default" "$default_acr")
if [ -z "$container_registry" ]; then
container_registry="acr${environment}s7p"
fi

# Container App Environment
default_env_ca="${env_AZURE_CONTAINER_APP_ENVIRONMENT_NAME:-}"
container_app_env=$(read_input "Enter Container App Environment name or leave blank for default" "$default_env_ca")
if [ -z "$container_app_env" ]; then
container_app_env="cae-${environment}-s7p"
fi

echo ""
echo "🔧 Scaling Configuration (ACA)"
default_min="${env_AZURE_CONTAINER_APP_MIN_REPLICAS:-1}"
default_max="${env_AZURE_CONTAINER_APP_MAX_REPLICAS:-5}"
min_replicas=$(read_input "Enter minimum number of replicas" "$default_min")
max_replicas=$(read_input "Enter maximum number of replicas" "$default_max")

echo ""
echo "🔧 Network Configuration (ACA)"
default_vnet="${env_USE_VNET:-no}"
use_vnet=$(read_input "Do you want to deploy in a VNET? (yes/no)" "$default_vnet")
vnet_prefix=""
subnet_prefix=""
if [ "$use_vnet" = "yes" ] || [ "$use_vnet" = "true" ]; then
use_vnet="true"
echo ""
default_vnet_prefix="${env_VNET_ADDRESS_PREFIX:-10.0.0.0/16}"
default_subnet_prefix="${env_SUBNET_ADDRESS_PREFIX:-10.0.0.0/21}"
vnet_prefix=$(read_input "Enter VNET address space" "$default_vnet_prefix")
subnet_prefix=$(read_input "Enter subnet address space" "$default_subnet_prefix")
else
use_vnet="false"
fi

echo ""
echo "⏳ Applying ACA settings to AZD environment..."

# Ensure AZD environment exists/selected before setting ACA vars
azd env set AZURE_CONTAINER_REGISTRY_NAME "$container_registry"
azd env set AZURE_CONTAINER_APP_NAME "$container_app_name"
azd env set AZURE_CONTAINER_APP_ENVIRONMENT_NAME "$container_app_env"
azd env set AZURE_CONTAINER_APP_MIN_REPLICAS "$min_replicas"
azd env set AZURE_CONTAINER_APP_MAX_REPLICAS "$max_replicas"
azd env set USE_VNET "$use_vnet"
[ "$use_vnet" = "true" ] && azd env set VNET_ADDRESS_PREFIX "$vnet_prefix"
[ "$use_vnet" = "true" ] && azd env set SUBNET_ADDRESS_PREFIX "$subnet_prefix"

echo "✅ ACA settings applied."

echo "📋 ACA Summary:"
echo " • Container App: $container_app_name"
echo " • Container Registry: $container_registry"
echo " • Container App Environment: $container_app_env"
echo " • Replicas: min=$min_replicas, max=$max_replicas"
echo " • Use VNET: $use_vnet"
130 changes: 130 additions & 0 deletions .azure/azd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"version": "0.1.0-alpha",
"name": "simple-l7-proxy",
"description": "SimpleL7Proxy is a layer 7 proxy service that supports prioritization, retries, and timeouts",
"resources": {
"simpleL7Proxy": {
"type": "application",
"properties": {
"language": "dotnet",
"host": "containerapp",
"services": {}
}
}
},
"parameters": {
"environmentName": {
"type": "string",
"defaultValue": "dev",
"metadata": {
"description": "Environment name (dev, test, prod)"
}
},
"location": {
"type": "string",
"defaultValue": "westus2",
"metadata": {
"description": "Azure region for the deployment"
}
},
"containerAppMinReplicas": {
"type": "int",
"defaultValue": 1,
"metadata": {
"description": "Minimum number of Container App replicas"
}
},
"containerAppMaxReplicas": {
"type": "int",
"defaultValue": 5,
"metadata": {
"description": "Maximum number of Container App replicas"
}
},
"useVNET": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Flag to determine if VNET should be used"
}
},
"vnetAddressPrefix": {
"type": "string",
"defaultValue": "10.0.0.0/16",
"metadata": {
"description": "VNET address space"
}
},
"subnetAddressPrefix": {
"type": "string",
"defaultValue": "10.0.0.0/21",
"metadata": {
"description": "Subnet address space"
}
},
"enableAuthentication": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Flag to enable authentication"
}
},
"authType": {
"type": "string",
"defaultValue": "none",
"allowedValues": ["entraID", "servicebus", "none"],
"metadata": {
"description": "Authentication type"
}
},
"useAsyncStorage": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Flag to enable async storage features"
}
},
"backendHostURLs": {
"type": "string",
"metadata": {
"description": "Comma-separated list of backend URLs"
}
},
"defaultRequestTimeout": {
"type": "int",
"defaultValue": 100000,
"metadata": {
"description": "Default timeout for requests in milliseconds"
}
},
"enableAppInsights": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Flag to enable Application Insights"
}
},
"queuePriorityLevels": {
"type": "int",
"defaultValue": 3,
"metadata": {
"description": "Number of priority levels to configure"
}
},
"enableScaleRule": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Enable auto-scaling based on HTTP concurrent requests"
}
},
"httpConcurrentRequestsThreshold": {
"type": "int",
"defaultValue": 10,
"metadata": {
"description": "Number of concurrent requests that trigger scaling"
}
}
}
}
Loading