35

Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Embed Size (px)

Citation preview

Page 1: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT
Page 2: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Continuous Integration &Automation withWindows Azure Web SitesCory FowlerWindows Azure Technical Evangelist3-551

Page 3: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Agenda

Cory Fowler

blog.syntaxc4.net

@SyntaxC4

SyntaxC4-MSFT

• Familiarization of configuration settings and deployment pipeline

• Explore environment acquisition options

• Delve into continuous integration and continuous delivery

• How to deploy to multiple environments

Page 4: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Continuous Integration

Page 5: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

A software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day.

-- Martin Fowler

Page 6: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Windows Azure Web Sites

Page 7: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Fast, Simple, High Density Hosting.

Page 8: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Windows Azure Web Sites

ASP ASP.NET

PHP Node.js

HTTP Handler

Language Support

TFS Online

Git

CodePlex

GitHub

Bit BucketDrop Box

Deployment

SNI or IP Based SSL

X86 | x64

Auto Scaling

Scalability[ Free | Shared | Standard ]

Endpoint Monitorin

g

Custom Domains

MetricFTP

Features

Page 9: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Web Site > Quick Create

Demo

Page 10: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Windows AzureLoad

Balancer

IIS ARR

API Frontend

Deployment Server(s)

Runtime DB

Web Server Pool

Web Site

Web Site

Web Site

Web Site

Web Site

Web Sites Databases

Web Site

Storage

Storage Controlle

r

Windows Azure Web Sites Architecture

Page 11: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

FTP Deployment

Windows AzureLoad

Balancer

IIS ARR

API Frontend

Deployment Server(s)

Runtime DB

Web Server Pool

Web Site

Web Site

Web Site

Web Site

Web Site

Web Sites Databases

Storage Controlle

r

Web Site

Storage

Page 12: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Source Control Deployment

Windows AzureLoad

Balancer

IIS ARR

API Frontend

Deployment Server(s)

Runtime DB

Web Server Pool

Web Site

Web Site

Web Site

Web Site

Web Site

Web Sites Databases

Storage Controlle

r

Web Site

Storage

Page 13: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

nerddinner

Our Scenario

Page 14: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Deploy from TFS Online

Demo

Page 15: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Deployment Pipeline

Receive Deployment Notification

Run Deployment

Script

Deployment Success/Failu

re

Update Source Code

http://github.com/projectkudu/kudu

Page 16: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Multi-Environment Deployment with TFS Online

Demo

Page 17: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Web Sites Environments by Branching

Development Staging Production

Page 18: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Let’s change gears…

Page 19: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Windows Azure Environment Automation

Page 20: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Create a Web Site

New-AzureWebSite –Name contoso-com-dev –Location “West US” -GitHub -GitHubRepository “Contoso/contoso-com”

azure site create nerddinner-com-dev --location “West US” --GitHub --GitHubUsername “NerdDinner” --GitHubRepository “NerdDinner/nerddinner-com”

Page 21: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Automating Resources & App Settings

Windows AzureLoad

Balancer

IIS ARR

API Frontend

Deployment Server(s)

Runtime DB

Web Server Pool

Web Site

Web Site

Web Site

Web Site

Web Site

Web Sites Databases

Storage Controlle

r

Web Site

Storage

Page 22: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

nerddinner

Our Scenario

Page 23: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Pull Request

NerdDinner Production Organization

NerdDinner QA Organization

NerdDinner-com

Production Branch

Staging Branch

Forked from NerdDinner-PROD/NerdDinner-com

NerdDinner-com

NerdDinner Individual Developer

Organization

NerdDinner-com

Production Branch

Staging Branch

Forked from NerdDinner-QA/NerdDinner-com

Production Branch

Staging Branch

Fork

Page 24: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Scripted GitHub Deployment Environments

Demo

Page 25: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Isn’t that only Continuous Deployment?

Page 26: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Deployment Pipeline

Receive Deployment Notification

Run Deployment

Script

Deployment Success/Failu

re

Update Source Code

I’m Customizable

Page 27: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Customized Deployment

Demo

Page 28: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

That all sounds great, but my code lives on-premises

Page 29: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Deploying with TFS & TC

Demo

Page 30: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Review

• How to configure deployment from Source Control systems via the Portal

• How to script an environment to automate resource acquisition

• How to configure Continuous Delivery to multiple environments via TFS Online & GitHub

• How to use WebDeploy from an on-premises build server.

Page 31: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Cory Fowler

blog.syntaxc4.net

@SyntaxC4

SyntaxC4-MSFT

Q&A

Page 32: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Evaluate this session

Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize!

Page 33: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 34: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Web Site File StructureLogFiles

Application DetailedError Git http

Site wwwroot repository deployment .ssh

Kuduservice

Page 35: Cory Fowler blog.syntaxc4.net @SyntaxC4 SyntaxC4-MSFT

Create a Virtual MachineNew-AzureVMConfig –Name “contoso-build”

–InstanceSize Small-ImageName (Get-AzureVMImge)[4].ImageName `

| Add-AzureProvisioningConfig –Windows –Password “myPassword” –AdminUserName PsTestAdmin `

| New-AzureVM –ServiceName “MySvc2” –AffinityGroup “Contoso” -WaitForBoot

azure vm create contoso-buildwindows-server-2012-06-21-2013.vhdcontoso-user--location “West US”--rdp