Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Deploy NGINX on the Microsoft Azure Cobalt 100 processors

draft: true
cascade:
draft: true

minutes_to_complete: 30

who_is_this_for: This Learning Path introduces NGINX deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machine. It is intended for system administrators and developers looking to deploy and benchmark NGINX on Arm architecture with minimal adjustments from traditional x86_64 environments.

learning_objectives:
- Start an Azure Arm64 virtual machine using the Azure console and Ubuntu Pro 24.04 LTS as the base image.
- Deploy the NGINX web server on the Azure Arm64 virtual machine running Ubuntu Pro 24.04 LTS.
- Configure and test a static website using NGINX on the virtual machine.
- Perform baseline testing and benchmarking of NGINX in the Ubuntu Pro 24.04 LTS Arm64 virtual machine environment.


prerequisites:
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6).
- Familiarity with the [NGINX architecture](https://www.nginx.com/) and deployment practices on Arm64 platforms.
- Network settings (firewalls and security groups) should allow inbound communication on ports 22 (SSH) and 80 (HTTP).

author: Jason Andrews
Comment thread
pareenaverma marked this conversation as resolved.

### Tags
skilllevels: Advanced
subjects: Web
cloud_service_providers: Microsoft Azure

armips:
- Neoverse

tools_software_languages:
- NGINX
- Apache Bench

operatingsystems:
- Linux

further_reading:
- resource:
title: NGINX official documentation
link: https://nginx.org/en/docs/
type: documentation
- resource:
title: Apache Bench official documentation
link: https://httpd.apache.org/docs/2.4/programs/ab.html
type: documentation
- resource:
title: NGINX on Azure
link: https://docs.nginx.com/nginx/deployment-guides/microsoft-azure/virtual-machines-for-nginx/
type: documentation


### FIXED, DO NOT MODIFY
# ================================================================================
weight: 1 # _index.md always has weight of 1 to order correctly
layout: "learningpathall" # All files under learning paths have this same wrapper
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Overview"

weight: 2

layout: "learningpathall"
---

## Cobalt 100 Arm-based processor

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.

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).

## NGINX

NGINX is a high-performance, open-source web server, reverse proxy, load balancer, and HTTP cache. Originally developed by Igor Sysoev, NGINX is known for its event-driven, asynchronous architecture, which enables it to handle high concurrency with low resource usage.

There are three main variants of NGINX:
- **NGINX Open Source**– Free and [open-source version available at nginx.org](https://nginx.org)
- **NGINX Plus**- [Commercial edition of NGINX](https://www.nginx.com/products/nginx/) with features like dynamic reconfig, active health checks, and monitoring.
- **NGINX Unit**- A lightweight, dynamic application server that complements NGINX. [Learn more at unit.nginx.org](https://unit.nginx.org/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: NGINX Baseline Testing
weight: 5

### FIXED, DO NOT MODIFY
layout: learningpathall
---


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we already have testing locally and via web browser that Nginx is working, this page may be redundant. Instead, you can add a link on the previous page to nginx getting started content, eg https://nginx.org/en/docs/beginners_guide.html

### Baseline testing with a static website on NGINX
Perform baseline testing of NGINX on an **Ubuntu Pro 24.04 LTS** virtual machine by deploying a custom static HTML page. This verifies that NGINX is correctly serving content on the Arm64 platform.

1. Create a Static Website Directory:

Prepare a folder to host your HTML content.
```console
mkdir -p ~/my-static-site
```
2. Create an HTML file and Web page:

Create a HTML file `nano my-static-site/index.html` with the content below to design a visually appealing static landing page.

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome to NGINX on Azure Ubuntu Pro</title>
<style>
body {
background: linear-gradient(to right, #4facfe, #00f2fe);
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
color: white;
text-align: center;
}
.box {
background: rgba(0, 0, 0, 0.3);
padding: 40px;
border-radius: 12px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
h1 {
margin-bottom: 10px;
font-size: 2.5rem;
}
p {
font-size: 1.2rem;
}
</style>
</head>
<body>
<div class="box">
<h1> Welcome to NGINX on Azure Ubuntu Pro 24.04 LTS!</h1>
<p>Your static site is running beautifully on ARM64 </p>
</div>
</body>
</html>
```
3. Move the Website to NGINX's Accessible Directory:

Since NGINX runs under the `www-data` user and may not have access to files inside `/home/ubuntu`, move the site to a directory where NGINX has permissions by default:

```console
sudo mkdir -p /var/www/my-static-site
sudo cp -r ~/my-static-site/* /var/www/my-static-site/
sudo chown -R www-data:www-data /var/www/my-static-site
```

4. Create NGINX Config File to Serve Static Website:

Point NGINX to serve your static HTML content.
```console
sudo nano /etc/nginx/conf.d/static-site.conf
```
Now, add the following configuration:

```NGINX
server {
listen 80;
server_name localhost;

location / {
root /var/www/my-static-site;
index index.html;
}

access_log /var/log/nginx/static-access.log;
error_log /var/log/nginx/static-error.log;
}
```
Make sure `/home/ubuntu/my-static-site` is the correct path to your **index.html**.

5. Test the NGINX Configuration:

```console
sudo nginx -t
```
You should see an output similar to:
```output
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
```

6. Reload or Restart NGINX:

Apply configuration changes and restart the web server.
```console
sudo nginx -s reload
sudo systemctl restart nginx
```

7. Test the Static Website on browser:

Access your website at your public IP on port 80.
```console
http://<your-vm-public-ip>/
```
Make sure port 80 is open in your Azure Network Security Group (NSG).

8. You should see the NGINX welcome page confirming a successful deployment:

![Static Website Screenshot](images/nginx-web.png)

This verifies the basic functionality of NGINX installation before proceeding to the benchmarking.
Loading