You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This repository provides a playground to safely experiment with and learn Azure
6
6
7
7
_If you are interested in APIM & Azure OpenAI integrations, please check out the excellent [AI Gateway](https://github.com/Azure-Samples/AI-Gateway) GitHub repository._
8
8
9
-
## Objectives
9
+
## 🎯 Objectives
10
10
11
11
1. Educate you on common APIM architectures we see across industries and customers.
12
12
1. Empower you to safely experiment with APIM policies.
@@ -16,9 +16,9 @@ _Try it out, learn from it, apply it in your setups._
16
16
17
17
---
18
18
19
-
## Getting Started
19
+
## 🚀 Getting Started
20
20
21
-
### Prerequisites
21
+
### 📋 Prerequisites
22
22
23
23
These prerequisites apply broadly across all infrastructure and samples. If there are specific deviations, expect them to be noted there.
24
24
@@ -29,7 +29,7 @@ These prerequisites apply broadly across all infrastructure and samples. If ther
29
29
-[An Azure Subscription](https://azure.microsoft.com/free/) with Owner or Contributor+UserAccessAdministrator permissions. Execute [shared/jupyter/verify-az-account.ipynb](shared/jupyter/verify-az-account.ipynb) to verify.
30
30
-[Sign in to Azure with Azure CLI](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively)
31
31
32
-
### Initialization
32
+
### 🛠️ Initialization
33
33
34
34
Run through the following steps to create a Python virtual environment before doing anything else:
35
35
@@ -44,15 +44,15 @@ Run through the following steps to create a Python virtual environment before do
44
44
45
45
The first time you run a Jupyter notebook, you'll be asked to install the Jupyter kernel package (ipykernel).
46
46
47
-
### List of Samples
47
+
### 📁 List of Samples
48
48
49
49
| Sample Name | Description | Supported Infrastructure(s) |
|[General](./samples/general/create.ipynb)| Basic demo of APIM sample setup and policy usage. | All infrastructures |
52
52
|[Load Balancing](./samples/load-balancing/create.ipynb)| Priority and weighted load balancing across backends. | apim-aca, afd-apim (with ACA) |
53
53
|[AuthX](./samples/authx/create.ipynb)| Authentication and role-based authorization in a mock HR API. | All infrastructures |
54
54
55
-
### Running a Sample
55
+
### ▶️ Running a Sample
56
56
57
57
1. Locate the specific sample's `create.ipynb` file and adjust the parameters under the `User-defined Parameters` header as you see fit.
58
58
1. Ensure that the specified infrastructure already exists in your subscription. If not, proceed to the desired infrastructure folder and execute its `create.ipynb` file. Wait until this completes before continuing.
@@ -62,9 +62,9 @@ Now that infrastructure and sample have been stood up, you can experiment with t
62
62
63
63
---
64
64
65
-
## Repo Structure
65
+
## 📂 Repo Structure
66
66
67
-
### High-level
67
+
### 🦅 High-level
68
68
69
69
- All _samples_ can be found in the `samples` folder. Samples showcase functionality and provide a baseline for your experimentation.
70
70
- All _infrastructures_ can be found in the `infrastructure` folder. They provide the architectural underpinnings.
@@ -74,14 +74,14 @@ Now that infrastructure and sample have been stood up, you can experiment with t
74
74
- Reusable _APIM policies_ are found in the `apim-policies` folder.
75
75
- Reusable Jupyter notebooks are found in the `jupyter` folder.
76
76
77
-
### Sample Setup
77
+
### ⚙️ Sample Setup
78
78
79
79
- Each sample uses an architecture infrastructure. This keeps the samples free of almost all setup.
80
80
- Each infrastructure and sample features a `create.ipynb` for creation (and running) of the sample setup and a `main.bicep` file for IaC configuration.
81
81
- Each infrastructure contains a `clean-up.ipynb` file to tear down everything in the infrastructure and its resource group. This reduces your Azure cost.
82
82
- Samples (and infrastructures) may contain additional files specific to their use cases.
83
83
84
-
### Infrastructure Architectures
84
+
### 🏛️ Infrastructure Architectures
85
85
86
86
We provide several common architectural approaches to integrating APIM into your Azure ecosystem. While these are high-fidelity setups, they are not production-ready. Please refer to the [Azure API Management landing zone accelerator](https://learn.microsoft.com/azure/cloud-adoption-framework/scenarios/app-platform/api-management/landing-zone-accelerator) for up-to-date production setups.
87
87
@@ -96,15 +96,15 @@ We provide several common architectural approaches to integrating APIM into your
96
96
97
97
---
98
98
99
-
## Development
99
+
## 🛠️ Development
100
100
101
101
As you work with this repo, you will likely want to make your own customizations. There's little you need to know to be successful.
102
102
103
103
The repo uses the bicep linter and has rules defined in `bicepconfig.json`. See the [bicep linter documentation](https://learn.microsoft.com/azure/azure-resource-manager/bicep/bicep-config-linter) for details.
104
104
105
105
**We welcome contributions!** Please consider forking the repo and creating issues and pull requests to share your samples. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. Thank you!
106
106
107
-
### Adding a Sample
107
+
### ➕ Adding a Sample
108
108
109
109
Adding a new sample is relatively straight-forward.
110
110
@@ -116,11 +116,11 @@ Adding a new sample is relatively straight-forward.
116
116
1. Test the sample with all supported infrastructures.
117
117
1. Create a pull request for merge.
118
118
119
-
### Testing & Code Coverage
119
+
### 🧪 Testing & Code Coverage
120
120
121
121
Python modules in `shared/python` are covered by comprehensive unit tests located in `tests/python`. All tests use [pytest](https://docs.pytest.org/) and leverage modern pytest features, including custom markers for unit and HTTP tests.
122
122
123
-
#### Running Tests Locally
123
+
#### 🚀 Running Tests Locally
124
124
125
125
-**PowerShell (Windows):**
126
126
- Run all tests with coverage: `./tests/python/run_tests.ps1`
@@ -137,26 +137,26 @@ You can also run tests manually and see details in the console:
After running tests, open `tests/python/htmlcov/index.html` in your browser to view detailed coverage information.
143
143
144
-
#### Pytest Markers
144
+
#### 🏷️ Pytest Markers
145
145
146
146
-`@pytest.mark.unit` — marks a unit test
147
147
-`@pytest.mark.http` — marks a test involving HTTP/mocking
148
148
149
149
Markers are registered in `pytest.ini` to avoid warnings.
150
150
151
-
#### Continuous Integration (CI)
151
+
#### ⚡ Continuous Integration (CI)
152
152
153
153
On every push or pull request, GitHub Actions will:
154
154
- Install dependencies
155
155
- Run all Python tests in `tests/python` with coverage
156
156
- Store the `.coverage` file in `tests/python`
157
157
- Upload the HTML coverage report as a workflow artifact for download
158
158
159
-
#### Additional Notes
159
+
#### 📝 Additional Notes
160
160
161
161
- The `.gitignore` is configured to exclude coverage output and artifacts.
162
162
- All test and coverage features work both locally and in CI.
@@ -165,13 +165,13 @@ For more details on pytest usage, see the [pytest documentation](https://docs.py
165
165
166
166
---
167
167
168
-
## Supporting Resources
168
+
## 📚 Supporting Resources
169
169
170
170
The APIM team maintains an [APIM policy snippets repo](https://github.com/Azure/api-management-policy-snippets) with use cases we have seen. They are not immediately executable samples and require integrations such as in this repo.
171
171
172
172
---
173
173
174
-
## Acknowledgements
174
+
## 🙏 Acknowledgements
175
175
176
176
This project has its roots in work done by [Alex Vieira](https://github.com/vieiraae) on the excellent Azure API Management [AI Gateway](https://github.com/Azure-Samples/AI-Gateway) GitHub repository. Much of the structure is similar and its reuse resulted in significant time savings. Thank you, Alex!
Copy file name to clipboardExpand all lines: infrastructure/afd-apim/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,17 @@ Secure architecture that takes all traffic off the public Internet once Azure Fr
4
4
5
5
<imgsrc="./Azure Front Door, API Management & Container Apps Architecture.svg"alt="Diagram showing Azure Front Door, API Management, and Container Apps architecture. Azure Front Door routes traffic to API Management, which then routes to Container Apps. Telemetry is sent to Azure Monitor."title="Azure Front Door, API Management & Container Apps Architecture"width="1000" />
6
6
7
-
## Objectives
7
+
## 🎯 Objectives
8
8
9
9
1. Provide a secure pathway to API Management via a private link from Front Door
10
10
1. Maintain private networking by integrating API Management with a VNet to communicate with Azure Container Apps. (This can also be achieved via a private link there)
11
11
1. Empower users to use Azure Container Apps, if desired
12
12
1. Enable observability by sending telemetry to Azure Monitor
13
13
14
-
## Configuration
14
+
## ⚙️ Configuration
15
15
16
16
Adjust the `user-defined parameters` in this lab's Jupyter Notebook's [Initialize notebook variables](./create.ipynb#initialize-notebook-variables) section.
17
17
18
-
## Execution
18
+
## ▶️ Execution
19
19
20
20
1. Execute this lab's [Jupyter Notebook](./create.ipynb) step-by-step or via _Run All_.
0 commit comments