Skip to content

Commit 2e8ab13

Browse files
Merge pull request #2371 from madeline-underwood/golang
Golang_JA to sign off
2 parents 1cdc34f + 44f59f6 commit 2e8ab13

File tree

6 files changed

+180
-151
lines changed

6 files changed

+180
-151
lines changed

content/learning-paths/servers-and-cloud-computing/golang-on-azure/_index.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
---
2-
title: Deploy Golang on the Microsoft Azure Cobalt 100 processors
2+
title: Deploy Golang on Azure Cobalt 100 on Arm
33

4-
draft: true
5-
cascade:
6-
draft: true
7-
8-
minutes_to_complete: 30
4+
minutes_to_complete: 30
95

10-
who_is_this_for: This is an introductory topic for software developers looking to migrate their Golang workloads from x86_64 to Arm-based platforms, specifically on the Microsoft Azure Cobalt 100 processors.
6+
who_is_this_for: This is an introductory topic for software developers, DevOps engineers, and cloud architects looking to migrate their Golang (Go) applications from x86_64 to high-performance Arm-based Azure Cobalt 100 virtual machines for improved cost efficiency and performance.
117

128
learning_objectives:
13-
- Provision an Azure Arm64 virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14-
- Deploy Golang on an Arm64-based virtual machine running Ubuntu Pro 24.04 LTS.
15-
- Perform Golang baseline testing and benchmarking on both x86_64 and Arm64 virtual machine.
9+
- Provision an Azure Arm64 virtual machine using the Azure portal, with Ubuntu Pro 24.04 LTS as the base image
10+
- Deploy Golang on an Arm64-based virtual machine running Ubuntu Pro 24.04 LTS
11+
- Perform Golang baseline testing and benchmarking on both x86_64 and Arm64 virtual machines
1612

