DEV Community

Cover image for Creating a Highly Available Storage Account In Azure for a Public Website.
Dumka Esaenwi
Dumka Esaenwi

Posted on

Creating a Highly Available Storage Account In Azure for a Public Website.

INTRODUCTION

A dependable and well-navigated public website is essential for any organization in today's digital environment. Azure Storage provides reliable solutions to guarantee that the content on your website is accessible even during local outages. This post will walk you through setting up a highly accessible storage account for your public website with features like versioning, geo-redundancy, anonymous access, and soft delete.

In my previous article, I discussed storage accounts and resource groups, which are key in today's cloud world. You can find time to read them as well.

Let's quickly delve into the steps you can take to Create a Highly Available Storage Account In Azure for a Public Website.

## Step 1 - Configuring Your Storage Account

  • Go to the Azure interface and search for "Storage accounts" to get started.
  • Press "+ Create" to initiate the process of creation. Either choose an existing resource group or create a new one.

Image description

Image description

  • Give your storage account the name "publicwebsite"; if necessary, include a unique identification.
  • Select "Review" and then "Create" after leaving the other settings just the way they are.
    Image description

  • After the deployment is finished, navigate to the resource.

Image description

Step 2 - Ensure High Availability
To provide read access from a secondary region and safeguard against regional outages:

  • Locate the "Redundancy" blade under "Data management" in your storage account.
  • Choose "Read-access Geo-redundant storage (RA-GRS)". Make note of the location data, both primary and secondary.

Image description
Step 3 - Setting Up Public Access
For the content on your website to be available to the public:

  • Turn on "Allow blob anonymous access" in the "Settings" blade of the "Configuration" blade. Remember to save your modifications.

Image description

Creating a public container for blob storage with anonymous read access.

  • Go to "Data storage" and then "Containers" blade.
  • Tap "+ Container" and give it the "public" name.

Image description

  • Click "Change access level" after selecting the container that has been created.
  • Change the "Public access level" to the "Blob (anonymous read access for blobs only)".

Image description

Try uploading files and testing access.
Put a test file into the container marked as "public".

  • From the Overview tab, select the uploaded file and copy its URL.
    Image description

  • To confirm public access, paste the URL into a new tab in your browser.

Image description

Soft Delete Implementation

To prevent unintentional deletes:

  • Navigate to the Overview blade for the storage account. Locate the "Blob soft delete" configuration in the "Blob service" menu. Image description
  • Set the retention period to 21 days and enable soft delete for blobs.
  • Keep your edits saved

Image description

You should get comfortable utilizing soft delete to recover files if something gets erased.

Go to the container where the file you submitted is located.
After choosing the file you uploaded, choose Delete.
To confirm deleting the file, select OK.

Image description

Slider Show deleted blobs should be toggled on the container Overview page. The search box is located to the right of this toggle.
To undelete a deleted file, select it and utilize the ellipses on the far right.

Image description

  • Verify that the file has been restored by refreshing the container.

Blob Versioning Configuration

To keep several iterations of the papers on your website up to date:
Locate the "Versioning" setting under "Blob service" in the Overview blade of the storage account.

Image description

  • Turn on blob versioning.

  • Select if you want to save every version or remove it after a predetermined amount of time.

  • Save the modifications you made.

Image description

You've successfully set up a highly accessible storage account for your public website by following these steps. This configuration protects your content from unintentional deletions and unauthorized alterations, permits public access, and guarantees that it is available during regional outages. To make sure you can recover fast in an emergency, don't forget to test your versioning and restore procedures regularly.

Top comments (1)

Collapse
 
realcloudprojects profile image
Skill Schule

Boom!