Skip to content

Commit 9d25c74

Browse files
Refactor section headings and improve clarity in Golang installation and baseline testing documentation
1 parent e143764 commit 9d25c74

2 files changed

Lines changed: 26 additions & 25 deletions

File tree

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

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,20 @@ weight: 5
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+
To validate your Go toolchain and runtime environment, build and run a lightweight web server. This confirms that compilation, networking, and runtime execution work correctly on your Ubuntu Pro 24.04 LTS Arm64 virtual machine on Azure Cobalt 100.
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+
## Create the project directory
1614

15+
Create a folder for your Go web project and navigate to it:
1716
```console
1817
mkdir goweb && cd goweb
1918
```
2019

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`:
20+
## Create an HTML page with Bootstrap styling
2421

22+
Next, create a simple web page that your Go server will serve. Open an editor and create `index.html`:
2523
```console
2624
nano index.html
2725
```
@@ -65,15 +63,16 @@ Paste the following HTML code into the `index.html` file. This page uses Bootstr
6563
</body>
6664
</html>
6765
```
68-
3. Create Golang Web Server
6966

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

69+
Open an editor and create `main.go`:
7270
```console
7371
nano main.go
7472
```
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.
73+
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.
7674

75+
Paste the following code into `main.go`:
7776
```go
7877
package main
7978
import (
@@ -105,24 +104,21 @@ func main() {
105104
```
106105
{{% notice Note %}}Running on port 80 requires root privileges. Use sudo with the full Go path if needed.{{% /notice %}}
107106

108-
4. Run the Web Server
109-
110-
Compile and start your Go program with:
107+
## Run the web server
111108

109+
Compile and start the server:
112110
```console
113111
sudo /usr/local/go/bin/go run main.go
114112
```
115113

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-
114+
Expected output:
118115
```output
119116
2025/08/19 04:35:06 Server running on http://0.0.0.0:80
120117
```
121-
5. Allow HTTP Traffic in Firewall
122118

123119
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.
124120

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.
121+
Even if you have already configured Azure Network Security Group (NSG) rules to allow inbound traffic on port 80, the VM level firewall might still block HTTP requests until explicitly opened.
126122

127123
Run the following commands to allow HTTP traffic on port 80:
128124

@@ -145,14 +141,19 @@ To Action From
145141
80/tcp (v6) ALLOW Anywhere (v6)
146142
```
147143

148-
6. Open in a Browser
149-
To quickly get your VM’s public IP address and form the URL, run:
144+
{{% notice Note %}}
145+
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.
146+
{{% /notice %}}
150147

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

156-
![golang](images/go-web.png)
155+
Open this URL in your browser. You should see the styled HTML landing page served by your Go application.
156+
157+
![Go web server running on Azure Arm64 alt-text#center](images/go-web.png "Go web server running on Azure Arm64")
157158

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.
159+
Reaching this page confirms that Go is installed, the environment is configured, and your Go web server works end-to-end on Azure Cobalt 100 (Arm64). You can now proceed to benchmarking tests.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ There are many enhancements added to Golang version 1.18, that have resulted in
2323
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) also recommends Golang version 1.18 as the minimum recommended on the Arm platforms.
2424
{{% /notice %}}
2525

26-
## Extract the archive to `/usr/local`
26+
## Extract the archive
2727

2828
Unpack the downloaded archive into `/usr/local`, which is the conventional directory for installing system-wide software on Linux. This ensures the Go toolchain is available for all users and integrates cleanly with the system’s environment.
2929

3030
```console
3131
sudo tar -C /usr/local -xzf ./go1.25.0.linux-arm64.tar.gz
3232
```
3333

34-
## Add Go to your shell `PATH`
34+
## Add Go to your shell PATH
3535

3636
To make the Go toolchain accessible from any directory, add its binary location to your shell’s `PATH` environment variable. Updating your `.bashrc` file ensures this change persists across sessions:
3737

3838
```console
3939
echo 'export PATH="$PATH:/usr/local/go/bin"' >> ~/.bashrc
4040
```
4141

42-
## Apply the changes immediately
42+
## Apply the changes
4343

4444
After updating .bashrc, reload it so your current shell session picks up the new environment variables without requiring you to log out and back in:
4545

0 commit comments

Comments
 (0)