Skip to content

Commit 758cb79

Browse files
More tweaks.
1 parent 6fe1f13 commit 758cb79

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

content/learning-paths/servers-and-cloud-computing/net-aspire/aws.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To set up an Arm-powered EC2 instance, follow these steps:
1414
1. Log in to the [AWS Management Console](http://console.aws.amazon.com).
1515
2. Navigate to the EC2 Service.
1616

17-
As shown in Figure 5, in the search box, type "EC2".
17+
As Figure 5 shows, in the search box, type "EC2".
1818

1919
Then, click on **EC2** in the search results:
2020

@@ -26,7 +26,7 @@ To set up an Arm-powered EC2 instance, follow these steps:
2626
* Architecture: select **64-bit (Arm)**.
2727
* Instance Type: select **t4g.small**.
2828

29-
The configuration should look like the configuration fields that are shown in Figure 6:
29+
The configuration should look like the configuration fields that Figure 6 shows:
3030

3131
![Figure 6 alt-text#center](figures/06.png "Figure 6: Configuration Fields.")
3232

content/learning-paths/servers-and-cloud-computing/net-aspire/gcp.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ The configuration setup should resemble the following:
2626

2727
![fig14](figures/14.png)
2828

29-
6. Configure the Remaining Settings.
29+
6. Configure the Remaining Settings:
3030
* Availability Policies: Standard.
31-
* Boot Disk: Click Change, then select Ubuntu as the operating system.
31+
* Boot Disk: Click **Change**, then select **Ubuntu** as the operating system.
3232
* Identity and API Access: Keep the default settings.
33-
* Firewall Settings: Check Allow HTTP traffic and Allow HTTPS traffic.
33+
* Firewall Settings: Check **Allow HTTP traffic** and **Allow HTTPS traffic**.
3434

3535
![fig15](figures/15.png)
3636

37-
7. Click the Create Button and wait for the VM to be created.
37+
7. Click the **Create** Button and wait for the VM to be created.
3838

3939
### Connecting to VM
4040
After creating the VM, connect to it as follows:
4141
1. In Compute Engine, click the SSH drop-down menu next to your VM, and select **Open in browser window**:
4242

4343
![fig16](figures/16.png)
4444

45-
2. This will open a browser window. First, click the Authorize button:
45+
2. This opens a browser window. First, click the **Authorize** button:
4646

4747
![fig17](figures/17.png)
4848

@@ -99,7 +99,7 @@ You will see output similar to this:
9999
### Exposing the application to the Public
100100
To make your application publicly-accessible, configure the firewall rules:
101101
1. In the Google Cloud Console, navigate to **VPC Network** > **Firewall**.
102-
2. Click Create Firewall Rule and configure the following:
102+
2. Click **Create Firewall Rule** and configure the following:
103103
* Name: allow-dotnet-ports
104104
* Target Tags: dotnet-app
105105
* Source IP Ranges: 0.0.0.0/0 (for public access).

content/learning-paths/servers-and-cloud-computing/net-aspire/modify_project.md

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

99
## Modify the Project
1010

11-
Now modify the project to add additional computations to mimic computationally-intensive work.
11+
Now you can move on to add additional computations to mimic computationally-intensive work.
1212

13-
You will now include additional code for the purpose of demonstrating computation intense work. Go to the `NetAspire.Arm.ApiService` project, and create a new file `ComputationService.cs`. Add the code shown below to this file:
13+
Go to the `NetAspire.Arm.ApiService` project, and create a new file, and name it `ComputationService.cs`.
14+
15+
Add the code shown below to this file:
1416

1517
```cs
1618
static class ComputationService
@@ -43,15 +45,15 @@ static class ComputationService
4345
}
4446
```
4547

46-
This code defines a static class, ComputationService, designed to perform computationally intensive tasks, specifically matrix multiplication. It contains a public method, PerformIntensiveCalculations, which generates two matrices of a specified size, multiplies them, and stores the resulting matrix.
48+
This code defines a static class, ComputationService, designed to perform computationally-intensive tasks; in particular, matrix multiplication. It contains a public method, PerformIntensiveCalculations, which generates two matrices of a specified size, multiplies them, and stores the resulting matrix.
4749

48-
The private method GenerateMatrix creates a one-dimensional array representing a matrix of the given size (matrixSize x matrixSize). Each element in the matrix is initialized with a random double value generated using Random.Shared.NextDouble().
50+
* The private method, GenerateMatrix, creates a one-dimensional array representing a matrix of the given size (matrixSize x matrixSize). Each element in the matrix is initialized with a random double-value generated using Random.Shared.NextDouble().
4951

50-
The public method PerformIntensiveCalculations multiplies two matrices (matrix1 and matrix2) element by element using nested loops and LINQ. It iterates through each row of the first matrix and each column of the second matrix, calculating the dot product for each element in the resulting matrix. The result of the multiplication is stored in a flattened one-dimensional array, matrixResult.
52+
* The public method, PerformIntensiveCalculations, multiplies two matrices (matrix1 and matrix2) element-by-element using nested loops and LINQ. It iterates through each row of the first matrix and each column of the second matrix, calculating the dot product for each element in the resulting matrix. The result of the multiplication is stored in a flattened one-dimensional array, called matrixResult.
5153

5254
This code is provided for demonstrating heavy computational operations, such as large matrix manipulations, and can simulate workloads in scenarios that mimic intensive data processing or scientific calculations.
5355

54-
Then, open the `Program.cs` file in the `NetAspire.Arm.ApiService` directory and add modify the `MapGet` function of the app as shown:
56+
Now open the `Program.cs` file in the `NetAspire.Arm.ApiService` directory, and modify the `MapGet` function of the app as shown:
5557

5658
```cs
5759
app.MapGet("/weatherforecast", () =>
@@ -70,16 +72,16 @@ app.MapGet("/weatherforecast", () =>
7072
});
7173
```
7274

73-
This will trigger matrix multiplications when you click Weather in the web frontend application.
75+
This triggers matrix multiplications when you select **Weather** in the web-frontend application.
7476

7577
To test the code, re-run the application using the following command:
7678

7779
```console
7880
dotnet run --project NetAspire.Arm.AppHost
7981
```
8082

81-
Next, navigate to the web frontend, click Weather, and then return to the dashboard. Click Traces to observe that the operation now takes significantly longer to completeapproximately 4 seconds in the example below:
83+
Next, navigate to the web frontend, select **Weather**, and then return to the dashboard. Click **Traces** and note that the operation now takes significantly longer to completeapproximately four seconds in the example below:
8284

83-
![fig4](figures/04.png)
85+
![fig4 alt-text#center](figures/04.png "Figure 4: Traces Example.")
8486

8587
You are now ready to deploy the application to the cloud.

content/learning-paths/servers-and-cloud-computing/net-aspire/run_app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ On the dashboard, locate and click the endpoint link for `NetAspire.Arm.Web`. Th
4343

4444
Now return to the dashboard, and select the **Traces** option. This section provides detailed telemetry tracing, allowing you to view the flow of requests, track service dependencies, and analyze performance metrics for your application:
4545

46-
![fig3 alt-text#center](figures/03.png "Figure 3: Traces Option.")
46+
![fig3 alt-text#center](figures/03.png "Figure 3: Traces.")
4747

4848
By following these steps, you can explore the key components of the .NET Aspire application, including its dashboard, data interaction through APIs, and telemetry tracing capabilities.

0 commit comments

Comments
 (0)