Download presentation
Presentation is loading. Please wait.
Published byBarnard Peters Modified over 6 years ago
1
Azure CLI Deep Dive Neil Peterson Content Developer Microsoft
2
Agenda Introduction CLI Basics and Resource Creation
Queries and Output Interactive CLI Cloud Shell Scoped Configurations GitHub project
3
Session objectives and takeaways
At the end of this session, 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
4
Azure CLI Introduction
5
Azure CLI Introduction
Cross platform CLI for provisioning and managing Azure infrastructure. Version 2.0 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
CLI Basics
7
Azure CLI Installation
Cross platform with several installation options. macOS – Instructions Windows – Instructions Linux - Instructions Docker Image – Instructions
8
Azure CLI Authentication
Interactive – ‘az login’ Non Interactive – ‘az login –u username –p password Service Principle – ‘az login –service-principal –u –p password –tenant tenant
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
Demo – CLI Basics
11
Queries and Output
12
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
13
CLI Interactive Mode
14
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.
15
Cloud Shell
16
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
17
CLI Scoped Configurations
18
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”
19
GitHub Project
20
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
21
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.