DEV Community

Cover image for Project Create a Storage Account for Public Use and Private Use
Barisi Lenyie
Barisi Lenyie

Posted on • Edited on

Project Create a Storage Account for Public Use and Private Use

In cloud computing, storage is a service that enables users and organizations to store, manage, and retrieve data via the internet rather than utilizing actual hardware on-site, such as local servers or hard drives.
Public Storage is a cloud-based service that enables users to store and retrieve data via the internet. It is scalable, secure, and highly available. It is based on Azure's worldwide infrastructure, which makes it possible for businesses to effectively manage and distribute data, including documents, media files, backups, and online assets.

Step 1
In the Microsoft Azure portal
In the Search Bar, type Storage Accounts and hit enter, and the storage accounts with an icon will gray out
search bar & storage accounts

Step 2
Click on the storage accounts and select + create
storage account & + Create

Step 3
In the Storage account environment,
For Resource Group section, click on create new and give it a name.
resource group

Step 4
In the Storage Account Name section, name it Publicwebsite and add acronyms to make it unique because Storage Account Name must be Globally Unique that is, it has not been used by any other person. For the Region, you have to choose a Region from the drop-down options and for the other information, in most cases, they are default and click Review + Create and wait for validation to be successful
storage name, region and review + create

Step 5
Click Create and wait for the deployment to complete
create

Step 6
Click Go to Resource
Go To Resource

Steps on how to make the Storage to be highly available
In Cloud Computing, there is a term called Redundancy, which means providing alternative options in case of downtime or disruption. This redundancy ensures that there are other alternatives, making the service highly available for public users.

Step 1
In the Storage Account Environment,
scroll down and select Data Management
Click the drop-down arrow and choose Redundancy
data management and redundancy

Step 2
Click Redundancy and in the Redundancy Environment, ensure the Read-Access Geo Redundant Storage (RAGRS) is selected from the Redundancy drop-down arrow.
redundancy

How to grant users access without login

Step 1
In the Storage Account Environment,
Click Overview
overview

Step 2
select Settings and from the drop-down arrow,
choose Configuration
settings

Step 3
Click Configuration and in the configuration environment, ensure that Allow Blob Anonymous Access is enabled, which is what will allow the public to view items freely, and click **Save **and wait for a successful update message
allow blob anonymous access & save

Steps on how to create storage for different content on the public website

Step 1
In the Storage Account Environment,
click overview
overview

Step 2
Scroll down to Data Storage section and from the drop-down arrow, choose Container
data storage & container

Step 3
Click the container, and in the container environment, click + Add Container and name it public, since it is for public use, and click Create and wait for a successful message
container, add container & create

Steps on how to ensure Customers or Users are able to view items or images without authentication

Step 1
Select the public storage that was created
public storage

Step 2
On the overview page, click on Change access level
overview & change access level

Step 3
click the drop-down by the change access level and choose Blob (anonymous read access for blobs only) and click **ok **and wait for a successful update message
choose change access level and select blob anonymous and click ok

Steps on how to Upload Files and test the Access of the Public Container

Ensure you are viewing the public container **and click **upload. Browse the location of the file and **click upload **and wait for a successful upload message
image upload

Steps on how to generate the image URL
Step 1
Click the uploaded image
upload image

Step 2
In the image environment, scan for the URL and click on the link in a bar and copy the blue envelope, and paste it into a browser to see the image
image link copy

A cloud computing data security feature called "soft delete" enables one to retrieve deleted files, objects, or resources within a predetermined retention time. The cloud system designates data as "deleted" but retains it in storage for a predetermined amount of time, allowing for simple restoration in the event that the deletion was unintentional or malicious.

Steps on how to perform soft delete
Step 1
Click the public storage account, select overview, locate properties and choose blob soft delete, and click on enabled to change from the default
overview, properties, blob soft delete & enabled

Step 2
Click on the enabled and change the default days, and click Save and wait for a successful update information
enabled & save

Testing of Soft Delete
Step 1
In the Storage Container, choose Data Storage and from the Data Storage drop-down, select the container and click on public and Click Delete
storage container, data storage, container, public & delete

Step 2
In the Delete environment, click Delete
delete

Step 3
Click confirm delete and wait for a successful message
confirm delete

Step 4
In the bar directly beneath the edit column, click the drop-down arrow in the bar and select Show
show active and deleted containers

Step 5
In the public container, click the three dots at the extreme of the public bar and click undelete
public

Step 6
In the undelete environment, click save and wait for a successful message
undelete & save

The below is evidence that the deleted item is restored
public restore & active

Blob Versioning
When a blob (object) is altered or removed, Microsoft Azure Blob Storage's blob versioning capability automatically preserves earlier iterations of the blob. Users can view, restore, or compare several versions of the same file since Azure generates a new version of each modified blob while maintaining the previous ones.

