Wednesday, December 5, 2012

Setup SP2013 environment for on-premises apps (SharePoint-Hosted)

 

 Setup Isolated Domain

If you want to create and deploy SharePoint-hosted apps on your SharePoint 2013 installation, you must create an isolated domain on the developer workstation where your apps for SharePoint will run. Your SharePoint 2013 installation needs a general wildcard host header domain where it can provision SharePoint-hosted apps.
This domain should be a URL namespace that you reserve as a namespace for organizing apps. For example, if you work at a company named SharePoint, and you expose an extranet web application at the customapp.SharePoint.com domain, you can use a similar naming scheme for the app for SharePoint domain: apps.sharePoint.com. If you reserve this domain as your isolated app domain, when a SharePoint-hosted app is provisioned, it has a URL that looks like this: http[s]://tenantName-abcd1234.apps.SharePoint.com. The string, abcd1234 is a unique identifier that is arbitrarily assigned to each app instance. This example uses an Internet-style domain name for the app domain, but that doesn't mean that you have to expose your apps for SharePoint to the Internet. For production hosting scenarios, you would still have to create a DNS routing strategy within your intranet and optionally configure your firewall. See Install and Manage Apps for SharePoint for more information about how to create and configure a production environment for apps for SharePoint.
For development purposes, you can modify your hosts file as you need to route your development computer to a test instance of an app for SharePoint. Visual Studio 2012 modifies your hosts file automatically when you build and deploy the app. You shouldn't have to do more network configuration beyond host file modification after you create your isolated app domain.
Perform the steps in the following procedure to create an isolated app domain.

You must perform all of the steps in the following procedure while logged in as the farm administrator, and you must run the command prompt and the SharePoint Management Shell as an administrator.

Create an isolated app domain on your development computer

1.     Ensure that the spadmin and sptimer services are running by opening a command prompt and typing the following commands.
net start sptimerv4
2.     Create your isolated app domain by running the SharePoint Management Shell as an administrator and typing the following command.
Set-SPAppDomain "your app domain"
3.     Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance
4.     Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell. The output will indicate whether each service is online.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}
5.     You must specify an account under which the SPSubscriptionService and AppManagementServiceInstance service instances will run. This account must be an SPManagedAccount. You can create an SPManagedAccount by typing the following command in the SharePoint Management Shell. (You’ll be prompted for the account domain\user and password.)
$account = New-SPManagedAccount
6.     Specify an account, application pool, and database settings for the SPSubscriptionService and AppManagementServiceInstance services by typing the following code in the SharePoint Management Shell. If you created a SPManagedAccount in the preceding step, use that account name here.
$account = Get-SPManagedAccount "domain\user"
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc

7.     Specify your tenant name by typing the following code in the SharePoint Management Shell.

Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
After you create your isolated app domain, perform the steps in the following procedure to add that domain to your bypass list in Internet Explorer. This ensures that you can navigate to this domain after you deploy a SharePoint-hosted app. You can skip this procedure if your environment does not use a proxy server.
       
        Add your isolated app domain to your bypass list in Internet Explorer
1.     In Internet Explorer, go to Tools.
2.     Choose Internet options.
3.     On the Connections tab, choose the LAN Settings button.
4.     Clear the Automatically detect settings check box.
5.     Select the Use a proxy server for your LAN check box.
6.     Choose the Advanced button, and then add *.YourAppDomain.com to the Exceptions list.
7.     Choose the OK button.
8.     Choose the OK button to close the Local Area Network (LAN) Settings dialog box.
9.     Choose the OK button to close the Internet Options dialog box.

Download the full article @

2 comments:

  1. Interesting !!! eager to setup my laptop to run SP2013 ...

    Can you share your laptop stats having SP2013 setup ?

    ReplyDelete
  2. Intel i5 second generation
    8 GB Ram
    500 GB Hard drive

    ReplyDelete