Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Enrique lima azure-it-pro-ps
1. The road to Azure for IT Pros goes through
PowerShell
idea. plan. deliver.
idea. plan. deliver.
Enrique Lima
Principal Consultant
2. idea. plan. deliver.
Who am I?
• Enrique Lima
• enrique@thinkalm.com
• Principal Consultant / Owner
• Microsoft v-TSP BPIO / CoreIO / APPIO
• Microsoft Community Contributor
• Member of the Geekswithblogs.net Community - Influencer
▫ http://geekswithblogs.net/enriquelima
• @enriquelima - twitter.com/enriquelima
• Member of INETA
8. idea. plan. deliver.
Windows
Comprehensive set of services that
enable you to quickly build, deploy and
manage applications across a global
network of Microsoft-managed
datacenters
10. idea. plan. deliver.
Per-hour license in the cloud
idea. plan. deliver.
What about licensing?
Windows
Server
Application License Mobility (SA)
Per-hour license in the cloud (select few)
Microsoft
Applications
Based upon vendor and product
External
Applications
24. idea. plan. deliver.
Simple VM Creation
First Virtual Machine in a NEW Cloud Service (-Location specified)
New-AzureQuickVM -Windows -ServiceName $svc -Name $vm1 -ImageName $wimg -Location $location -Password
$pwd
New Virtual Machine in an Existing Cloud Service (no –Location)
New-AzureQuickVM-Windows -ServiceName $svc -Name $vm2 -ImageName $wimg -Password $pwd
Creating a Linux Virtual Machine in an Existing Cloud Service
New-AzureQuickVM -Linux -ServiceName $svc -Name $vm3 -ImageName $limg -LinuxUser $lu -Password $pwd
25. idea. plan. deliver.
Configuring VM at Provisioning
Create Configuration Object with New-AzureVMConfig
Modify with Add-* cmdlets
Add with New-AzureVM
New-AzureVMConfig -Name $vm1 -InstanceSize Medium -ImageName $img |
Add-AzureProvisioningConfig -Windows -Password $pwd |
Add-AzureDataDisk -CreateNew -DiskLabel 'data' -DiskSizeInGB 10 -LUN 0 |
Add-AzureEndpoint -Name 'web' -PublicPort 80 -LocalPort 80 -Protocol tcp |
New-AzureVM -ServiceName $newSvc -Location $location
39. idea. plan. deliver.
Batch Updates to Running VMs
Remove RDP and Add New Storage Across all Web Front Ends
Get-AzureVM-ServiceName $svc | Where { $_.Name -match 'wfe' } | foreach {
$_ |
Remove-AzureEndpoint -Name 'rdp' |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -LUN 1 -DiskLabel 'newstorage' |
Update-AzureVM
}
40. idea. plan. deliver.
Capturing a Virtual Machine as a new Image
Capture Sys-Prepped VM into a new Image (Deletes the Source VM)
Save-AzureVMImage -ServiceName $cloudSvcName -Name 'myvm1'
-NewImageName 'Image Name'
43. idea. plan. deliver.
ON-PREMISES
CONSISTENT
PLATFORM
1
MICROSOFT SERVICE PROVIDER
Modern platform for the world’s apps
44. idea. plan. deliver.
idea. plan. del4iv5er.
Consistent experiences
SERVICE MGMT
PORTAL & API
CONSISTENT
1PLATFORM
WEB SITES SERVICE BUS
Reliable Messaging
Standards Based
Cross Cloud
Fully self-service
Web Application PaaS
Highly Scalable
Dev-ops optimized
Integrated SCC
Fully self-service
VIRTUAL
MACHINES
IaaS - Elastic Tiers
Virtual Networks
Window and Linux
Gallery of apps
Fully self-service
Azure Consistent
Federated Identities
Active Directory
Standards Based
Device Friendly
ON-PREMISES
MICROSOFT SERVICE PROVIDER
45. idea. plan. deliver.
idea. plan. deliver.
Finished Services
Web Sites
Service Management Portal
Controller
(Web farm framework)
Web Farm
Front-end/Workers
(Application Request Routing/Dynamic
Windows Process Activation Service )
High density and scalable
Easy deployment and
administration
Fully self-service
Service Management API
Virtual Machines
Service Provider Foundation API
Offer preconfigured
workloads
Windows and Linux
Fully self-service
Service Bus
Gateway
Reliable Messaging
Standards based
Fully self-service
System Center
(Virtual Machine Manager Component)
Message Broker Service
Windows Server Windows Server
Windows Server
Web Sites Virtual Machines Service Bus
46. idea. plan. deliver.
Future
Services
Customer Service Provider
Service
Bus
R2 w/ Service Provider Foundation
idea. plan. deliver.
Service
Plans
Users Provider
VMs SQL
Web
Sites
Portal
Consumer
Self-Service
Portal
Web Sites
Apps
Database
VMs
Self Service Portal Moves
On-Premises
Common Mgt.
Experience
Cloud-Enabled Services
Move On-Premises
Workloads
Consistent Dev.
Experience
Cloud OS Consistent Experiences
Other
Services
CDN.
Media,, etc.
Caching
Windows Azure
Service
Bus
VMs SQL
Web
Sites
Web Sites
Apps
Database
VMs
Worker
Role
Subscriber
Self-Service
Portal
R2
47. idea. plan. deliver.
idea. plan. deliver.
Service Consumers
Consume infrastructure and apps
from service providers as “off the shelf” solutions
Service Providers
Offer and administer services
that are provided to customers
self-service administration
acquire capacity on demand
empowered operations
predictable costs
get up & running quickly
extreme focus on cost
maximize per-customer profit
hardware efficiency
automate everything
differentiate on SLAs
49. idea. plan. deliver.
Web Sites
Build highly scalable web applications
Iterate with integrated source control
Manage your app with real-time
telemetry
Scale up with one click
Support for .Net, Node.js, PHP, Python
50. idea. plan. deliver.
Service Bus
Messaging service for cloud apps
Guaranteed message delivery
Publish-subscribe messaging patterns
Standard protocols (REST, AMQP, WS*)
Interoperability (.NET, Java/JMS, C/C++)
Now integrated with management portal
51. idea. plan. deliver.
Virtual Machines
Windows Azure-consistent IaaS
- User Experience & API
Virtual Machine Roles
- Portable
- Elastic
- Gallery
- Windows and Linux Support
Virtual Networks
- Site to Site connectivity
- Tenant supplied IP addresses
52. idea. plan. deliver.
Additional Services
Identity
- Active Directory
- ADFS Federation
- Co-administrators
Database Services
- SQL Server
- MySQL
Custom services from provider
Programmatic access to cloud services
- Windows Azure Consistent REST APIs
54. idea. plan. deliver.
Administration
Offer Services to Tenants via
Plans
Provide Add-ons to subscriptions
Manage subscriptions
Administer Services
Extend and customize
55. idea. plan. deliver.
Automation
Optimize and extend services using
runbooks
Powershell workflows
Web-based runbook authoring
Manage runbooks and jobs
Integrates with other systems
including System Center
56. idea. plan. deliver.
Usage and Reporting
Continuous usage metering per
tenant subscription
Per-subscription Billing APIs
IaaS Data Warehouse
Server Inventory Reports
60. idea. plan. deliver.
Credits and Information
• Windows Azure Training Kit
• MVA: What’s New in System Center 2012 R2 Jump Start
Special acknowledgement to:
• David Aiken
• Jeffrey Snover
• Jason Helmick
• Symon Perriman
Resources:
http://msdn.microsoft.com/en-us/library/windowsazure/jj156055.aspx
http://msdn.microsoft.com/en-us/library/windowsazure/jj152841.aspx
Slide Objectives:
Describe the various computing patterns that are good for Cloud Computing
Speaking Points:
There are numerous terms and definitions floating around in the industry for “the cloud”, “cloud computing”, “cloud services”, etc.
Microsoft thinks of the cloud as simply an approach to computing that enables applications to be delivered at scale for a variety of workloads and client devices.
The cloud can help deliver IT as a standardized service…freeing you up to focus on your business
Cover the workloads in the slide
Slide Objectives:
Explain the three established terms in the industry for cloud services
Speaking Points:
With this in mind, it’s important to understand how to talk about our Cloud Services offerings.
There is a lot of confusion in the industry when it comes to the cloud.
It’s important that you understand both what is happening in the industry and how we think about the cloud.
This is the most commonly used taxonomy for differentiating between types of cloud services.
The industry has defined three categories of services:
IaaS – a set of infrastructure level capabilities such as an operating system, network connectivity, etc. that are delivered as pay for use services and can be used to host applications.
PaaS – higher level sets of functionality that are delivered as consumable services for developers who are building applications. PaaS is about abstracting developers from the underlying infrastructure to enable applications to quickly be composed.
SaaS – applications that are delivered using a service delivery model where organizations can simply consume and use the application. Typically an organization would pay for the use of the application or the application could be monetized through ad revenue.
It is important to note that these 3 types of services may exist independently of one another or combined with one another.
SaaS offerings needn’t be developed upon PaaS offerings although solutions built on PaaS offerings are often delivered as SaaS.
PaaS offerings also needn’t expose IaaS and there’s more to PaaS than just running platforms on IaaS.
Slide Objectives:
Explain the differences and relationship between IaaS, PaaS, and SaaS in more detail.
Speaking Points:
Here’s another way to look at the cloud services taxonomy and how this taxonomy maps to the components in an IT infrastructure.
Packaged Software
With packaged software a customer would be responsible for managing the entire stack – ranging from the network connectivity to the applications.
IaaS
With Infrastructure as a Service, the lower levels of the stack are managed by a vendor. Some of these components can be provided by traditional hosters – in fact most of them have moved to having a virtualized offering.
Very few actually provide an OS
The customer is still responsible for managing the OS through the Applications.
For the developer, an obvious benefit with IaaS is that it frees the developer from many concerns when provisioning physical or virtual machines.
This was one of the earliest and primary use cases for Amazon Web Services Elastic Cloud Compute (EC2).
Developers were able to readily provision virtual machines (AMIs) on EC2, develop and test solutions and, often, run the results ‘in production’.
The only requirement was a credit card to pay for the services.
PaaS
With Platform as a Service, everything from the network connectivity through the runtime is provided and managed by the platform vendor.
The Windows Azure best fits in this category today.
In fact because we don’t provide access to the underlying virtualization or operating system today, we’re often referred to as not providing IaaS.
PaaS offerings further reduce the developer burden by additionally supporting the platform runtime and related application services.
With PaaS, the developer can, almost immediately, begin creating the business logic for an application.
Potentially, the increases in productivity are considerable and, because the hardware and operational aspects of the cloud platform are also managed by the cloud platform provider, applications can quickly be taken from an idea to reality very quickly.
SaaS
Finally, with SaaS, a vendor provides the application and abstracts you from all of the underlying components.
Slide Objectives:
Provide a high level summary of Windows Azure and what it enables at a high level
Speaking Points:
What is Azure?
Flexible
Windows Azure is now more flexible then ever before
Windows Azure helped pioneer the concept of Platform as a Service
It provides a rich set of managed services enabling you to compose applications.
We’re now making those services richer.
With the June update we have now have enabled infrastructure as a service.
Including the ability to host and deploy durable virtual machines in the cloud running both Windows and Linux
Open
Some of you maybe surprised to hear Linux at a Microsoft conference.
Our support of Linux is just one example of how we’re embracing openness in a fundamental new way.
With the June release we are supporting more operating systems, more languages, and more open protocols
Releasing all of the Azure SDKs on GitHub under an open source license.
Summary
We believe the end result is truly a unique model
You can now use both platform as a service and infrastructure as a service *together*
You can now use the best of the Microsoft ecosystem and the best of the open source ecosystem *together*
Enabling you to build better and more scalable solutions.
Notes:
Comprehensive set of services that enable you to build, host and scale applications in Microsoft datacenters
Windows Azure is an open and flexible cloud platform that enables you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters. You can build applications using any language, tool or framework. And you can integrate your public cloud applications with your existing IT environment.
Slide Objectives:
Discuss the instance sizing and costs
Speaking Points:
Slide Objective:
You need an availability set for a 99.95% SLA
Notes:
Without at least two virtual machines performing the same workload grouped into an availability set you get a 99.95% SLA.
Slide Objectives:
Speaking Points:
Windows Azure runs on datacenters around the world
Enabling you to deploy and run applications and infrastructure close to your customers.
Notes:
Windows Azure services such as compute and storage are now available in 8 worldwide datacenters with an additional 24 Content Delivery Network endpoints.
You can’t have a real cloud without a data center.
Slide Objectives:
Discuss Windows Azure Country Availability
Speaking Points:
Windows Azure is now available in over 89 countries and territories.
Anyone within these countries can sign up for a free trial or a paid subscription to use Windows Azure services
Of course you can build and deliver solutions to any of your customers worldwide
Slide Objectives:
Describe the three main feature components of Windows Azure that will be discussed through the rest of the presentation. You should state to the audience you will not be covering Mobile Services or Media Services, so you might want to spend a little more time now to explain these.
Slide Objectives:
Explain how to setup a subscription
Notes:
The .publishsettings file contains your subscription information, the service endpoint, subscription name and certificate. Once downloaded the Import-AzurePublishSettingsFile cmdlet will install the certificate and configure your PowerShell environment.
Slide Objectives:
Use this method if you want to specify a certificate that you have created on your own.
Slide Objectives:
Explain where subscription settings are persisted
Notes:
The subscription XML file supports multiple subscriptions. You can use a single PowerShell session to administer VMs and services across all of your configured subscriptions.
Slide Objectives:
Explain how to switch contexts when scripting against multiple subscriptions
Notes:
Get-AzureSubscription returns all configured subscriptions and Select-AzureSubscription sets the current subscription
Slide Objectives:
Explain how to set the current storage account that the cmdlets will use.
Notes:
Certain cmdlets like New-AzureVM or New-AzureQuickVM require the user to specify the storage account to use. Since each subscription can contain multiple storage accounts the property name to set is CurrentStorageAccount. This allows you to easily change the storage account for the next operation.
Slide Objectives:
To create a VM you either need to start with an Image or Disk and specify the location where to place the VM.
Slide Objectives:
Show three examples that show a key component of using the cmdlets.
Notes:When you specify -Location or -AffinityGroup the cmdlets will attempt to create a new cloud service to deploy the VM to.
If you do not specify either the cmdlets assume the cloud service exists in the current subscription.
Slide Objectives:
With PowerShell you can configure various settings in a batch
Notes:
New New-AzureVMConfig and New-AzureVM to allow a batched creation of a VM.
New-AzureVMConfig returns a configuration object that is then passed to other cmdlets to modify via the PowerShell pipeline.
Finally, it is passed to New-AzureVM where the VM is created with all of the configuration specified.
Slide Objectives:
It is also possible to create multiple configuration objects for multiple VMs and pass them to the New-AzureVM cmdlet as an array.
Slide Objectives:
Another example of batch VM creation: using an array/loop to create multiple VMs
Slide Objectives:
Explain other common settings used to provision a VM
Slide Objectives:
The Add-AzureProvisioningConfig cmdlet supports two parameter sets for Windows.
Notes:
-Windows allows just setting the password of the VM on boot.
-WindowsDomain allows you to specify all of the settings necessary to have the VM join the domain on boot. This scenario only works in a VNET environment where the DNS specified knows how to have the VM find the domain controller.
-DisableAutomaticUpdates allows for disabling automatic updates by default. Available to both parameter sets.
-NoRDPEndpoint does not create the RDP endpoint on creation. Of course you can add this later through PS or the Portal.
-TimeZone allows you to specify the VMs timezone on provisioning.
-Certificates allows you to automatically install certificates on the VM on provisioning. Note: the certificates must already be installed in the cloud service. For an example: http://michaelwasham.com/2012/08/23/deploying-certificates-with-windows-azure-virtual-machines-and-powershell/
Slide Objectives:
The Add-AzureProvisioningConfig cmdlet supports one parameter set for Linux
Notes:
The Linux parameter set requires specifying the user name and also allows for disabling SSH on the Linux VM or just not adding the SSH endpoint.
Additionally, you can deploy SSH certificates as long as they are already in the cloud service.
Slide Objectives:
Deploying into a Virtual Network requires multiple settings.
Notes:
When configuring the VM you must specify the subnet using the Set-AzureSubnet cmdlet.
You can only specify the VNET and DNS settings for a cloud service on the creation of the first VM. If you add a second VM to the cloud service it will inherit the networking settings.
Slide Objectives:
In this example we’re specifying two AD/DNS servers – one that lives on our on-premises environment and the other is a DC that lives in the cloud.
Notes:
You can pass the DNS names when calling New-AzureVM. Also required is the VNET that establishes the hybrid connectivity.
Slide Objectives:
Show different methods of discovering virtual machines
Slide Objectives:
Explain storage options
Slide Objectives:
Show examples of configuring storage
Notes:
The first example creates a new VM with a 10GB disk attached.
The second example gets an existing VM, adds a 10GB disk to it and updates it live.
Slide Objectives:
Explain disk caching defaults and how to modify it
Notes:
By default OS disks have read / write caching enabled and data disks have no caching.
You can use Set-AzureOSDisk or Set-AzureDataDisk to modify these settings at run time. Set-AzureOSDisk requires a reboot.
Slide Objectives:
Demonstrate how to configure network endpoints on a VM
Slide Objectives:
Numerous examples that show how to filer output from the disk and image repository.
Slide Objectives:
Show how you can iterate through a list of VMs (like all VMs that have a name starting with wfe and perform an update such as adding a new disk and removing an endpoint.
Slide Objectives:
Show how to capture a VM
Slide Objectives:
Operations allowed from PowerShell for updating an modifying VNET Settings.