1713
prerequisites:
18-
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6)
19-
- Familiarity with the [Golang](https://go.dev/) and deployment practices on Arm64 platforms.
14+
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Azure Cobalt 100 Arm-based instances (Dpsv6-series)
15+
- Basic familiarity with the [Go programming language](https://go.dev/) and cloud deployment practices
16+
- Understanding of Linux command line and virtual machine management
2017

2118
author: Pareena Verma
2219

@@ -26,13 +23,13 @@ subjects: Performance and Architecture
2623
cloud_service_providers: Microsoft Azure
2724

2825
armips:
29-
- Neoverse
26+
- Neoverse
3027

3128
tools_software_languages:
3229
- Golang
3330

3431
operatingsystems:
35-
- Linux
32+
- Linux
3633

3734
further_reading:
3835
- resource:
@@ -42,7 +39,7 @@ further_reading:
4239
- resource:
4340
title: Testing and Benchmarking in Go
4441
link: https://pkg.go.dev/testing
45-
type: Official Documentation
42+
type: Documentation
4643
- resource:
4744
title: Using go test -bench for Benchmarking
4845
link: https://pkg.go.dev/cmd/go#hdr-Testing_flags

content/learning-paths/servers-and-cloud-computing/golang-on-azure/background.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
11
---
22
title: "Overview"
3-
43
weight: 2
54

6-
layout: "learningpathall"
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
77
---
8+
## Microsoft Azure Cobalt 100 Arm-based processor
9+
10+
Azure Cobalt 100 is Microsoft's first-generation, custom-designed Arm-based processor built on the advanced Arm Neoverse N2 architecture. This high-performance 64-bit CPU is specifically optimized for cloud-native, scale-out Linux workloads including web servers, application servers, real-time data analytics, open-source databases, and in-memory caching solutions.
11+
12+
Key performance features include:
13+
- Clock speed: 3.4 GHz for optimal processing power
14+
- Core allocation: dedicated physical core per vCPU for consistent performance
15+
- Architecture: Arm Neoverse N2 for superior energy efficiency
16+
- Target workloads: cloud-native applications and microservices
17+
18+
To learn more, see the Microsoft blog: [Announcing the preview of new Azure virtual machines based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).
19+
20+
## Golang (Go programming language)
821

9-
## Cobalt 100 Arm-based processor
22+
Golang (Go) is a modern, open-source programming language developed by Google, specifically designed for building scalable, high-performance applications. Go excels in simplicity, compilation speed, and runtime efficiency, making it an ideal choice for cloud-native development and Arm64 architecture deployment.
1023

11-
Azure’s Cobalt 100 is built on Microsoft's first-generation, in-house Arm-based processor: the Cobalt 100. Designed entirely by Microsoft and based on Arm’s Neoverse N2 architecture, this 64-bit CPU delivers improved performance and energy efficiency across a broad spectrum of cloud-native, scale-out Linux workloads. These include web and application servers, data analytics, open-source databases, caching systems, and more. Running at 3.4 GHz, the Cobalt 100 processor allocates a dedicated physical core for each vCPU, ensuring consistent and predictable performance.
24+
Key performance features include:
25+
- Built-in concurrency with goroutines and channels
26+
- Strong static typing for improved code reliability
27+
- Comprehensive standard library for rapid development
28+
- Fast compilation and efficient garbage collection
29+
- Cross-platform compatibility including native Arm64 support
1230

13-
To learn more about Cobalt 100, refer to the blog [Announcing the preview of new Azure virtual machine based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).
31+
Go language primary use cases:
32+
- Cloud-native applications and containerized workloads
33+
- Microservices architecture and API development
34+
- Systems programming and infrastructure tools
35+
- DevOps automation and CI/CD pipelines
36+
- Distributed systems and high-throughput services
1437

15-
## Golang
16-
Golang (or Go) is an open-source programming language developed by Google, designed for simplicity, efficiency, and scalability. It provides built-in support for concurrency, strong typing, and a rich standard library, making it ideal for building reliable, high-performance applications.
38+
For more information, visit the [Go website](https://go.dev/) and see the [Go documentation](https://go.dev/doc/).
1739

18-
Go is widely used for cloud-native development, microservices, system programming, DevOps tools, and distributed systems. Learn more from the [Go official website](https://go.dev/) and its [official documentation](https://go.dev/doc/).

content/learning-paths/servers-and-cloud-computing/golang-on-azure/baseline-testing.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
2-
title: Golang Baseline Testing
2+
title: Perform Golang baseline testing and web server deployment on Azure Cobalt 100
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9+
## Baseline testing: run a Go web server on Azure Arm64
910

10-
### Baseline Testing: Running a Go Web Server on Azure Arm64
11-
To validate your Go toolchain and runtime environment, you can build and run a lightweight web server. This ensures that compilation, networking, and runtime execution are working correctly on your Ubuntu Pro 24.04 LTS Arm64 virtual machine running on Azure Cobalt 100.
11+
Validate your Go development environment by building and deploying a complete web application. This baseline test confirms that compilation, networking, and runtime execution work correctly on your Ubuntu Pro 24.04 LTS Arm64 virtual machine powered by Azure Cobalt 100 processors.
1212

13-
1. Create the project directory
14-
15-
Start by creating a new folder to hold your Go web project and navigate to it:
13+
## Initialize Go Web Project
14+
15+
Create a dedicated project directory for your Go web application:
1616

1717
```console
1818
mkdir goweb && cd goweb
1919
```
2020

21-
2. Create an HTML Page with Bootstrap Styling
22-
23-
Next, create a simple web page that your Go server will serve. Using the nano editor (or any editor of your choice), create a file named `index.html`:
21+
## Create an HTML page with Bootstrap styling
2422

23+
Next, create a simple web page that your Go server will serve. Open an editor and create `index.html`:
2524
```console
2625
nano index.html
2726
```
2827

29-
Paste the following HTML code into the `index.html` file. This page uses Bootstrap for styling and includes a header, a welcome message, and a button that links to a Go-powered API endpoint.
28+
Add the following HTML code with Bootstrap styling and Azure Cobalt 100 branding:
3029

3130
```html
3231
<!DOCTYPE html>
@@ -65,15 +64,16 @@ Paste the following HTML code into the `index.html` file. This page uses Bootstr
6564
</body>
6665
</html>
6766
```
68-
3. Create Golang Web Server
6967

7068
Now, let’s create the Go program that will serve your static HTML page and expose a simple API endpoint.
7169

70+
Open an editor and create `main.go`:
7271
```console
7372
nano main.go
7473
```
75-
Paste the following code into the `main.go` file. This sets up a very basic web server that serves files from the current folder, including the `index.html` you just created. When it runs, it will print a message showing the server address.
74+
Paste the following code into the `main.go` file. This sets up a basic web server that serves files from the current folder, including the `index.html` you just created. When it runs, it will print a message showing the server address.
7675

76+
Paste the following code into `main.go`:
7777
```go
7878
package main
7979
import (
@@ -105,24 +105,22 @@ func main() {
105105
```
106106
{{% notice Note %}}Running on port 80 requires root privileges. Use sudo with the full Go path if needed.{{% /notice %}}
107107

108-
4. Run the Web Server
109-
110-
Compile and start your Go program with:
108+
## Deploy and Start the Web Server
109+
110+
Compile and launch your Go web server on Azure Cobalt 100:
111111

112112
```console
113113
sudo /usr/local/go/bin/go run main.go
114114
```
115115

116-
This command compiles the Go source code into a binary and immediately starts the server on port 80. If the server starts successfully, you will see the following message in your terminal:
117-
116+
Expected output confirming successful startup:
118117
```output
119118
2025/08/19 04:35:06 Server running on http://0.0.0.0:80
120119
```
121-
5. Allow HTTP Traffic in Firewall
122120

123-
On Ubuntu Pro 24.04 LTS virtual machines, UFW (Uncomplicated Firewall) is used to manage firewall rules. By default, it allows only SSH (port 22), while other inbound connections are blocked.
121+
### Configure Ubuntu Firewall for HTTP Access
124122

125-
Even if you have already configured Azure Network Security Group (NSG) rules to allow inbound traffic on port 80, the VM level firewall may still block HTTP requests until explicitly opened.
123+
Ubuntu Pro 24.04 LTS uses UFW (Uncomplicated Firewall) to manage network access. Even with Azure Network Security Group (NSG) rules configured, the VM-level firewall requires explicit HTTP access configuration.
126124

127125
Run the following commands to allow HTTP traffic on port 80:
128126

@@ -145,14 +143,27 @@ To Action From
145143
80/tcp (v6) ALLOW Anywhere (v6)
146144
```
147145

148-
6. Open in a Browser
149-
To quickly get your VM’s public IP address and form the URL, run:
146+
{{% notice Note %}}
147+
If UFW is already active, `sudo ufw enable` might warn you about disrupting SSH. Proceed only if you understand the impact, or use an Azure VM serial console as a recovery option.
148+
{{% /notice %}}
150149

150+
## Open the site in a browser
151+
152+
Print your VM’s public URL:
151153
```console
152154
echo "http://$(curl -s ifconfig.me)/"
153155
```
154-
Open this URL in your browser, and you should see the styled HTML landing page being served directly by your Go application.
155156

156-
![golang](images/go-web.png)
157+
Open this URL in your browser. You should see the styled HTML landing page served by your Go application.
158+
159+
![Go web server running on Azure Cobalt 100 Arm64 alt-text#center](images/go-web.png "Go web server running on Azure Cobalt 100 Arm64")
160+
161+
## Baseline Testing Complete
162+
163+
Successfully reaching this page confirms:
164+
- **Go toolchain** is properly installed and configured
165+
- **Development environment** is ready for Arm64 compilation
166+
- **Network connectivity** and firewall configuration are correct
167+
- **Runtime performance** is functioning on Azure Cobalt 100 processors
157168

158-
Reaching this page in your browser confirms that Go is installed correctly, your environment is configured, and your Go web server is working end-to-end on Azure Cobalt 100 (Arm64). You can now proceed to perform further benchmarking tests.
169+
Your Azure Cobalt 100 virtual machine is now ready for advanced Go application development and performance benchmarking.

0 commit comments

Comments
 (0)