Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Azure CLI Talk

Azure CLI Talk

Goals for this talk
* Getting started with of Azure CLI (Command Line Interface, aka AZCli ) as part of your Azure toolbox.
* Share tools and techniques in the shell with Azure CLI
* Explore Azure CLI commands, beginning with the fundamentals useful for AZ-104 (Storage, VMs, Networking)
* Discover interesting preview Azure CLI commands and extensions
* Challenge you to learn Azure CLI by coding and sharing with the CS community via GitHub

https://github.com/dave-007/azure-cli-talk

David Cobb

April 30, 2020
Tweet

More Decks by David Cobb

Other Decks in Technology

Transcript

  1. Intro - Consultant & Technical Instructor - Career path: helpdesk,

    web developer, dba, system administrator, cloud engineer - Microsoft Certified Trainer since 2002, was focused on SQL, now focused on Azure. Certifications for Microsoft SQL, Azure & two for AWS - Generalist. My goal is baseline knowledge of most of Azure, with deeper study in a few areas of interest (SQL/Data/ML/AI).
  2. Goals for this talk Getting started with of Azure CLI

    (Command Line Interface, aka AZCli ) as part of your Azure toolbox. Share tools and techniques in the shell with Azure CLI Explore Azure CLI commands, beginning with the fundamentals useful for AZ-104 (Storage, VMs, Networking) Discover interesting preview Azure CLI commands and extensions Challenge you to learn Azure CLI by coding and sharing with the CS community via GitHub
  3. Installing & Running AZCLI Azure CLI is written in Python,

    so it's cross platform, runs in Windows, Linux, MacOS Is open source under MIT License Has many ways to install (docs) Works* on your choice of shell: bash, zsh, pwsh, etc... David's shell of choice to run AZCLI is PowerShell 7 (pwsh) * * Aspects of Azure CLI like --query are not perfectly cross platform yet..
  4. Shell Considerations What's your shell? Practice makes (better). It's a

    time investment to become proficient in a shell, this pays off in increasing effectiveness, especially in the cloud. See Tips for using Azure CLI effectively for help with common challenges that arise with shell scripting using this tool. We will use different shells that each have their strengths, but the focus of this talk is not the shell but Azure CLI.
  5. Using VSCode? You should be! Check out the 'Azure CLI

    Tools' extension code --install-extension ms-vscode.azurecli Works with the shell of your choice
  6. Azure CLI Basics Start with Azure API Basic Syntax First

    Commands Get Interactive Dealing with JSON
  7. Azure's API As the Underlying control plane for all of

    Azure, the API has a HUGE, RAPIDLY EVOLVING scope Azure API docs Azure API releases on github Azure CLI is also updated frequently AZCLI release notes AZCLI issues tracker Compare to Azure PowerShell's update frequency Azure PowerShell release notes Azure PowerShell issues tracker
  8. DAVE'S STANDARD 'CLOUD BASED BLEEDING EDGE TOOLS' WORD OF CAUTION

    Using many tools in development or preview, some of these demos may not work! We can learn a lot troubleshooting things that break! Even so, be wary of dragons (or bugs).
  9. Demo Azure API Use the Azure Resource Explorer to work

    against Azure API after authenticating to your Azure account. But why use a web page when you can use Lawrence Gripper's AzBrowse? Add az browse command to azcli using Noel Bundick's custom azcli extension az extension add --source https://github.com/noelbundick/azure-cli-extension-noelbundick/releases/download/v0.0.17/noelbundick-0.0.17-py3-none-any.whl
  10. Azure CLI Basic Syntax & First Commands Arguments syntax Start

    with az -h All params start with two hyphens (--help),most common arguments have a one hyphen short format (-h) After az login , start with az group -h to work with your resource groups and get familiar with Azure CLI syntax You can save work later by setting some smart defaults with az configure
  11. Global Arguments work for most commands --debug : Increase logging

    verbosity to show all debug logs. --help -h : Show this help message and exit. --only-show-errors : Only show errors, suppressing warnings. --output -o : Output format. Allowed values: json, jsonc, none, table, tsv, yaml, yamlc. Default: jsonc. --query : JMESPath query string. See http://jmespath.org/ for more information and examples. --subscription : Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`. --verbose : Increase logging verbosity. Use --debug for full debug logs.
  12. Azure CLI Open Source Projects in GitHub Azure CLI Azure

    CLI Extensions Azure Commands under development Microsoft Azure CLI Dev Tools (azdev)
  13. Development Process of Azure CLI Commands -----> Extension (Development) ------------>

    Extension (Preview) -----------------> Extension (Released) -----------------------> CLI Command (Preview) ----------------------------> CLI Command (Released) Example, az keyvault command was previously an extension in preview