DEV Community

Cover image for Azure Applied Skills: Providing storage for the public website
Kelechi Edeh
Kelechi Edeh

Posted on

Azure Applied Skills: Providing storage for the public website

In an era of rapid digital expansion, ensuring seamless access to product images, videos, and marketing literature is crucial for customer engagement. With a global customer base demanding fast load times and reliable access, a robust cloud storage solution is essential. This guide outlines how to create and manage a high-availability storage system with version control and recovery options.

By completing this task, you will have developed essential skills in:

  • Create a storage account with high availability.
  • Ensure the storage account has anonymous public access.
  • Create a blob storage container for the website documents.
  • Enable soft delete so files can be easily restored.
  • Enable blob versioning.

Setting Up High-Availability Storage

The first step is to create a storage account designed to support public website content while ensuring redundancy to mitigate regional outages.

Steps to Create a Storage Account

  • Navigate to the Azure portal and search for Storage accounts.
  • Click + Create.
  • Set the Storage account name to publicwebsite, ensuring uniqueness.
  • Accept default settings and click Review and then Create. Image description

Configuring Redundancy for High Availability
To ensure high availability, enable Read-access Geo-redundant Storage (RA-GRS):

  • In Data management, select Redundancy.
  • Choose Read-access Geo-redundant storage (RA-GRS).
  • Review primary and secondary locations to verify setup. Image description

Enabling Public Access
For a seamless customer experience, public website content should be accessible without login requirements.

  • In Settings, select Configuration.
  • Enable Allow blob anonymous access.
  • Click Save to apply changes. Image description

Creating and Configuring a Blob Storage Container

A dedicated blob storage container ensures that images and documents are organized and publicly accessible.

Creating a Public Storage Container

  • In Data storage, navigate to Containers.
  • Click + Container and name it public.
  • Click Create. Image description

Enabling Anonymous Read Access

  • Select the public container.
  • In Overview, choose Change access level.
  • Set Public access level to Blob (anonymous read access for blobs only).
  • Click OK.

Image description

Uploading and Testing Access

  • Open the public container and click Upload.
  • Select a small image or text file and upload it. Image description
  • Copy the file’s URL from the Overview tab. Image description
  • Open the URL in a browser to verify public access. Image description

Implementing Soft Delete for Data Recovery

To prevent accidental loss of critical files, soft delete must be enabled with a retention period.

Enabling Soft Delete

  • Navigate to Overview in the storage account.
  • Under Blob service, select Blob soft delete.

Image description

  • Check Enable soft delete for blobs.
  • Set Retention period to 21 days.
  • Click Save.

Image description

Testing Soft Delete and Restore

  • Delete an uploaded file from the public container.
    Image description

  • Enable Show deleted blobs in the container’s Overview page.

Image description

  • Locate the deleted file and restore it using the Undelete option.

Image description

  • Refresh the container to confirm the file restoration.

Image description

Enabling Blob Versioning for Document tracking and version control ensures that previous file versions can be recovered if needed.

Enabling Blob Versioning

  • Navigate to Overview in the storage account.
  • In Blob service, select Versioning.

Image description

  • Check Enable versioning for blobs.
  • Click Save.

Image description

Testing Blob Versioning

  • Upload a new version of an existing file to the public container.
  • View previous file versions in the Show deleted blobs section.
  • Restore a previous version as needed.

Final Thoughts

By implementing these cloud storage strategies, businesses can ensure:

  • High availability to handle regional outages.
  • Seamless global access with anonymous public access settings.
  • Robust data recovery through soft delete and versioning.

This setup guarantees a fast, secure, and reliable content delivery system, enabling businesses to scale their digital presence efficiently.

Top comments (0)