Sei sulla pagina 1di 24

Module 9

Automating Integration with Azure


Resources
Module Overview

Azure SDK Client Libraries


Scripting Azure Service Management by Using
Windows PowerShell
Azure REST Interface
Azure Resource Manager
Lesson 1: Azure SDK Client Libraries

Azure SDKs
Azure SDKs

Software Development Kits (SDK) are available


for different platforms
It provides programmatic access to Azure resources
Source code for SDKs are open-source and
available on GitHub
Official Azure tools are available for Eclipse and
Visual Studio
Azure SDKs (continued)

.NET
Extensions and tools are available for Visual Studio
Azure SDK for .NET is installed using Web Platform Installer
(WebPI)
Tools installed as part of package for Visual Studio:
Web Deploy
ASP.NET and Web tools
Azure SDK for .NET

Client libraries to access different Azure services can be


retrieved from NuGet
Azure SDKs (continued)

Additional SDKs and client libraries are available


for other platforms and languages including:
PHP
Node.js
Ruby
Python
Java
PowerShell
Lesson 2: Scripting Azure Service Management
by Using Windows PowerShell

The Azure PowerShell Module


Installing Azure PowerShell Cmdlets
Authenticating to Azure by Using Windows
PowerShell
Demonstration: Managing a Web App Using
PowerShell
The Azure PowerShell Module

Azure PowerShell is a module that is available to


manage Azure services
Installs a series of cmdLets
The PowerShell cmdLets provides a superset of
the functionality available in the Management
Portal.
Many times, new features can be implemented using
PowerShell much before it is available in the
Management Portal.
A second set of modules is available that uses
the new Resource Manager
Installing Azure PowerShell Cmdlets

Azure PowerShell requires .NET 4.5


The installer is available via Microsoft WebPI
A custom PowerShell console is also available
that requires less configuration of the
environment compared to the standard
PowerShell console
Authenticating to Azure by Using Windows
PowerShell

There are two primary authentication methods:


Azure Active Directory
Authenticate with Azure in the same manner that you
authenticate with the portal
Authentication is only temporary (approximately 12 hours)
Publish Settings
Opens a Management Portal webpage
User authenticates with the webpage if they are not already
authenticated
Downloads an XML file with account tokens and information
PowerShell can permanently use the Publish Settings file to
connect to the Azure subscription
Demonstration: Managing a Web App Using
PowerShell

In this demonstration, you will learn how to:


Use a publish profile to use an Azure subscription with
Windows PowerShell
Use Windows PowerShell to create an Azure Web App
Lesson 3: Azure REST Interface

Service Management REST API


Authenticating Requests to the Service
Management REST API
Service Management REST API

Azure Resources can be managed using a REST


API and common HTTP verbs
API operations are performed using SSL
REST APIs are supported by a variety of programming
and scripting platforms
Many of the same features from the portal can
be used with the Service Management API
Service Management REST API (continued)

If you are using PowerShell or xplat CLI,


debugging can be used to determine the
corresponding REST endpoints:
Example:
Get-AzureVM Debug
Azure vm list vv
MSDN also contains a reference to the entire
REST API with documentation and examples
Authenticating Requests to the Service
Management REST API

Authentication to the Service Management API


can be done in two ways:
Using Azure Active Directory
Add your calling application as an application in Azure AD. You
can then delegate permissions to your application to use the
Service Management API.
Using Management Certificate
An X509 certificate can be downloaded and used as part of an
HTTP request to access the Service Management API
Lesson 4: Azure Resource Manager

Azure Resource Manager Overview


Resource Groups
Resource Group Templates
Demonstration: Viewing a Resource Group
Template
Azure Resource Manager Overview

Azure Resource Manager completely reinvents


the way resources are grouped and managed
Your services are referred to as resources
Resources are collected into resource groups
Resource group templates can be created to automate
the creation of multiple resources
Resource Groups

Resource groups are collections of related


resources
By managing the resources as a group, you can create,
modify, or destruct the resources as a whole
Resources can be migrated and managed as a logical
unit
Resource groups are often referred to as lifecycle
boundaries since they now can share a managed
service lifecycle
Resource groups can also be used to track usage
and billing isolated to a specific logical unit
Resource Group Templates

Resource group templates provide a way to


model a collection of resources in Azure
Example:
A resource group template can be used to design your
applications production architecture in Azure. Then the
template can be used to build identical testing and
staging environments
Templates provide a quick and consistent
method of building repeatable service models
Templates are stored as JSON and can be created
and customized using a standard schema
Demonstration: Viewing a Resource Group
Template

In this demonstration, you will learn how to:


View the details for a resource group template
View the JSON content for a resource group template
Lab: Automating the Creation of Azure Assets
using PowerShell and xPlat CLI

Estimated Time: 45 minutes


Lab Scenario

Now that you have created many of the


resources that you will use in your Azure
application, you have decided to automate the
creation of your assets in Azure. Some of your
administrators are Windows experts and would
prefer to automate using PowerShell while
others use Linux and would prefer to automate
from the command line. Due to this
requirement, you will try and implement
automation using PowerShell and separately
using a cross-platform CLI interface.
Lab Review

When automating your Azure accounts and


resource management, should you use the
Resource Manager cmdlets or the standard
cmdlets?
Which Azure cmdlet can be used to verify that a
resource group has been deleted?
Module Review and Takeaways

Review Question(s)
Best Practice

Potrebbero piacerti anche