This directory contains Bash scripts for deploying and validating the sample using the lstk CLI. For details about the sample application, see Front Door and Function Apps.
- LocalStack for Azure
- Docker
- Azure CLI
- lstk CLI
- jq and
zip
| Script | Purpose |
|---|---|
deploy.sh |
Idempotently provisions two Function Apps and their storage on a shared App Service plan, deploys the same zip package to both, then creates the Front Door profile, endpoint, two origin groups, three origins, the rule set with its three rules, and the two routes. Prints the endpoint URL and the commands to try it. |
validate.sh |
Walks the whole chain (origin health and the probe method, routing, route specificity, origin priority, the three rules, caching and purge, the headers the edge adds, an origin error, the endpoint's enabled state) and exits non-zero on any failure. |
call-front-door.sh |
Quick user-level smoke test: read a catalog item, read it again from the edge cache, follow the rewrite and the redirect, and print what the origin received. |
cleanup.sh |
Deletes the resource group and the local zip artifact. |
- The scripts read
az account show --query environmentNameand adjust two things for the emulator: the routes forward to the origins over plain HTTP, and the endpoint is called through its*.afd.azure.localhost.localstack.cloud:4566alias rather than its*.azurefd.nethost name. deploy.shsupports both spellings ofaz afd rule create: the flattened arguments of Azure CLI 2.83 and earlier, and the--conditions/--actionsshorthand of thecdnextension used from 2.85 on.