Lab Answer Key: Module 4: Virtual Machines
Lab 5: Managing Azure Storage
Exercise 1: Managing Azure Storage accounts and blobs
The main tasks for this exercise are as follows:
- Create a storage account.
- Review storage account keys.
- Work with Azure Storage Explorer.
- Copy a blob between storage accounts.
Task 1: Create a Storage Account
In this task, you will create a new storage account.
- Open your browser and navigate to https://portal.azure.com.Recommendation: Open your browser in the InPrivate mode.
- Enter your Microsoft Azure subscription credentials.If your account is associated with an organization account and a Microsoft account, you may be prompted to choose which one to authenticate with for your Microsoft Azure account.
- Click New, click Storage, and then click Storage Account.
- Specify the following storage account settings and then click Create:
- Name: a unique name for your storage account
- Deployment model: Resource Manager
- Account kind: General purpose
- Performance: Standard
- Replication: Locally-redundant storage (LRS)
- Storage service encryption: Disabled
- Subscription: your Azure subscription
- Resource Group: Ensure that the Use existing option is selected and click LABRG in the drop-down list
- Location: Select region nearest your location.
Task 2: Review storage account keys
When you create a storage account, Azure generates two 512-bit storage access keys. These keys are used for authentication for accessing the storage account.
The storage account name in combination with storage account key function as a connection string to the storage account when accessed by third party tools, or programmatically. Azure enables regeneration of the storage account key without interruption of the storage service.
To access the storage account keys, do the following:
- In the hub menu of the Azure portal, click Storage accounts.
- On the Storage accounts blade, click the storage account you created in the previous task.
- On the storage account blade, click Access keys.
- On the Access keys page for your new storage account, note the values of key1 and key2.
Task 3: Work with Azure Storage Explorer
- Download and install Microsoft Azure Storage Explorer from http://storageexplorer.com/.
- Open Microsoft Azure Storage Explorer.
- When prompted to Connect to Azure Storage, ensure that Sign in using your Azure Account(s) option is selected and click Connect.
- When prompted, provide your credentials to connect to your subscription.
- To create a blob container, in the storage explorer window, click the storage account created in the earlier exercise.
- Right click on Blob Containers sub-node of the storage account and then select Create Blob Container, and name it newcontainer.
- Double-click newcontainer.Note: You can drag and drop files to the container
- On your local computer, open File Explorer and create a new folder C:\MyLocalStore.
- Double-click MyLocalStore to open the folder.
- Create a new text file named File1.txt in the MyLocalStore folder. Open the file in Notepad, type in “Hello world” in the file, save it, and close Notepad.
- Drag and drop the file to the newcontainer container displayed in Azure Storage Explorer.
- Right-click the newcontainer folder, select Set Public Access Level, and select Public read access for container and blobs, and click Apply.
- Right-click the newly copied file in the Azure Storage Explorer window and select Copy URL to Clipboard.
- Open a new InPrivate browser window and paste the URL. You should be able to see the “Hello world” text in the browser window. You can change the access level to No public access and try to reopen the file in the browser window. You will receive a message indicating that the webpage cannot be found.
Task 4: Copy a blob between storage accounts
- In the Azure portal create a new storage account with the same settings as the storage account you created in the first task of this lab (except for its name, which must be unique).
- On the Overview page of the newly created storage account, click Blobs.
- On the Blob service blade, click + Container.
- On the New container blade, specify the following and click Create
- Name: newcontainer2
- Access Type: Private
- Refresh the Microsoft Azure Storage Explorer window and navigate to the file your uploaded earlier. Right-click on the file and click Copy. Next, browse to newcontainer2 in the second storage account and click Paste on the toolbar.
No comments:
Post a Comment