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.
- 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.
After the deployment is finished, navigate to the resource.
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.
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.
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.
- 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)".
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.
To confirm public access, paste the URL into a new tab in your browser.
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.
- Set the retention period to 21 days and enable soft delete for blobs.
- Keep your edits saved
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.
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.
- 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.
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.
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)
Boom!