Skip to content

Commit d62e727

Browse files
second pass
1 parent 46eb3eb commit d62e727

4 files changed

Lines changed: 30 additions & 21 deletions

File tree

content/learning-paths/servers-and-cloud-computing/dotnet-migration-nopcommerce/2-environment-setup.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ Start with the [Azure Cobalt Learning Path](https://learn.arm.com/learning-paths
1414

1515
This path was validated with Ubuntu 24.04 LTS on Azure Cobalt in `westus2` (example VM size: `Standard_D2ps_v6`, 2 vCPUs).
1616

17-
### Install tools on Cobalt VM
17+
### Install tools on the Azure virtual machine
1818

19-
Install the toolchain on the Cobalt VM before building and testing. The commands install the Linux packages used throughout this Learning Path: source control, HTTP validation, JSON inspection, Python for the endpoint tester, package archive inspection, Docker, and the .NET 9 SDK from the Ubuntu backports feed.
19+
Install the toolchain on the Azure VM before building and testing.
20+
21+
The following commands install the Linux packages used throughout this Learning Path: source control, HTTP validation, JSON inspection, Python for the endpoint tester, package archive inspection, Docker, and the .NET 9 SDK from the Ubuntu backports feed:
2022

2123
```bash
2224
sudo apt-get update -y
@@ -46,13 +48,15 @@ aarch64
4648
Docker version ...
4749
```
4850

49-
If you're upgrading from an older .NET version before migrating to Cobalt, use [GitHub Copilot modernization for .NET](https://learn.microsoft.com/dotnet/core/porting/github-copilot-app-modernization/overview) to assess the project and guide the upgrade. In Visual Studio Code, open Copilot Chat and use `@modernize-dotnet`; in Visual Studio, use the Modernize action from Solution Explorer.
51+
If you're upgrading from an older .NET version before migrating to Cobalt, use [GitHub Copilot modernization for .NET](https://learn.microsoft.com/dotnet/core/porting/github-copilot-app-modernization/overview) to assess the project and guide the upgrade. In Visual Studio Code, open Copilot Chat and use `@modernize-dotnet`. In Visual Studio, use the **Modernize** action from **Solution Explorer**.
52+
53+
### Enable citext to satisfy PostgreSQL prerequisite
5054

51-
#### Enable citext to satisfy PostgreSQL prerequisite
55+
nopCommerce defaults to SQL Server, but you'll use PostgreSQL for Arm validation. For PostgreSQL installs, you need `citext` before migration and installation. Without it, installer migrations fail with `type "citext" does not exist` (captured in local test artifacts).
5256

53-
nopCommerce defaults to SQL Server, but you'll use PostgreSQL for Arm validation. For PostgreSQL installs, you need `citext` before migration or installation. Without it, installer migrations fail with `type "citext" does not exist` (captured in local test artifacts).
57+
Create PostgreSQL and enable `citext` before running the installer. The database runs in Docker on the Cobalt VM so the nopCommerce app can connect to `127.0.0.1:5432` during the local validation phase.
5458

55-
Create PostgreSQL and enable `citext` before running the installer. The database runs in Docker on the Cobalt VM so the nopCommerce app can connect to `127.0.0.1:5432` during the local validation phase. Replace the password value before running the command.
59+
Replace the password value before running the following commands:
5660

5761
```bash
5862
export NOP_POSTGRES_PASSWORD='replace-with-a-strong-password'

content/learning-paths/servers-and-cloud-computing/dotnet-migration-nopcommerce/3-checkout-build-baseline.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ layout: learningpathall
88

99
## Build and baseline
1010

11-
Create a reproducible Arm baseline before optimization work. This page pins source, verifies a clean build, and captures a representative endpoint baseline so later changes can be measured against a known control.
11+
Create a reproducible Arm baseline before optimization work.
12+
13+
You'll pin the source, verify a clean build, and capture a representative endpoint baseline so you can measure later changes against a known control.
1214

1315
### Clone and pin the source
1416

15-
Pinning the exact tag and commit avoids silent drift in dependencies and behavior. Run the following commands on the Cobalt virtual machine (VM):
17+
Pinning the exact tag and commit avoids silent drift in dependencies and behavior.
18+
19+
Run the following commands on the Arm-based virtual machine (VM):
1620

1721
```bash
1822
git clone https://github.com/nopSolutions/nopCommerce.git
@@ -31,7 +35,7 @@ cd ~/nopCommerce # replace with your clone path if different
3135

3236
### Restore and build on Arm
3337

34-
Run restore and build on the Arm-based VM to establish a native Arm baseline. Restoring first separates package resolution problems from compilation problems, and `--no-restore` makes the build validate the already restored dependency graph.
38+
Run restore and build on the Arm-based VM to establish a native Arm baseline:
3539

3640
```bash
3741
# Restore dependencies first so build failures are easier to triage.
@@ -40,15 +44,17 @@ dotnet restore src/Presentation/Nop.Web/Nop.Web.csproj
4044
# Build release binaries without re-restoring packages.
4145
dotnet build src/Presentation/Nop.Web/Nop.Web.csproj -c Release --no-restore
4246
```
47+
Restoring first separates package resolution problems from compilation problems, and `--no-restore` makes the build validate the already restored dependency graph.
4348

4449
### Start and install nopCommerce
4550

46-
Start the app locally and complete installer setup with PostgreSQL. Run this command in one terminal and leave it running; `dotnet run` hosts the web application and keeps the terminal attached to the server logs.
51+
Start the app locally and complete installer setup with PostgreSQL. Run the following command in one terminal and leave it running:
4752

4853
```bash
4954
cd src/Presentation/Nop.Web
5055
dotnet run -c Release --no-build --urls http://0.0.0.0:5000
5156
```
57+
`dotnet run` hosts the web application and keeps the terminal attached to the server logs.
5258

5359
In a browser, open `http://<cobalt-public-ip>:5000` or use an SSH tunnel to reach `http://127.0.0.1:5000`. On the nopCommerce install page, select PostgreSQL and use the database settings from the previous section:
5460

@@ -72,7 +78,7 @@ curl -s -o /dev/null -w 'root=%{http_code}\n' http://127.0.0.1:5000/
7278
curl -s -o /dev/null -w 'install=%{http_code}\n' http://127.0.0.1:5000/install
7379
```
7480

75-
Expected after successful install: `root=200`, `install=302`.
81+
The outputs after a successful install should be: `root=200`, `install=302`.
7682

7783
### Run the baseline
7884

@@ -85,7 +91,7 @@ Don't benchmark `/install`. Baseline stable storefront paths first, then add car
8591
- Product and category pages from your sample data
8692
- Cart or checkout endpoints from a recorded production-like workflow
8793

88-
Create the endpoint tester in the repository root. The script uses only the Python standard library, submits requests with fixed concurrency, treats non-2xx and non-3xx responses as errors, and writes raw samples plus per-route summaries to JSON.
94+
Create the endpoint tester in the repository root:
8995

9096
```python {file_name="test_nopcommerce_endpoints.py"}
9197
#!/usr/bin/env python3
@@ -199,6 +205,8 @@ if __name__ == "__main__":
199205
main()
200206
```
201207

208+
The script uses only the Python standard library, submits requests with fixed concurrency, treats non-2xx and non-3xx responses as errors, and writes raw samples plus per-route summaries to JSON.
209+
202210
Run the endpoint tester from the repository root while the app is still running in the first terminal:
203211

204212
```bash
@@ -210,14 +218,14 @@ python3 test_nopcommerce_endpoints.py \
210218
--json-out arm_before.json
211219
```
212220

213-
The command prints the per-route summary and writes the raw measurements to `arm_before.json`. Keep that JSON file unchanged; it is the baseline artifact used by the tuning step.
221+
The command prints the per-route summary and writes the raw measurements to `arm_before.json`. Keep that JSON file unchanged because it's the baseline artifact used in the tuning step.
214222

215223
#### Baseline quality rules
216224

217225
Use these rules before you compare any optimization result:
218226

219-
- Run at least 3 baseline trials with identical parameters.
220-
- Keep endpoint order fixed per run (not randomized) when comparing before vs after.
227+
- Run at least three baseline trials with identical parameters.
228+
- Keep endpoint order fixed per run (not randomized) when comparing before and after.
221229
- Keep database state and seeded data identical across runs.
222230
- Capture raw JSON for every run and compare medians, not single outliers.
223231

content/learning-paths/servers-and-cloud-computing/dotnet-migration-nopcommerce/4-dependency-mapping-manifests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 4
66
layout: learningpathall
77
---
88

9-
## Audit application ependencies
9+
## Audit application dependencies
1010

1111
Run dependency discovery before migration changes so you understand direct references, transitive risk, and hidden native payloads. By doing so, you'll avoid late surprises when deploying to Arm.
1212

content/learning-paths/servers-and-cloud-computing/dotnet-migration-nopcommerce/6-deploy-verify-cobalt.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,13 @@ Use these rules before adopting a tuning profile:
8282
- Reset warm-up policy consistently (always warm or always cold).
8383
- Require improvement in both throughput and p95 latency, not just one.
8484
- Set a minimum practical threshold (for example, >=5% median gain) before rollout.
85-
86-
#### Instance-size tradeoffs
87-
88-
Do not assume the same profile wins on every Azure Cobalt VM size. Smaller instances often benefit from lower CPU burn and predictable p95 latency. Larger instances often benefit from higher concurrency, but can expose GC, database, and shared-resource contention. Compare throughput, p95/p99 latency, CPU utilization, and error rate for each instance size before keeping a tuning profile.
85+
- Don't assume the same profile wins on every Azure VM size. Smaller instances often benefit from lower CPU burn and predictable p95 latency. Larger instances often benefit from higher concurrency, but can expose GC, database, and shared-resource contention. Compare throughput, p95/p99 latency, CPU utilization, and error rate for each instance size before keeping a tuning profile.
8986

9087
### Considerations for interpreting metric improvements
9188

9289
When interpeting metric improvements, consider the following:
9390

94-
- If only one metric improves while p95 or error rate regresses, do not treat the change as a win.
91+
- If only one metric improves while p95 or error rate regresses, don't treat the change as a win.
9592
- If run-to-run variation is near the observed delta, treat it as noise.
9693
- Keep architecture-specific profiles separate. Don't force one profile onto all architectures.
9794

0 commit comments

Comments
 (0)