AZURE KUNG FU TOOLKIT – A RELIABLE COMPANION FOR YOU

  • The Azure Kung Fu toolkit contains a lot of practical scripts and examples for the Azure CLI.
  • It is an ever growing library of Azure CLI samples that you can use out of the box to build out your own scripts easily.
  • And the plus point is that you don’t have to do all the heavy lifting.

This is the GitHub page of the Azure Kung Fu toolkit. https://github.com/Build5Nines/az-kung-fu
You can download the toolkit from here and run the scripts on your local machine.

  • Also, the Azure Kung Fu toolkit is completely open source.
  • Which means that you can contribute to it as well.

To see it in action, download the Kung Fu toolkit from GitHub.

Once you download the folder, open it in Visual Studio Code.

Next, open the terminal and make sure that you have selected bash.

To run the scripts, you also need to install the Azure CLI Tools extension for VS Code. Go to extensions and search for it. Install it and you are ready to go.

  • Now what usually happens is that when you are using the Azure CLI, you first need to sign into your Azure account using the az login command.
  • But because we are inside VS Code, we can have our Azure account connected to it and we don’t have to do the az login anymore.

If you have multiple subscriptions in your Azure account, you can set the subscription you want to use in this script and it will use that subscription in all the scripts.

So, I will set the subscription name to what I want to use.

  • There are numerous useful scripts in the toolkit.

There are scripts which you can use for different ways of logging into Azure.

And there are sample scripts that does things like deploying the az kung fu VM and scripts that delete multiple resource groups.

Let’s go ahead and create an Azure App Service Plan with this script and then create an Azure Web App with the same service plan.

But before that, we need to create a resource group. For that, we can use this script. We need to fill in the parameters before we can actually run the script.

And so, I have assigned those variables to it. I have assigned a name to the resource group and I also have selected the location.

Now to run that script, all I have to do is simply select the script.

Go to Terminal and choose Run Selected Text.

And it will create that resource group for me.

Now for the App Service plan, I have assigned the variables that I want to use. Next, all I have to is run the selected text.

And that will be created as well.

To create the web app, I am going to use this script. I have already filled up the variables. All I am going to do next is just run the selected text.

And the web app will be created as well.

If you go to the portal, you will see the resources that you have created are present.

To delete a resource group, you can simply run this script and the resource group will be deleted.

  • You can play along with the Kung Fu toolkit.
  • This comes in very handy as you don’t have to do the hard work of writing down the scripts on your own.