*Steps on how to perform versioning *

Step 1
Go to Overview, in the property section, choose Versioning and click Disabled
overview, property, versioning & disabled

Step 2
When the Disabled is clicked, choose Tracking and beneath tracking, click the icons beside Enabled Versioning for Blob and click Save and wait for a successful update message
tracking, enabled versioning for blob & save

The next phase of this article is to create a Private Storage
In cloud computing, private storage **is a dedicated, safe storage environment that is only accessible by **authorized people or a particular organization, as opposed to being publicly accessible via the internet.

Below are the steps to create a private storage

Step 1
In the Microsoft Azure portal
In the Search Bar, type Storage Accounts and hit enter, and the storage accounts with an icon will gray out
search bar & storage accounts

Step 2
Click on the storage accounts and select + create
storage account & + Create

Step 3
In the Storage account environment,
For Resource Group section, choose the one created while creating the public storage because it is going to backed up by private storage with the public storage and in the Storage Account Name section, name it Private and add acronyms while for the Region, same as public information, and click Review + Create and wait for validation to be successful
resource group, storage account name, region & review +create

Step 4
Click Create
create

Step 5
Click Go to Resource
go to resource

In Cloud Computing, a Region is a Geographical location on Earth where one or more data centers are located

For High Availability when there is a regional outage

Steps
Select Data Management and click the drop-down arrow, click Redundancy, and in the Redundancy bar, click the drop-down arrow and select Geo-Redundant Storage (GRS), and click save
data management, redundancy, geo redundant storage & save

Steps on how to Restrict Access by External Users

Step **
Scroll down to **Data Storage
section and from the drop-down arrow, choose Container, Click + Add Container
data storage, container & + Add Container

Step 3
In the + Add Container Environment, in the Name section bar, type private, and for the Anonymous Access Level, use private, and click create
Add container, name, anonymous access level & create

*Testing of the Private Container to ensure it is not accessible
Steps for Testing *

Step 1
Double click on the private container
private container

Step 2
Click upload, and in the upload environment, click browse for file, and click upload
upload, browse for file and upload

Step 3
Double-click on the uploaded file
uploaded image

Step 4
In the uploaded file environment, locate the URL bar and copy the link, and paste it into a browser
URL

Below is the output of the link in a browser
error message

In instances where a third party needs 24-hour access to some information that is not meant for public consumption

Below are the necessary steps

Step 1
Select the uploaded file, and at the extreme, there is a three-dot. Click the three dots and select Generate SAS
uploaded file

Step 2
Click on the Generate SAS, and in the generate SAS environment, navigate to Permission and click the drop-down and select read and for the start and end time, adjust it so it will correspond to the 24hrs access to third third-party user.
SAS, Permission, start & expiry time

Step 3
Click the Generate SAS token and URL, locate Blob SAS URL and copy the link
SAS and blob

The below is the output of the copied link
aws image

To save cost, after 30 days, move blobs from Hot to Cool

In cloud Computing, the word Hot means something that is frequently used, while cool means something that is used once in 30 days

Steps on how move blobs from hot to cool

Step 1
Click on overview, locate the property, and for Default Access Tier ensure it is Hot
overview, property & default access tier

Step 2
Click Data Management, choose lifecycle management and click + Add a rule
data management, life cycle & add a rule

Step 3
In the Add a rule environment, give the rule name, and for the rule scope, since it is only one container, choose Apply rule to all blobs in your storage account, and for the Blob type, choose block blob, and for the blob subtype, choose base blob, and click next
rule name, rule scope, blob type, blob sub type, and next

Step 4
For more than days ago, choose 30 since we are moving from Hot to cool while for the then click the drop-down and select move to cool storage, and click Add
more than days, then & add

Steps on how to back up the public website files

Step 1
In the overview section, navigate to Data storage and click Container and click + Add Container, give it a name, and create
overview, data storage, container, + add container

Step 2
Click on storage and locate the public website storage
storage & publicwebsite

Step 3
In the overview section of the public website, navigate to Data Management and from the drop-down, choose object replication and click + create replication rules
overview, data management,  object replication & + create replication rules

Step 4
In the + create replication rules environment, navigate to the Destination storage account and click the drop-down arrow and choose private.
+ create replication & destination storage account

Step 5
In the + create replication rules environment, navigate to the source container and click the drop-down arrow and choose public, while for the destination container, click the drop-down arrow and choose backup and click create
+ create replication rules environment, source container, destination container & create

Below is the final phase of the backup session
image of the back environment
I really appreciate your time for reading this article, and I hope you are now familiar with words like Public Storage, Private Storage, Redundancy, Hot, Cool, Region, Soft Delete, and Versioning in Cloud Computing.

Top comments (0)