Download our latest MNC Answers Application at Play Store. Download Now

Azure Storage Hands-on Solution | TCS Fresco Play | Fresco Play

Azure Storage Hands-on Solution | TCS Fresco Play | Fresco Play | TCS


Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the MCQs Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!

If you found answer for any of the questions is wrong. Please do mention in the comment section, could be useful for others. Thanks!

________________________________________


Username: user-vsiwscqohmeb@azurelabs.katacoda.com

Password: v0U1XNhhn382v010

Resource Group: user-vsiwscqohmeb

Region: "East US"

----------------------------------------------------

Create a Storage Account:

az storage account create -n satyastorage -g user-vsiwscqohmeb --https-only true --sku Standard_LRS


Create a Table:

az storage table create -n Frescotab --account-name satyastorage

az storage entity insert --entity PartitionKey=AAA RowKey=BBB Contact=contact1 customer=customer1 --table-name Frescotab --account-name satyastorage


-------------------------------------------------------

Create an unmanged VM

Click the following command to assign the resource group as default:


az configure --defaults group=$resource

1)Create a storage account with name as per your wish and create a container with the name vmblob


2) Create an unmanaged virtual machine in the resource group created by the katacoda account, with an admin username and admin password, and the following data:

image = Win2012R2Datacenter

size = Standard_DS1_V2


Note: use the parameter --use-unmanageddisk in order to create a VM

3) Attach a new unmanaged data disk of 512 GB to the VM.

Required parameters: vm name, size gb, and new

4) Delete the unwanted or accidentally created VMs (if any exist).


---------------Commands to create above requirements-------------------------

az storage account create -n satya1

az storage container create --name vmblob --account-name satya1

az vm create \

  --name WinServer1 \

  --image Win2012R2Datacenter \

  --admin-username satya \

  --admin-password "Demouser@123" \

  --size Standard_DS1_V2 \

  --use-unmanaged-disk 


az vm unmanaged-disk attach --vm-name WinServer1 --name MyDisk1 --new --size-gb 512


Convert the existing unmanaged VM to a managed VM, and restart the VM.

-------------------------------------------------------

az vm deallocate -n WinServer1

az vm convert -n WinServer1

az vm restart -n WinServer1


==============================


Creating a Blob Container

Click the following command to assign the resource group as default:

az configure --defaults group=$resource

Create a storage account with blob encryption, and only https traffic enabled. Create a blob container in the account.


---------------Commands to create above requirements-------------------------


az storage account create \

-n satyablob \

--encryption-services blob \

--https-only true


az storage container create --name vmblob --account-name satyablob


------------------------------------------------------------------------------

upload blob into container

Upload a blob into the container of the storage account.

A folder named php-docs-hello-world is present in the Katacoda terminal.

Select any file from the folder, and upload it to the storage account.


---------------Commands to create above requirements-------------------------


az storage blob upload \

    --container-name vmblob \

    --account-name satyablob \

    --name helloworldphp \

    --file php-docs-hello-world/index.php


================================

Creating a Storage Queue

Click the following command to assign the resource group as default:

az configure --defaults group=$resource

Create a storage account with only https traffic enabled. Ensure you use the resource group created by Katacoda during the creation of the Azure account.

Create a queue storage named testqueue in the above created storage account.


---------------Commands to create above requirements-------------------------


az storage account create \

-n satyaqueue \

--https-only true

az storage queue create --name testqueue --account-name satyaqueue


-----------------------------------------------------------------------------

Working with messages in queue

Add a message to the created queue with its contents as frescoPLAY,

and read the contents without dequeueing it.


---------------Commands to create above requirements-----------------------

az storage message put --account-name satyaqueue --content frescoPLAY --queue-name testqueue

az storage message peek --account-name satyaqueue --queue-name testqueue

az storage queue delete --name Qname --account-name Myacc --account-key Acckey 

   az vm delete \

  --resource-group user-tzfmunyvnlio\

  --name myVM \


===================================

Creating a Storage Account and a table in it

Click the following command to assign the resource group as default:

az configure --defaults group=$resource

1) Create a storage account with only https traffic enabled. Ensure you use the resource group created by Katacoda during the creation of the Azure account.

2) Create a table named Frescotab in the storage account.


---------------Commands to create above requirements-------------------------

az storage account create \

-n satyatable \

--https-only true


az storage table create -n Frescotab --account-name satyatable


az storage entity insert --account-name satyatable --table-name Frescotab --entity PartitionKey=customer RowKey=contact customer=satya contact=1234

az storage entity insert --account-name satyatable --table-name Frescotab --entity PartitionKey=customer1 RowKey=contact1 customer=arindam contact=1235

az storage entity insert --account-name satyatable --table-name Frescotab --entity PartitionKey=customer2 RowKey=contact2 customer=arindam2 contact=1235

az storage entity insert --account-name satyatable --table-name Frescotab --entity PartitionKey=customer3 RowKey=contact3 customer=arindam3 contact=1235

az storage entity insert --account-name satyatable --table-name Frescotab --entity PartitionKey=customer4 RowKey=contact4 customer=arindam4 contact=1235


az storage account create \

-n satyablob \

--encryption-services blob \

--https-only true


az storage metrics update --retention 10 \

                          --services b \

                          --account-name satyablob \

                          --api true \

                          --minute true