Creating Multiple Storage Account Using Azure Resource Group

advertisement
CREATING MULTIPLE STORAGE
ACCOUNT USING AZURE
RESOURCE GROUP TEMPLATE
Sainath Kev
MICROSOFT MVP Directory Services
Document Revision History
Version
0.1
Summary of Changes
Document Creation
Author
Sainath
Date
16/08/2015
Contents
1.
Introduction .......................................................................................................................................... 2
2.
Prerequisites ......................................................................................................................................... 2
3.
Building the Solution ............................................................................................................................. 2
3.1
4.
Source Files ................................................................................................................................... 5
Appendix ............................................................................................................................................... 5
4.1
References .................................................................................................................................... 5
1. Introduction
This article explains the steps involved in creating multiple Azure Storage accounts using Azure Preview
Portal Resource Group Template in Visual Studio. Storage account can be created either with help of GUI
or PowerShell or using Resource Manager Template. Using the steps outlined in the document, User can
create different Resource Group Templates.
Resource Group Templates simplifies creation of complex model of services and allows Administrators
to use template under different subscriptions with minimal effort.
Scope:
This document is intended to be as-is build document for test environment and the steps outlined below
should be tested before implementing in production environment.
Audience:
This document is targeted for IT Professionals working on Azure IaaS / PaaS projects and should have
working knowledge on


Azure IaaS concepts
PowerShell
2. Prerequisites
Below are the prerequisites required for creating storage account using Visual Studio.
Component
Value
Environment
Test
Visual Studio
2013 and above with Azure SDK installed
Azure Subscription
Required
PowerShell
V.0 with Azure cmdlets installed
Table 1: Prerequisites
3.
Building the Solution
When the solution is built, Visual studio creates 3 folders specifically.
a) Scripts: Folder stores PowerShell file for execution.
b) Templates: This folder creates two files <Template Name>.Json and <Template
Name>.param.dev.json>. Param.dev.Json file is where users add / remove the script values
which then gets called in <Template Name>.Json file.
c) Tools: This folder contains AZCopy.exe which is used to copy JSON files to storage account.
Step
Instruction
1
Open Visual Studio 2015
You could logon to Azure or this
can be done during build time
Follow the steps outlined in the
screenshot.
a) Select Visual Basic
b) Select Cloud
c) Choose Azure Resource
Group
d) Add Name of the project
e) Select the location
f) Add the Solution Name
g) Click OK to connect
2
On the next wizard, select Blank
Template and click OK.
Screenshot
3
After project gets created,
4
Add multiple storage accounts
Step1: right click Resources option
Step 2: Select Add Resource which
opens up the window as shown.
Step3: Add Storage Account
Step4: Name is generic and does
not reflect in Portal UI
Step5: Click OK to create a storage
account.
5
Add values for storage account
Step1: Right click Project name
under solution explorer and click
Deploy
Step2: Click Edit Parameters and
add values for storage account
Step3: Save the values and click
Deploy
5
Verify the deployment in GUI or
using PowerShell commands.
Table 2: Install and Configure Steps
Note 1: Storage account name does not support capital letters. This feature might be supported in
future releases.
Note 2: Post configuration and settings up the values in Visual studio, you can right click Scripts
PowerShell file name and execute the code in PowerShell_ISE.
Note 3: Australia East and Australia SouthEast is not currently supported. But this might be supported in
near future.
Tip: Use blank template and add the resources. You might also use existing templates and customize the
file.
3.1
Source Files
Source Description
File
Deployment File
JSON Parameter File
Table 3: Source Files
4.
Appendix
4.1
References
Description
Link
Source
Azure Storage
Documentation
http://azure.microsoft.com/enus/documentation/services/storage/
TechNet
Table 4: Reference Links
Download