Cloud Resume Challenge Tutorial — Part 2: Azure Setup

Jonathan Stock
Coding in the Cloud
11 min readJan 1, 2024

Introduction

This tutorial is a hands-on, project-based review of web development fundamentals designed to prepare you to pass your Azure Fundamentals Certification (AZ900). You will apply the concepts from AZ900 to a real project in Azure using real processes and approaches that engineers use for real projects. You don’t need to know command line, HTML, or networking. But by the time you finish, you will have a basic understanding of these concepts. It is written for the non-technical person, starting from an absolute beginner point of view.

Based on Forrest Brazeal’s Cloud Resume Challenge, this tutorial shows you one of many possible ways to build and host a simple website in Azure. The tutorial also will show you which tools to use and how to build a software development workflow. I’ve consulted with software developers throughout so that you can have confidence that the workflow is based on real-life, best practices. With a solid workflow foundation in place, you can expand the Cloud Resume Challenge to some of the optional enhancements, or even start new your own new projects, learning, exploring and building with Azure.

Project Overview

In this six-part project, you’ll build a cloud-hosted resume by completing the following:

· Part 1 — Create Your Resume in a GitHub Workflow

· Part 2 — Activate Azure Storage Static Webpage (you are here)

· Part 3 — Activate a URL and Configure DNS and Azure Front Door CDN

· Part 4 — Activate HTTPS

· Part 5 — Automate Your Workflow using GitHub Action

· Part 6 — Add a Staging Webpage to Your Workflow

Tutorial Overview

Goals of part 2

In part 1 you used GitHub Desktop and Visual Studio Code to create the website on your local machine and publish it to your cloud repository in GitHub.

In part 2 you will inventory and activate the Azure services needed to host the website and use GitHub to publish the website to Azure.

Azure has hundreds of services that enable thousands of possible configurations to support your website. This tutorial will provide you with the instruction to create and host a single page static website, supported by HTTPS for secure connection, using a domain name of your choice.

AZ900 — Need to Know

Included in this section are the Azure services and concepts that we’ll be using in this part of the project, with some additional context and details you can use to study for the AZ900 exam.

Cloud Computing Basics

Azure provides a range of cloud computing services that can be broadly categorized into three types: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). Here are some examples of each:

· IaaS: This service provides essential compute, storage, and networking resources on demand. Some examples of IaaS services in Azure include Virtual Machines, Virtual Machine Scale Sets, and Azure Kubernetes Service.

· PaaS: This service provides a platform for developers to build, test, and deploy applications without having to worry about the underlying infrastructure. Some examples of PaaS services in Azure include Azure App Service, Azure Functions, and Azure SQL Database.

· SaaS: This service provides software applications that are hosted and managed by a third-party provider. Some examples of SaaS services in Azure include Microsoft Dynamics 365, Office 365, and Microsoft Teams.

In this project we’ll be using Azure Storage, an IaaS service, with “Static Website” a built-in PaaS feature of Azure Storage that emulates some features of a web server. This will save you the time and energy from having to learn how to configure a web server and operating system, and also illustrates the power of Azure as a cloud development platform.

Azure Tenants, Management Groups, Subscriptions and Resource Groups

Azure resources are deployed and managed through a hierarchy. The hierarchy consists of:

Correct setup will keep you organized and enable you to manage your Azure services and costs.

· Azure Tenant — An organization’s top-level Azure hierarchy. An org typically will have one tenant with multiple subscriptions under the tenant. Multiple tenants cannot be organized into a single entity.

· Management Groups — Usually setup in a hierarchical structure with the top level at the tenant level. Any conditions applied to the management group apply to all subscriptions contained in that management group object. Management groups do not organize multiple resource groups or resources for management. Neither can be added directly to a management group but are managed indirectly if the subscription they are contained is a part of a management group.

· Subscriptions — the billing entity for associated resources

· Resource Groups

o Serves as a container for Azure resources like Storage and Compute / Virtual Machines.

o You can then assign Role Based Access control permissions to a group to manage user access (but Resource Groups are not a group of users — that is Azure Active Directory).

o If you delete a resource group, all resources in the group are also deleted.

o Can also be used to automate resource deployment using Azure Resource Manager (ARM) templates so you can create test and production resources. Integrates with Azure Portal, PowerShell, CLI and REST API to perform deployment and management tasks.

o Locking a resource group as read-only locks all resources contained in the group so they cannot be deleted. You can also lock resources in a subscription or as a single resource.

o A resource group can contain resources from any region, not just the region in which the resource group is located.

o Resources can be added and removed from a resource group (as long as it is not locked)

o Resources can interact with other resources in a different resource group. The resource group creates a logical grouping primarily for management purposes and does not impact access between resources.

Azure Policy can be assigned at different levels of your Azure hierarchy, such as management groups, subscriptions, resource groups, or individual resources. When a policy is assigned at a higher level, it applies to all resources within the scope of that assignment.

Azure Storage

Azure Storage provides highly available, secure, durable, massively scalable, and redundant storage for data objects in the cloud. The following are the different types of storage services available in Azure Storage. This tutorial will only leverage Azure Blob Storage, but you need to know the differences between these storage types in the AZ900.

· Azure Blobs: A massively scalable object store for text and binary data. It also includes support for big data analytics through Data Lake Storage Gen2.

· Azure Files: Managed file shares for cloud or on-premises deployments.

· Azure Queues: A messaging store for reliable messaging between application components.

· Azure Tables: A NoSQL store for schemaless storage of structured data.

· Azure managed Disks: Block-level storage volumes for Azure VMs.

