One of the fundamental resources in the cloud model is scalable, high performing storage accounts for storing a number of different resources such as data in blobs, access to queues and simple table services. This functionality is provided within Microsoft Azure, a number of options are available depending on your requirements. This post provides an introduction to storage within Microsoft Azure.

Storage Services

At a high level, a number of storage services are provided within Microsoft Azure. These services are:

  • Blob storage
  • Table storage
  • Queue storage
  • File storage

Blob storage provides you access to unstructured blob storage, a blob can be any type of text or binary data such as documents, media, applications or VHD files. Table storage on the other hand provides you with access to NoSQL key-attribute storage which is structured. This allows you as a developer quick access to vast amounts of data and rapid development. Queue storage is aimed at providing reliable messaging for workflows and communication between different components. Finally, file storage is traditional file share based storage that you would usually associate with on-premises file servers using SMB. Applications can share files using file storage via mounted shared and applications can access via the API.

Relationships

Storage in Microsoft Azure starts with a storage account. Storage accounts themselves are free, it’s the data stored within them which is chargeable. General purpose storage accounts can then have containers for blob storage, tables, queues and shares. Blob storage accounts only have containers for storing blobs.

Storage Performance

When provisioning storage accounts, you can select between two types of performance tiers, standard and premium. Standard storage offers performance of 500 IOPS and premium 5000 IOPS. If you provision blob storage then you currently can only provision this as standard storage. In this scenario you can however select between hot or cool access tiers. Hot indicates that you will access blobs more frequently, meaning you can store data at a lower access cost. Cool indicates that the blobs will be accessed less frequently and storage costs will be cheaper.

Quick Deployment

In order to quickly deploy a storage account in Microsoft Azure we can use either PowerShell or JSON templates. The JSON template for this post is available on GitHub. Let’s take a closer look at how to deploy the storage account. You will see a file called Create-StorageAccount.ps1, this file is responsible for defining the deployment parameters and executing the template. It’s a basic structure but will be covered in more detail.

$RgName = (Get-AzureRmResourceGroup -Name "TheAzureGuy").ResourceGroupName
New-AzureRmResourceGroupDeployment -Name "NewStorage" -TemplateFile .\ProvisionStorageAccount.json -ResourceGroupName $RgName `
 -name "saeuntheazureguy" `
 -accountType "Standard_LRS" `
 -location "northeurope" `
 -encryptionEnabled $false

Once we have passed in the resource group name and a name for the deployment (which isn’t actually mandatory), we have to define the parameters which are stored in the template. We can also do this using a parameters JSON file as well, but this will be covered in a later post.

  • Name – This is simply the name used for the storage account, it will be used as the access route.
  • Account Type – This defines the type of storage we are provisioning, locally redundant and globally redundant are among the options here.
  • Location – This is the Microsoft Azure region where the storage should be deployed.
  • Encryption Enabled – This is a boolean value defining if the storage account should have encryption enabled.