Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Neil Peterson - Azure CLI Deep Dive

492 views

Published on

Azure has a new Command Line Interface, the Azure CLI 2.0. This powerful tool provides cross platform provisioning, management, and automation capabilities for Azure services with an easy to understand interface. In this session we will start with the basics and work our way towards complex end to end Azure deployments using the Azure CLI 2.0. Regardless if you work on a Mac, Windows, or Linux system, this session will get you ramped on managing Azure with the CLI 2.0.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Neil Peterson - Azure CLI Deep Dive

  1. 1. Azure CLI Deep Dive Neil Peterson - @nepeters
  2. 2. Agenda • Introduction • CLI Basics • Resource Creation • Queries and Output • Scoped Configurations • Interactive CLI • Troubleshooting • Cloud Shell • GitHub project
  3. 3. Azure Management Interfaces • Azure Portal • Azure REST API • Azure PowerShell Module • Azure Command Line Interface Azure Resource Manage Templates*
  4. 4. CLI Introduction
  5. 5. Azure CLI Overview Cross platform CLI for provisioning and managing Azure infrastructure. • Run on macOS, Windows, or Linux • Run in Azure Cloud Shell • Create and manage Azure resources from command line • Write scripts to create and manage Azure resources
  6. 6. CLI Basics
  7. 7. Azure CLI Installation Cross platform with several installation options. • macOS – Instructions • Windows – Instructions • Linux - Instructions • Docker Image – Instructions • Nightly Builds – Instructions
  8. 8. Azure CLI Authentication • Interactive – ‘az login’ • Non Interactive – ‘az login –u username –p password • Service Principle – ‘az login –service-principal –u http://my-app –p password –tenant tenant
  9. 9. Using the CLI • Can be run in various shells (Bash, CMD, PowerShell) • Get help (az --help) - simple format, identifies required arguments, examples. • Scoped help (az group --help) – get help on a specific command. • Command output is JSON by default
  10. 10. Queries and Output
  11. 11. Azure CLI Query The query argument can be used to search and filter data. • CLI uses JMESPath query notation • Query using the –query argument • Filter data using the contains function • Output formats: • json – json string. • ksonc – colorized json string • table – table • tsv – tab-seperted values
  12. 12. CLI Scoped Configurations
  13. 13. Azure CLI – Scoped Configurations The CLI can be scoped so that default values are always used. For instance, if you want to avoid entering a resource group name, a default can be specified. • az configure --defaults group=“myResourceGroup” • az configure --defaults vm=“myVM”
  14. 14. CLI Interactive Mode
  15. 15. Azure CLI – Interactive Mode Interactive mode can be used for discovering command and examples. • Discover commands and arguments • Scope the CLI to a specific resource • Bash commands can be used in interactive mode.
  16. 16. Cloud Shell
  17. 17. Azure CLI – Cloud Shell Cloud Shell is build into the Azure portal and integrated with documentation. • Browser based console • A volume is mounted where scripts can be stored • Common tools such as the Docker CLI are also installed
  18. 18. GitHub Project
  19. 19. Azure CLI – GitHub Project Azure CLI is fully open sourced, developed and supported on GitHub. • Written in Python • Open to contribution • Support provided .via GitHub issues • Sample PR - GitHub
  20. 20. In review: session objectives and takeaways Now, you should be better able to… • Install and use the Azure CLI • Deploy Azure infrastructure with the CLI • Query data with the CLI • Find support and contribute to the CLI

×