· Azure Container Storage (preview): A volume management, deployment, and orchestration service built natively for containers.

Within Azure Storage products, you can configure storage redundancy with the following options:

· Locally-redundant storage (LRS) — lowest cost option with basic protection against server rack and drive failures. Recommended for non-critical scenarios

· Geo-redundant storage (GRS) — Intermediate option with failover capabilities in a secondary region. Recommended for backup scenarios.

· Zone-redundant storage (ZRS) — Intermediate option with protection against datacenter-level failures. Recommended for high availability scenarios.

· Geo-zone-redundant storage (GZRS) — Optimal data protection solution that includes the offerings of both GRS and ZRS. Recommended for critical data scenarios.

Azure geographies, regions and availability zones

These work together to enable resilience, availability and compliance of your services in Azure architecture.

· Azure Availability Zones are physically separate data centers within a region that are designed to be available and fault-tolerant.

· Azure Regions are a grouping of multiple availability zones (data centers) that are independent and have their own set of services, resources, and network infrastructure.

· Azure Geographies are a collection of regions that share the same data residency, compliance standards, and network latency.

Azure TCO and Pricing Calculator

In this project we will use the Azure Pricing Calculator, but you need to know the difference between these two calculators:

· The Azure TCO Calculator is used to estimate the cost savings you can achieve by migrating your application workloads to Microsoft Azure. It provides a comprehensive analysis of the overall financial impact of adopting Azure compared to on-premises solutions.

· The Azure Pricing Calculator provides insights into the costs of individual Azure services and allows for customization. It helps you estimate the costs for Azure products and services.

Components and Costs

Azure Blob Storage Static Website

Azure has many IaaS and PaaS options for hosting a web server. In this tutorial we will leverage Azure Static Website, which is a PaaS feature in Azure Storage. It is a service that automatically builds and deploys full stack web apps to Azure from a code repository. It is a great option for serving web content without a web server. You can upload HTML, CSS, images, and JavaScript to an Azure storage container named. Because the content is in a storage container, you can also use other PaaS services like Azure Functions or Azure CDN.

Azure DNS Zone

These services enable users to find your website using a URL.

Azure Front Door CDN

These services enable you to provision a certificate on your website so that you can support HTTPS (secure) connections to your website. The CDN also supports caching which makes your website load faster for users around the world.

Domain Name Registration

A domain name enables you to create a customized website URL with an easy to remember .com, .net. or .whatever

Open Source and Other

If you wanted to showcase your understanding of Linux and ability to configure a web server from the ground up, you could build and host your cloud resume based on the popular LAMP stack (Linux, Apache, MySQL and PhP). This would involve purchasing compute in the form of a Virtual Machine and configuring it to support an open source Linux operating system like Apache. For a simple, static webpage however, Azure Blob Storage can be configured as your web server.

In the next section we’ll use the Azure Pricing Calculator to estimate costs, which are included in this summary view below:

Part 2: Azure Setup

Step 1: Create a Project Overview and Budget

As the chief architect of the Cloud Resume Challenge, you are responsible to deliver the project on budget. To do that you need to first understand your requirements, second, translate those requirements into service needs, and third estimate costs.

The architecture of this tutorial assumes that the website will support very few users with no rich media content, and no need for resiliency and disaster recovery.

As you move through the Cloud Resume Challenge, you will add additional features such as a database, APIs and advanced security. As you evaluate these features, you can use the Azure Pricing Calculator to understand the costs of these services before you turn them on and start paying for them.

Using the services listed in the section above, estimate costs based on the Azure Pricing Calculator, available at https://azure.microsoft.com/pricing/calculator.

· Sign up for Azure by creating an Azure account

· Select the category, such as “Storage”, and the service “Storage Accounts”

· Repeat for all the services listed in the Components and Costs

· Scroll down to “Your Estimate” and review /adjust the expected consumption levels

· Export to a spreadsheet

Step 2: Setup Your Azure Account

In this step you will establish the hierarchy of your management group, subscriptions and resources groups.

· From the Azure Portal, create one management group in this account.

· Create a new “pay-as-you-go” subscription under each management group for billing purposes. This will help you keep track of what your resources in different environments are costing you. At this point just create one for your “production” (live, user-facing) environment.

With your management groups and subscriptions setup, now you can create resources under those subscriptions.

Step 3: Configure Azure Blob Storage

· From the Azure Portal, create a Resource Group called “CRCProd” or something similar to identify it as your “production” website.

· From the new Resource Group, click “create” and in the marketplace search for storage

· Create a Blob Storage resource

Note you have multiple types of storage accounts. For this project choose “locally-redundant storage for the lowest cost.”

· For the rest of the options, leave the default settings.

Step 4: Configure Blob Storage Static Website

· Go to the Storage Account and scroll down the left hand side until you see “Static Website”.

· Click this and select “enabled”.

· Add index.html and 404.html document paths. This tells the blob what file to look for when it receives an HTML request from a user.

· Upload your code from the index.html file in your local repository (saved on your PC)

· Test the webpage by copying the URL under ‘primary endpoint’ and pasting it into a browser window

Reference

Host a static website in Azure Storage | Microsoft Learn

How To Create Different Environments on Azure | by Bhargav Bachina | Bachina Labs | Medium

Azure 101 — Resource Groups and Naming Conventions for Beginners — YouTube

Azure Tutorial — Tenants, Subscriptions & Resource Groups Explained — YouTube

Disclaimer

This tutorial is not an official Microsoft publication. Sources are indicated in the References section. No warranties or guarantees are implied. Links and instructions may be outdated. Use at your own risk.

--

--