Transcript
Page 1: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

HEADING TO THE CLOUDIntroduction to deploying a Provider-Hosted App in Azure

Page 2: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

HOUSEKEEPING…

• Download EventBoard Mobile and remember to fill out session evaluations…

• Phasers set to stun, mobile devices set to silent…

• You must be present to win at the wrap-up…

Page 3: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

XENOX GARAVITO

SharePoint Developer

Planet TechnologiesMCPD, MCITP, MCT

Page 4: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

AGENDA

• SharePoint Development Overview

•What are SharePoint Apps?

•What do I need to get started?

• Scenarios

Page 5: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

SHAREPOINT DEVELOPMENT

SharePoint 2003/2007

• Web Parts

• WSP (2007)

• Server Side Code (GAC or BIN)

• Client side code (Page customizations)

• Web Services (Lists.asmx)

SharePoint 2010• More of the same

• Farm Solutions

• Better integration with Visual Studio

• List data Rest service (listdata.svc)

• Sandbox Solutions

• Isolated Process

SharePoint 2013• Farm Solutions

• Sandbox Solutions with code are deprecated

• Apps!

Page 6: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WHAT ARE APPS?

Apps for SharePoint are easy-to-use, lightweight web applications that integrate popular web standards and technologies to

extend the capabilities of a SharePoint website

Page 7: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WHAT ARE APPS?

SharePoint Hosted

• Client side• JavaScript

• CSS

• HTML

• Isolated to App Web

Provider Hosted

• Hosted outside of SharePoint

• On - premises

• In Azure

• Any language

Page 8: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WHAT DO I NEED TO GET STARTED

•Development Environment•On Premises• Multi-VM

• Takes a lot of RAM (24GB?)

•Office 365• Visual Studio

Page 9: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WHAT DO I NEED TO GET STARTED

• Easy/Quick to setup (5 min)

• Single Server

• No Active Directory built-in

• Better if added piecemeal as part of a farm

Standalone SharePoint 2013

Page 10: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

AZURE PORTAL

• Announced at Worldwide Partner Conference

• 9 VM High Availability Farm (or 3 VMs)

• https://portal.azure.com

• Quickly provision a farm

Page 11: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

AZURE PORTAL

• Entire Farm is built

• High Availability is available

Page 12: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

SHAREPOINT FARM

• Provisions multiple servers

• AD, SQL, SharePoint Front Ends

• Network

• Usually takes over an hour

• Some configuration needed to support app development

http://msdn.microsoft.com/en-us/library/office/fp179923(v=office.15).aspx

Page 13: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FARM

• Login to Domain Controller

• Install AD DS Tools and DNS Server Tools

Page 14: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FARM

• Add a new Subnet to Azure Network• Used for a development Visual Studio server

Page 15: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FARM

• Create a new VM within the Farm Network

•Use Visual Studio 2013 Template

• Add to the SharePoint Farm Domain

• Install most recent Visual Studio Update

• http://www.visualstudio.com/news/vs2013-update4-rc-vs

Page 16: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FARM

• Add App Domain in DNS

Page 17: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FARM

• Point App Zone (appdomain.com) to the Visual Studio Server

• Point *.appdomain.com to the SharePoint Server WFE

Page 18: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FOR HIGH-TRUST (SERVER TO SERVER) APPS

• http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx

• Need an x.509 Certificate

• Can be self-signed for development (use IIS or MakeCert.exe)

$publicCertPath = "C:\Certs\HighTrustSampleCert.cer"$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($publicCertPath)

Page 19: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

CONFIGURE SHAREPOINT FOR HIGH-TRUST (SERVER TO SERVER) APPS

New-SPTrustedRootAuthority -Name "HighTrustSampleCert" -Certificate $certificate $realm = Get-SPAuthenticationRealm

$specificIssuerId = "11111111-1111-1111-1111-111111111111“$fullIssuerIdentifier = $specificIssuerId + '@' + $realm

New-SPTrustedSecurityTokenIssuer -Name "High Trust Sample Cert" -Certificate $certificate -RegisteredIssuerName $fullIssuerIdentifier –IsTrustBrokeriisreset

$serviceConfig = Get-SPSecurityTokenServiceConfig$serviceConfig.AllowOAuthOverHttp = $true$serviceConfig.Update()

Page 20: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

VISUAL STUDIO PROJECT

•New Project

• Choose APP-Authentication settings.• ACS (for SharePoint Online / O365)

• Client Certificate (for On Premises)

• Client ID auto set with F5 deployment

Page 21: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

VISUAL STUDIO

•Create SP Hosted App

•Create Provider Hosted App (On Prem)

•Create Provider Hosted App (On O365)

Page 22: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

REGISTERING YOUR APP IN THE CLOUD

• Note the App ID and Secret

• {SiteUrl}/_layouts/appregnew.aspx

• {SiteUrl}/_layouts/appinv.aspx

Page 23: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

AMS (APP MODEL SAMPLES)

• http://officeams.codeplex.com

• Examples, Guidance, reference code

• Reusable Components• People Picker

• Taxonomy Menu

• Taxonomy Picker

• Final July 2014 release -> Now in GitHUB

Page 25: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WEBJOBS IN AZURE

• Create Azure Website

• Add AZUREWEBJOBSTORAGE connection string to storage account for logging (Required!)

Page 26: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WEBJOBS IN AZURE

• Get Client ID and Secret from a deployed SharePoint App and place in Web.Config

• Use as credentials for Console Application

string accessToken = TokenHelper.GetAppOnlyAccessToken( TokenHelper.SharePointPrincipal, siteUri.Authority, realm).AccessToken;

Page 27: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

WEBJOBS IN AZURE• Publish Console App as Azure WebJob using Visual

Studio

• OR ZIP it up (with DLL references) and deploy in Azure

Page 28: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

Thanks to our Sponsors!!!

Page 29: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure

Join us at #SharePint sponsored by K2 at World of Beer of Reston in the Towncenter just across the bridge

Why? To network with fellow SharePoint professionalsWhat? SharePint!!!When? 6:00 PMWhere? World of Beer Reston1888 Explorer StreetReston, VA 20190

Thanks to?K2!


Top Related