Post on 21-Jun-2015
description
transcript
HEADING TO THE CLOUDIntroduction 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…
XENOX GARAVITO
SharePoint Developer
Planet TechnologiesMCPD, MCITP, MCT
AGENDA
• SharePoint Development Overview
•What are SharePoint Apps?
•What do I need to get started?
• Scenarios
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!
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
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
WHAT DO I NEED TO GET STARTED
•Development Environment•On Premises• Multi-VM
• Takes a lot of RAM (24GB?)
•Office 365• Visual Studio
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
AZURE PORTAL
• Announced at Worldwide Partner Conference
• 9 VM High Availability Farm (or 3 VMs)
• https://portal.azure.com
• Quickly provision a farm
AZURE PORTAL
• Entire Farm is built
• High Availability is available
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
CONFIGURE SHAREPOINT FARM
• Login to Domain Controller
• Install AD DS Tools and DNS Server Tools
CONFIGURE SHAREPOINT FARM
• Add a new Subnet to Azure Network• Used for a development Visual Studio server
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
CONFIGURE SHAREPOINT FARM
• Add App Domain in DNS
CONFIGURE SHAREPOINT FARM
• Point App Zone (appdomain.com) to the Visual Studio Server
• Point *.appdomain.com to the SharePoint Server WFE
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)
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()
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
VISUAL STUDIO
•Create SP Hosted App
•Create Provider Hosted App (On Prem)
•Create Provider Hosted App (On O365)
REGISTERING YOUR APP IN THE CLOUD
• Note the App ID and Secret
• {SiteUrl}/_layouts/appregnew.aspx
• {SiteUrl}/_layouts/appinv.aspx
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
OFFICE 365 -> PATTERNS & PRACTICES
• https://github.com/OfficeDev/PnP
• http://azure.microsoft.com/blog/2014/10/22/webjobs-goes-into-full-production/
• http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/04/07/sharepoint-timer-jobs-running-as-windows-azure-web-jobs.aspx
WEBJOBS IN AZURE
• Create Azure Website
• Add AZUREWEBJOBSTORAGE connection string to storage account for logging (Required!)
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;
WEBJOBS IN AZURE• Publish Console App as Azure WebJob using Visual
Studio
• OR ZIP it up (with DLL references) and deploy in Azure
Thanks to our Sponsors!!!
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!