More than one way to skin a cat (and by cat i mean azure)



Not sure what the actual first origin is of the english phrase 'there is more than one way to skin a cat' but it seems vaguely appropriate when dealing with doing things inside Azure. There are multiple ways to acheive the same thing - for example (this is not an exhaustive list....)

1) Azure portal
2) powershell
3) Visual Studio
4) az command line
5) build your own app with the client sdk

you get the idea.....


Anyway this multitude of options has proved quite useful recently - we've been having an issue with the Azure portal in that the azure files option with azure storage just isn't working (something to do with our firewall/proxy setup i think) - we just seen a sad little raincloud instead of the details we should be seeing - i.e. something like this






Now as well as being annoying - this also prevents us from working with them - i.e. adding new ones or extending the size etc

The good thing with having so many interfaces is that we can try another one of them to help us out.

In this case I'm going to use az command line, and the good thing is i can actually still do this from the browser - i don't need to install it anywhere or perhaps spin up a docker container with it preloaded on there - Microsoft helpfully added the cloud shell option into the browser (which recently had powershell support also enabled) - so how do i get to that?

Well simply click on the >_ symbol at the top of the portal page (easy to miss to be honest but its a very nice feature) - then this happens




By default it goes into bash but it can be switched to powershell should you wish

Now you have a pre logged in command window where you can run the az command to work with the file storage.

The first thing you have to do is tell it the subscription you want to work with - thats just done by running

az account set -s subnamehere

Once you are working in the right subscription you then need to run the relevant storage command - to just list what shares you have you would run

az storage share list --account-key keynamegotfromtheportal (the one ending in ==) --account-name storageaccountnamehere




In my case that currently returns a null entry

[]

To then add a new one i run

az storage share create --account-key keynamegotfromtheportal (the one ending in ==) --account-name storageaccountnamehere-n testshare --quota 100

So that creates a new share called testshare of maxsize 100GB - the command then returns this


{
  "created": true
}


I can now list out the shares by running the list command again


And there we have it - 1 differently skinned cat .....

Comments