View
217
Download
1
Category
Tags:
Preview:
Citation preview
Deploying to Azure Websites with Git and Visual StudioGrant HollidaySenior Service EngineerMicrosoft
DPP304
granth@microsoft.com
http://blogs.msdn.com/b/granth/
Grant Holliday
http://aka.ms/ProTFS2013
Agenda• Visual Studio, TFS & Git• Azure Websites• Continuous Deployment• Visual Studio Online “Monaco”
A comprehensive ALM offeringVisual Studio
Online
Planning SCM Work Item TrackingContinuous Deployment Build Automation
Feedback Management
Centralized Version Control
(TFVC)
Strengths Best for
Modern source-control approaches
Server Workspaces
Local Workspaces
DistributedVersion Control (Git)
• Scales to very large codebases
• Fine level permission control
• Allows usage monitoring
• Large integrated codebases
• Control and auditability over source code down to the file level
• Offline editing support
• Easy to edit files outside Visual Studio or Eclipse
• Medium-sized integrated codebases
• A balance of fine-grained control with reduced friction
• Full offline experience
• Complete repository with portable history
• Simplified branching model
• Modular codebases
• Integrating with open source
• Highly distributed teams
Git fully integratedinto Visual Studioand TFS/VSO
Common questions• Why would Microsoft add Git to VS/TFS/VSO?• Is TFS Version Control dead?• But isn’t Microsoft against open source?• Does this only work with Git on TFS/VSO?• What’s so special about it?
Fully integrated
Git support
Team Foundation Server/VSO
Project 2
Issues
Project
MgmtBuild
Git SCC Provider
Project 1
Issues
Project
MgmtBuild
Git
3rd Party
XCode
Eclipse
Shell
…
3rd Party
Eclipse
Shell
… TFVC
……
TFS SCC Provider
Team Explorer
TFVC Object Model
Local Repo
LibGit2 / LibGit2Sharp
Other Remote
Git Repo
Git-TF
TFSVC vs. Git conceptsTFSVC GitCreate workspace and get latest Clone (duplicate) a remote repo to a local file path
Switch workspace or branch Checkout a branch to make it the current, working branch
Undo a change to a file Checkout the file to overwrite your changes with the latest in the current, working branch
Shelve Commit changes to a local topic branch, make sure the branch is published and push to it, and Checkout to switch to a different local branch
Pending changes Status
Check-in Push to send to a remote repo what has already been committed locally
Get latest version Pull commits from a remote repo into the currently checked-out branch of the local repo, merging as necessary. Fetch does the same thing without merging.
Check-in and get latest version Sync (Effectively a Push and Pull - available only in the Visual Studio UI)
Version control using Git with Visual Studio and TFS
Azure Websites
Azure Websites• .NET, Java, PHP, Node.js, Python• Built-in AutoScale and Load Balancing• Metrics• High Availability with Auto-Patching• Hybrid Connections to on-premises resources
Azure Websites
Hybrid Connections
AzureWebsites
Corporate network
Microsoft SQL Server
Hybrid ConnectionOther published resourcesHybrid Connection
Manager
Continuous Deployment
Git Repo AzureWeb Site
Commit
Commit
Commit
Hook fires
git pull
deploy
Continuous Deployment
Pushing your changes to your Azure Web Site
Visual Studio Online “Monaco”
Lightweight, friction freeCompanion to VS IDE, accessible from modern browsers on any device, on any platform
Optimized for AzureBuild, maintain, and run Websites directly in Azure
Rich editing experiencesFast, fluid code editing, navigation, and understanding in the browser, without the feel of a browser
Support for today’s frameworks and languages
HTML5 and JavaScript (including TypeScript), Node , PHP, ASP.NET sites, and apps
Monaco
• Monaco service available as site extension on every Azure site
• Access gated by site configuration option and deployment credentials
• Tools access via the “.scm” endpoint, live edit wwwroot
• Runs as peer to Azure deployment services (“Kudu”)
ArchitectureYourSite
MonacoServices
IISNode,PHP, etc.
Site Extension
r/waccess
runs
https://yoursite.scm.azurewebsites.net/dev
http://yoursite.azurewebsites.net
Azure SCC Deploy
Site Extension
writes
https://yoursite.scm.azurewebsites.net/yoursite.git
wwwroot
Editing Web Siteswith “Monaco”
Summary• Visual Studio is a Git client• TFS & VSO can host Git repositories• Git + Azure Web Sites = Continuous Deployment• “Monaco” is great for live editing
Related content
DPP409: Easy Continuous Deployment + TFS-GitDPP202: What’s New in Visual Studio + ALMDPP311: Release Management, DSC and AzureDPP210: Hack Your API FirstDPP312: Application Insights
Recommended