From 9adc3737ee22833128ac59d8ad9549916e58a93e Mon Sep 17 00:00:00 2001 From: pareenaverma Date: Mon, 16 Jun 2025 23:00:21 +0000 Subject: [PATCH] tech review of .NET and Cobalt VM Lps --- .../cobalt/1-create-cobalt-vm.md | 9 +++- .../cobalt/2-open-port.md | 11 +++-- .../cobalt/_index.md | 2 +- .../1-create-orchardcore-app.md | 42 ++++++++++++++++++- .../2-add-shared-c-library.md | 2 +- .../dotnet-migration/3-any-cpu.md | 13 +++--- .../dotnet-migration/4-dotnet-versions.md | 4 +- .../dotnet-migration/_index.md | 10 ++--- 8 files changed, 68 insertions(+), 25 deletions(-) diff --git a/content/learning-paths/servers-and-cloud-computing/cobalt/1-create-cobalt-vm.md b/content/learning-paths/servers-and-cloud-computing/cobalt/1-create-cobalt-vm.md index 2007ec1a24..7c9f295138 100644 --- a/content/learning-paths/servers-and-cloud-computing/cobalt/1-create-cobalt-vm.md +++ b/content/learning-paths/servers-and-cloud-computing/cobalt/1-create-cobalt-vm.md @@ -8,7 +8,14 @@ layout: learningpathall ## Use the Azure Portal to deploy a Cobalt 100 VM -Azure Cobalt 100 VMs are a part of the ['D' family of Azure VMs](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/d-family). To deploy one, follow these steps: +Cobalt 100 is Microsoft’s first Arm-based server processor, built using the Armv9 Neoverse-N2 CPU. The Cobalt 100 processor is optimized for the performance of scale-out cloud-based applications. + +The Azure Cobalt 100 VM instances include two series: + +The general-purpose Dpsv6 and Dplsv6 virtual machine series. +The memory-optimized Epsv6 virtual machine series. + +To create a Cobalt 100 VM, follow these steps: 1. Sign in to the [Azure Portal](https://portal.azure.com/). 2. Select **Create a resource → Compute → Virtual machine**. diff --git a/content/learning-paths/servers-and-cloud-computing/cobalt/2-open-port.md b/content/learning-paths/servers-and-cloud-computing/cobalt/2-open-port.md index f446d15df1..e5ba4c890f 100644 --- a/content/learning-paths/servers-and-cloud-computing/cobalt/2-open-port.md +++ b/content/learning-paths/servers-and-cloud-computing/cobalt/2-open-port.md @@ -14,11 +14,10 @@ In this step you will open port 22 for SSH, as well as port 8080 so that a web a 1. In the Azure Portal open the newly created VM resource and click **Networking → Network settings** in the left nav. 2. Select the **Network security group**. -3. In the left nav click **Settings → Inbound security rules** -4. Click **Add** at the top of the screen. -5. Fill in the form, specifying **My IP address** as the source and 22 as the destination port: +3. Click on **Create Port Rule** and from the drop-down men select **Inbound port rule** +4. Fill in the form, specifying **My IP address** as the source and 22 as the destination port: ![Add inbound security rule with source of my IP and destination port 22#center](images/create-nsg-rule.png) +5. Click **Add**. +To open port 8080, follow steps 3 through 5 again, but instead choose port 8080 for the destination port. -To open port 8080, follow steps 4 and 5 again, but instead choose port 8080 for the destination port. - -You have now opened ports 22 and 8080 to your IP. In the next step you will verify connectivity. \ No newline at end of file +You have now opened ports 22 and 8080 to your IP. In the next step you will verify connectivity. diff --git a/content/learning-paths/servers-and-cloud-computing/cobalt/_index.md b/content/learning-paths/servers-and-cloud-computing/cobalt/_index.md index 04cd277fa8..8ea17b5fbc 100644 --- a/content/learning-paths/servers-and-cloud-computing/cobalt/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/cobalt/_index.md @@ -3,7 +3,7 @@ title: Create an Azure Cobalt 100 VM minutes_to_complete: 10 -who_is_this_for: Developers and DevOps engineers who need an Arm-based virtual machine on Azure and want to expose an application port to the internet. +who_is_this_for: This is an introductory topic for developers and DevOps engineers who need an Arm-based virtual machine on Azure and want to expose an application port to the internet. learning_objectives: - Deploy an Arm-based Cobalt 100 virtual machine (VM) on Microsoft Azure. diff --git a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/1-create-orchardcore-app.md b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/1-create-orchardcore-app.md index 26fc4b213c..49b0b64571 100644 --- a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/1-create-orchardcore-app.md +++ b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/1-create-orchardcore-app.md @@ -29,6 +29,18 @@ sudo apt-get install -y dotnet-sdk-8.0 dotnet --version ``` +The output should look like: + +```output +8.0.117 +``` + +4. Install gcc for compiling your application: + +```bash +sudo apt install gcc g++ build-essential -y +``` + ## Step 2: Install the OrchardCore Templates To start building an OrchardCore application, you need to install the OrchardCore templates. Open your terminal and run the following command: @@ -39,6 +51,19 @@ dotnet new install OrchardCore.ProjectTemplates::2.1.7 This command installs the OrchardCore project templates, which you will use to create a new application. +The output will look like: + +```output +Success: OrchardCore.ProjectTemplates::2.1.7 installed the following templates: +Template Name Short Name Language Tags +------------------------ ----------- -------- -------------------- +Orchard Core Cms Module ocmodulecms [C#] Web/Orchard Core/CMS +Orchard Core Cms Web App occms [C#] Web/Orchard Core/CMS +Orchard Core Mvc Module ocmodulemvc [C#] Web/Orchard Core/Mvc +Orchard Core Mvc Web App ocmvc [C#] Web/Orchard Core/Mvc +Orchard Core Theme octheme [C#] Web/Orchard Core/CMS +``` + ## Step 3: Create a new OrchardCore application 1. **Create a new project**: Use the `dotnet` CLI to create a new OrchardCore application. @@ -63,6 +88,21 @@ cd MyOrchardCoreApp dotnet build ``` +The output will look like: + +```output +MSBuild version 17.8.27+3ab07f0cf for .NET + Determining projects to restore... + Restored /home/azureuser/MyOrchardCoreApp/MyOrchardCoreApp.csproj (in 28.95 sec). + MyOrchardCoreApp -> /home/azureuser/MyOrchardCoreApp/bin/Debug/net8.0/MyOrchardCoreApp.dll + Copying translation files: MyOrchardCoreApp + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:38.05 +``` 2. **Run the application**: Start the application with: ```bash @@ -73,4 +113,4 @@ dotnet run --urls http://0.0.0.0:8080 4. **Configure the application as a blog** In the resulting configuration page, -You have successfully created and run a basic OrchardCore CMS application. In the next sections, you will learn how to integrate a C shared library into your .NET application and explore performance optimizations for Arm architecture. \ No newline at end of file +You have successfully created and run a basic OrchardCore CMS application. In the next sections, you will learn how to integrate a C shared library into your .NET application and explore performance optimizations for Arm architecture. diff --git a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/2-add-shared-c-library.md b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/2-add-shared-c-library.md index 3850c79245..5a837d155d 100644 --- a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/2-add-shared-c-library.md +++ b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/2-add-shared-c-library.md @@ -50,7 +50,7 @@ public static class NativeMethods } ``` -2. Call the `Greet` method from your application. For example, you can add the following code to your main program or a controller: +2. Call the `Greet` method from your application. For example, you can add the following code to your main program `Program.cs` as shown: ```csharp using OrchardCore.Logging; diff --git a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/3-any-cpu.md b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/3-any-cpu.md index e26c529c81..e109a8a51a 100644 --- a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/3-any-cpu.md +++ b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/3-any-cpu.md @@ -16,9 +16,8 @@ The AnyCPU feature has been around since .NET 2, but it's current incarnation wa To make your OrchardCore application architecture agnostic, you need to configure it to use the AnyCPU platform target. This allows the .NET runtime to choose the appropriate architecture at runtime. -1. Open your OrchardCore project in your preferred IDE. -2. Locate the `.csproj` file for your project. -3. Modify the `` element to `AnyCPU`: +1. Open your OrchardCore project `MyOrchardCoreApp.csproj` in your preferred IDE. +2. Find the `` and add the `` element to `AnyCPU`: ```xml @@ -30,6 +29,8 @@ To make your OrchardCore application architecture agnostic, you need to configur ## Build once, run anywhere +You can now build your application on either an x86 or Arm host machine and deploy it on any architecture. + ```bash dotnet build -c Release ``` @@ -40,14 +41,12 @@ dotnet build -c Release dotnet run --urls http://0.0.0.0:8080 ``` -Your application should now be runnable on any architecture. All you have to do is copy the `MyOrchardCoreApp` directory to any computer with the .NET 8 Framework installed and run +Your application should now be runnable on any architecture. All you have to do is copy the `MyOrchardCoreApp` directory to any computer with the .NET 8 Framework installed and run the command shown from within the `MyOrchardCoreApp` directory: ```bash dotnet ./bin/Release/net8.0/MyOrchardCoreApp.dll --urls http://0.0.0.0:8080 ``` -From within the `MyOrchardCoreApp` directory. - ## Benefits of architecture agnostic applications By configuring your application to be architecture agnostic, you gain several benefits: @@ -56,4 +55,4 @@ By configuring your application to be architecture agnostic, you gain several be - **Efficiency**: Reduce the need for maintaining separate builds for different architectures. - **Scalability**: Easily scale your application across different hardware platforms. -This approach ensures that your OrchardCore application can run seamlessly on both Arm and x86 architectures. \ No newline at end of file +This approach ensures that your OrchardCore application can run seamlessly on both Arm and x86 architectures. diff --git a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/4-dotnet-versions.md b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/4-dotnet-versions.md index da8dba7f64..3e0d49d6eb 100644 --- a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/4-dotnet-versions.md +++ b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/4-dotnet-versions.md @@ -10,7 +10,7 @@ layout: learningpathall Understanding which versions perform best and the features they offer can help you make informed decisions when developing applications for Arm-based systems. -.NET has evolved significantly over the years, with each version introducing new features and performance improvements. Here, we will focus on the key versions that have notable performance implications for Arm architecture. +.NET has evolved significantly over the years, with each version introducing new features and performance improvements. Here, you will learn about key versions that have notable performance implications for Arm architecture. ## .NET Core 3.1 (end-of-life 2022) @@ -68,7 +68,7 @@ Although .NET 9 will receive only 18 months of support, it is an excellent choic .NET 10 is still in preview and will likely change prior to it's GA release, but it will be the next LTS version of .NET. -- Extended SVE2 and new SME (Scalable Matrix Extension) intrinsics to unlock efficient implementation of large-scale numerical algorithms and on-device AI inference on Arm v9. +- [Extended SVE2 intrinsics](https://github.com/dotnet/runtime/issues/109652) to unlock efficient implementation of large-scale numerical algorithms and on-device AI inference on Arm v9. - C# 14 is expected to ship alongside .NET 10, bringing additional compile-time metaprogramming features that can reduce boilerplate on resource-constrained Arm edge devices. Because .NET 10 is still in preview, you should validate any assumptions about feature availability against the latest preview builds and roadmap updates. diff --git a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/_index.md b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/_index.md index dac07dd8a5..a48ec1bd13 100644 --- a/content/learning-paths/servers-and-cloud-computing/dotnet-migration/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/dotnet-migration/_index.md @@ -1,20 +1,18 @@ --- -title: Migrating a .NET application to Azure Cobalt +title: Migrate a .NET application to Microsoft Azure Cobalt 100 minutes_to_complete: 25 -who_is_this_for: .NET developers who want to take advantage of the cost and performance benefits of Azure Cobalt processors. +who_is_this_for: This is an advanced learning path for .NET developers who want to take advantage of the cost and performance benefits of Azure Cobalt processors. learning_objectives: - Create and compile a basic OrchardCore CMS application - Add a simple C shared library to your .NET application - Learn about anyCPU hardware agnostic builds - - Gain intuition about performance of different .NET versions + - Learn about performance of different .NET versions prerequisites: - - An Azure account - - Installation of .NET 8 - - gcc installed + - A Microsoft Azure account author: Joe Stech