Provide storage for the private website in Microsoft Azure
Published: 2024-06-12 09:07:45


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4je9p2hwjrb29v0tw9ge.png)

Skilling tasks
•	Create a storage account for the company private documents.
•	Configure redundancy for the storage account.
•	Configure a shared access signature so partners have restricted access to a file.
•	Back up the public website storage.
•	Implement lifecycle management to move content to the cool tier.
`Create a storage account and configure high availability.
1.	Create a storage account for the internal private company documents.
In the portal, search for and select Storage accounts.`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dsulzrieie0j7qar3k29.png)

Select + Create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kohz4ht42oq8nfs88kq.png)

Select the Resource group created in the previous lab.
Set the Storage account name to private. Add an identifier to the name to ensure the name is unique.
Select Review
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wldc0dsk9vy7rn2i0bk0.png)

Create the storage account.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbg4vmieuyvnwifp47i1.png)

Wait for the storage account to deploy, and then select Go to resource.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xpdd4fnu7b8yhxrvgxe.png)

This storage requires high availability if there’s a regional outage. Read access in the secondary region is not required. Configure the appropriate level of redundancy.
In the storage account, in the Data management section, select the Redundancy blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bcbby0zoih6fu1koeez.png)

Ensure Geo-redundant storage (GRS) is selected.
Refresh the page.
Review the primary and secondary location information.
Save your changes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7blvzaa7wnlnbth19bp.png)

Create a storage container, upload a file, and restrict access to the file.
Create a private storage container for the corporate data.
In the storage account, in the Data storage section, select the Containers blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mp06zlwjvmdyzxcmvr39.png)

Select + Container.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kaykau4jpdchktebmn9.png)

Ensure the Name of the container is private.
Ensure the Public access level is Private (no anonymous access).
When you have time, review the Advanced settings, but take the defaults.
Select Create.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hs21tm9ddysnegftzglc.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flz0gwhhy6jpmlspe2qc.png)

For testing, upload a file to the private container. he type of file doesn’t matter. A small image or text file is a good choice. Test to ensure the file isn’t publically accessible.
Select the Private 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/igfpsypwmov9avunb437.png)

Select Upload.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5n4yli8kgq9x2j3xr4t7.png)

Browse to files and select a file.
Upload the file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5zhll8oszncnzx8vz21q.png)

Select the uploaded file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3yya758tubm7w2a5me2.png)

The Overview tab, copy the URL.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktn7yp9kiqpw5q3bq1yc.png)

Paste the URL into a new browser tab.
Verify the file doesn’t display and you receive an error.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9rs4xzbky9cor2kee9d.png)

An external partner requires read and write access to the file for at least the next 24 hours. Configure and test a shared access signature (SAS)
Select your uploaded blob file and move to the Generate SAS tab.
In the Permissions drop-down, ensure the partner has only Read permissions.
Verify the Start and expiry date/time is for the next 24 hours.
Select Generate SAS token and URL.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbj8nbsovexfl03yiimf.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljba1if0zblj5uwt74fe.png) 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bsnwwdyrcu60z5167pcr.png)

Copy the Blob SAS URL to a new browser tab.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9h11rr7m90bxwvjy5r9d.png)

Verify you can access the file. The uploaded image file will display in the browser. Other file types will be downloaded
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9g6848hgmiivr50pz23.png)

Configure storage access tiers and content replication.
To save on costs, after 30 days, move blobs from the hot tier to the cool tier
Return to the storage account.
In the Overview section, notice the Default access tier is set to Hot.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8whrzfv55oiil71bgixr.png)

In the Data management section, select the Lifecycle management blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/267mrtfs54e68houe9fs.png)

Select Add rule.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tcxlaudo1k2003sr0xux.png)

Set the Rule name to movetocool.
Set the Rule scope to Apply rule to all blobs in the storage account.
Select Next.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zw4gqn5km9ebsh5iw6un.png)

Ensure Last modified is selected.
Set More than (days ago) to 30.
In the Then drop-down select Move to cool storage.
As you have time, review other lifecycle options in the drop-down.
Add the rule.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyh7dycxh2up6nr2pvko.png)

The public website files need to be backed up to another storage account. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/niu4oc3fjzun0v65550a.png)

In your storage account, create a new container called backup. Use the default values
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aisdttyb69ldf0e0ppw8.png)
 
Navigate to your publicwebsite storage account. This storage account was created in the previous exercise.
In the Data management section, select the Object replication blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htrrtlpxm6fzh4lmnrn2.png)

Select Create replication rules. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zor8zi1eclqbyqby9wf3.png)

Set the Destination storage account to the private storage account.
Set the Source container to public and the Destination container to backup.
Create the replication rule.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/izba2y910itwpurjct0j.png)