SharePoint Dragons

Nikander & Margriet on SharePoint

Installing a SharePoint 2013 Dev Environment from A to Z

This blog post discusses the installation of a SharePoint Development Environment from A to Z. Over the years, creating one is becoming more and more complex and although this blog post is quite long, we can’t pretend to be complete. Because of this, there’s an accompanying TechNet Wiki page that will be updated and extended at: http://social.technet.microsoft.com/wiki/contents/articles/15289.sharepoint-2013-best-practices-creating-a-development-environment.aspx

Hardware

First of all, you need to think of the hardware you require. Go for an i7 quad core processor, equivalent or higher. Also make sure you have at least 32 GB memory, since SharePoint 2013 dev machines require at least 24 GB of memory. Having a RAID 0 hard disk is also a good idea.

Software

Our ideal set-up is this: Run Windows Server 2012 on Hyper-V on a Windows 8 machine. At a high level, you need to have access to the following software:
- Visual Studio 2012 Premium edition (or another version)
- SQL Server 2012 including sp1
- Office 2013
- SharePoint Server 2013

Partitioning

It’s a good idea to dedicate a partition to your OS (C:) and create another disk for the rest. You can create partitions easily using the Disk Management tool (search for “Partition” and it’ll show up in the Settings section).

Install Visual Studio 2012 on Windows 8

We like to have Visual Studio 2012 installed on both Windows 8 as on the virtual machine.

Install Office 2013 on Windows 8

The same that goes for Visual Studio 2012, I like to have Office on both the host machine as on the virtual machine.

Install Hyper-V on Windows 8

Hyper-V is not enabled by default. After installing Windows 8, you need to enable it.

  1. Press Win+R.
  2. Type appwiz.cpl.
  3. Click the Turn Windows features on or off link.
  4. Check Hyper-V and click OK.

Wireless connection on Hyper-V

Installing SharePoint 2013 without having an Internet connection on your virtual machine is a difficult task. Nowadays, using a wireless connection is the most common option.

  1. Open Hyper-V Manager.
  2. Click Virtual Switch Manager.
  3. Select External and click Create Virtual Switch.
  4. Give it a name (calling mine WifiVirtualSwitch) and choose your External network. Leave the checkbox Allow management operating system to share this network adapter.
  5. Click OK and Yes.

Once you have done this, you can use this connection during the creation of your new virtual machine to ensure internet connectivity on the server. Which, for SharePoint 2013, I’d say is nothing short of an installation requirement. You can also change the connection for existing machines by doing this:

  1. Make sure the virtual machine is turned off.
  2. Click Settings.
  3. Click Network Adapter.
  4. In the Virtual Switch drop down box, select your virtual switch (mine is named WifiVirtualSwitch).
  5. Click OK.

Tips when creating a new virtual machine on Hyper-V

  • On the Assign Memory screen, don’t check Use Dynamic Memory for this Virtual machine. SharePoint 2013 doesn’t like this, because it relies heavily on the use of AppFabric Distributed Cache. Instead, use 24 GB as Startup Memory.
  • Hard disk size: use 40 GB, this can always be changed later.
  • Connect to the Wifi virtual switch you’ve made earlier.
  • Install Windows Server Standard (Server with GUI) – or another one of the GUI friendly server versions.

Making the Windows Server 2012 more Dev friendly

By default, Windows Server 2012 is not very dev friendly. I suggest some changes. At a high-level, do the following:

  • Rename the server to something short, easy to remember and easy to type. I usually go stellar with this, with names like moon, mars, and nova.
  • Enable Remote Desktop
  • Disable Windows firewall
  • Disable IE Enhanced Security
  • Configure Windows update
  • Configure time zone settings

Rename server

Rename the server to something short, easy to remember and easy to type. We usually go stellar with this, with names like moon, mars, and nova.

  1. Start the virtual machine. The server manager starts automatically.
  2. Select Local Server.
  3. Click computer name.
  4. Click Change.
  5. Change the computer name to moon.
  6. Click OK twice.
  7. Click Restart now.

Enable Remote Desktop

It’s very convenient to be able to access the virtual machine via the Remote Desktop Connection tool, so enabling this is high on our to do list.

  1. In the Server Manager, select Local Server.
  2. Click the computer name moon.
  3. Click the Remote tab.
  4. Select Allow remote connections to this computer.
  5. Click OK twice.

Disable Windows firewall

  1. Win+Q
  2. Type Control
  3. Click Control Panel.
  4. Select System and Security > Windows Firewall > Turn Windows Firewall on or off.
  5. Turn off Windows Firewall for both Private network settings and Public network settings.
  6. Click OK and close Control Panel.

Test Remote Desktop Access

  1. On Windows 8, type Win+R.
  2. Type mstsc and click OK.
  3. Type moon and click Connect.
  4. A message appears informing you that the certificate is not from a trusted certifying authority. Check Don’t ask me again for connections to this computer and click Yes.

Disable IE Enhanced Security

This one is a nuisance. Disable it ASAP.

  1. In Server Manager > Local Server, locate IE Enhanced Security Configuration and click On.
  2. Now set it off for both Administrators and Users.
  3. Click OK.

Configure Windows update

  1. Open Control Panel. This time, we’ll do it via another route: point your mouse to the lower right corner, click Settings > Control Panel.
  2. Click System and Security > Windows Update
  3. Turn on automatic updates.
  4. Wait while its checking for updates. Install the updates it finds, Windows will assure you that that’s very important.

Configure time zone settings

  1. Open Control Panel.
  2. Click Set the time and date.
  3. Click Change time zone…
  4. We go for UTC +1:00, since we’re pretty close to Amsterdam.
  5. Click OK.
  6. If you need to, change the Time as well (via Change date and time).
  7. Click OK when you’re done and close Control Panel.

Configure AD Domain services.

Running SharePoint 2013 in an AD environment that can be played around with is quite high on our ‘Gimme Gimme’ list.

  1. Open Server Manager.
  2. Click AD DS.
  3. Click the More… link behind the text Configuration required for Active Directory Domain Services at MOON.
  4. Click Promote this server to a domain…
  5. Select Add a new forest.
  6. Our company is called Lois & Clark IT services, so we use the following root domain name (which is nice and short): lc.corp.
  7. Click Next.
  8. Accept defaults and type a super secret DSRM password.
  9. Click Next.
  10. Ignore the warning about the fact that DNS delegation can’t be created and click Next again.
  11. Wait until you can verify the NetBIOS name assigned to the domain. In my case, it’s LC and that’s exactly what we want.
  12. Click Next 3 times.
  13. The prerequisites dialog window displays some warnings, but should pass never the same.
  14. Click Install.

After installation was successful, the server restarts.

Changing Password policies

  1. Type Win+R > gpmc.msc. This opens the Group Policy Management MMC add-in.
  2. Expand Forest lc.corp.
  3. Expand Domains.
  4. Expand the lc.corp domain.
  5. Right click the lc.corp domain and choose Create a GPO in this domain, and Link it here.
  6. Give it a name, and click OK.
  7. Right click it and choose Edit.
  8. Go to Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies.
  9. Double-click Password Policy.
  10. Set Enforce password history to 0 passwords remembered.
  11. Set maximum password age to 0.
  12. Set minimum password age to 0 days.
  13. Set minimum password length to 0 characters.
  14. Set Password must meet complexity requirements to Disabled.
  15. Close the Group Policy Management Editor window.
  16. Right click the ¨New Group Policy Object` in the Group Policy Management Window and choose Enforced.
  17. Close the Window.
  18. Start the Windows PowerShell command prompt and type: gpupdate.

This effectively applies the new policy.

Change administrator password

If you like, now you can change the administrator password to something more simple.

  1. Open Active Directory Users and Computers.
  2. Select lc.corp > Users.
  3. Right-click Administrator and choose Reset password.
  4. Uncheck User must change password at next logon.
  5. Click OK.

While you’re there, you may as well create a couple of test user accounts test1 to test3 with passwords that are easy, never expire, and can’t be changed by the users.

Convert it to workstation

It’s a good idea to make life easier for yourself and convert the server in look-and-feel to a workstation, as described at http://www.win2012workstation.com/ The web site contains a link to the Microsoft Server Converter 2012 tool that should do the heavy lifting for you, but it’s supposed to be 51 MB in size. This is ridiculously large, it should be less than 1 MB imho, so we don’t really trust it. The tips on the web site however are solid. We’ve done the following ourselves:

  • Disable CTRL+ALT+DEL
  • Disable Shutdown Event Tracker

Disable CTRL+ALT+DEL

  1. Go to Start > Administrative Tools.
  2. Double-click Local Security Policy.
  3. Click Security Options > Local Policies > Security Options.
  4. Search Interactive Logon: Do not require CTRL+ALT+DEL and choose Enabled.
  5. Click OK.

Disable Shutdown Event Tracker

  1. Press Win+R.
  2. Type gpedit.msc and enter. This starts the Local Group Policy Editor.
  3. Expand Computer Configuration > Administrative Templates > System.
  4. Search for Display Shutdown Event Tracker, open it, set it to Disabled and click OK.

Folder Settings

  1. Open Windows Explorer.
  2. Choose View > Options.
  3. Also, on the General tab > Navigation pane section, click Show All folders.
  4. Also, in the Navigation pane section, click Automatically expand to current folder.
  5. Click the View tab.
  6. Check Display the full path in the title bar.
  7. Select Show hidden files, folders, and drives.
  8. Uncheck Hide emtpy drives in the Computer folder.
  9. Uncheck Hide extenions for known file types.
  10. Uncheck Hide protected operating system files.
  11. Click the Apply to Folders button.
  12. Click OK.

Other Software

Install other software such as Flash Player, Acrobat Viwer, other browsers or whatever you like. One plug: TextPad (http://www.textpad.com) is so cool! 7Zip

Clean machine

This is a nice place to be and a good time to back it up. Do a couple of things:

  1. Open Hyper-V Manager, right-click the virtual machine > Snapshot.
  2. Right-click the virtual machine > Shut Down.
  3. Right-click the virtual machine > Export to export a clean, ready-to-rumble, Windows Server 2012 machine.

Install SQL Server 2012 with sp1

At the time of writing, this is the latest version of SQL Server.

  1. Choose New SQL Server stand-alone installation and follow instructions.
  2. Select All Features with Defaults.
  3. Note: At this point, you can’t install the SSRS add-in for SharePoint yet. You’ll need to do that after SharePoint is installed.
  4. Since its the first installation, it’s fine to choose Default instance.
  5. Provide a valid account name for SQL Server Analysis Services. We’ve made sure that at this point, the admin account and password never needs to be changed anymore, so we’re using this account. For a dev machine, acceptable, we think.
  6. When you’re asked to choose an authentication mode, choose Mixed Mode. This account, at this point, needs to have a complex password.
  7. In the Analysis Services Configuration dialog window, Add Current User.
  8. In the Reporting Services Configuration dialog window, choose Install Only for both options.
  9. Add Current User in the Distributed Replay Controller dialog window and make your server name [moon, in our case] the controller.

Install Visual Studio 2012 on the virtual machine

Well, what to say? You’re a developer, aren’t you? What you’re waiting for!

Install Microsoft Office 2013 Tools

  1. Download the Microsoft Office Tools for Visual Studio 2012 at http://msdn.microsoft.com/en-us/office/apps/fp123627.aspx
  2. Click the Download the Tools link.
  3. Wait while Web Platform Installer 4.5 does murky things which take a lot of time.
  4. Install Microsoft Office Developer Tools for Visual Studio 2012.

Install SharePoint 2013

First run the prerequisiteinstaller. Nowadays, during SharePoint 2013 installation, you really want your server to have an internet connection. For a dev environment, a permanent was is just as handy!
Use the wizard to install features for now. It doesn’t hurt to create a default site collection now.

Please note It’s possible that Prerequisites keeps trying to start and failing to do so, displaying the following message:

Fails: start “Launch SharePoint preparation tool” “E:\prerequisiteinstaller.exe”   /continue

Prevent startup by going to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Delete SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd

Language Packs

Get all language packs here:  http://www.microsoft.com/en-us/download/details.aspx?id=35492 . Remember that you must download each one of the ones you need as each language pack is for a single language.

Configure workflows

  1. Download Windows Azure Workflow at http://www.microsoft.com/en-us/download/details.aspx?id=35375
  2. Get the workflow manager, workflow manager BPA, workflow client, and workflow tools (which equates to all available downloads!)
  3. Try to install the Workflow Manager. It will possibly ask to install the Web Platform Installer tool (if you didn’t do this before), allow this by running it.
  4. This will also install the Workflow Client.
  5. Once the Workflow Manager Configuration Wizard starts, click Configure Workflow Manager with Custom Settings.
  6. Check the SQL Server Instance that will be used to create the various workflow databases. In my case, this database is called moon.lc.corp.
  7. By default, the Farm Management database will be called: WFManagementDB.
  8. By default, the Instance Management database will be called: WFInstanceManagementDB.
  9. Scroll down to see the other required settings.
  10. By default, the Resource Management database will be called: WFResourceManagementDB.
  11. Choose the Service Account that runs the workflow services. In my case, this is administrator@lc.
  12. On a dev environment, accept the Auto-generate option to create SSL and outbound signing certificates.
  13. Enter a certificate generation key.
  14. Confirm this by entering it again.
  15. Accept the default Workflow Manager Management Port at 12290.
  16. Accept the default HTTP port at which Workflow Manager listens for management requests at 12291. Note that this feature should be enabled in production environments, so it’s perfectly alright in a dev environment.
  17. Check Allow Workflow Management over HTTP on this computer.
  18. Uncheck Enable firewall rules on this computer.
  19. Accept the default Admin group of BUILTIN\Administrators. This group is granted access to all databases configured as part of the Workflow Manager farm.
  20. Click Next.

Now, the Service Bus configuration page opens.

  1. By default, the Farm Management Database is called SbManagementDB.
  2. By default, the Gateway Database is called SbGatewayDatabase.
  3. By default, the Message Container Database is called SBMessageContainer01.
  4. In the section Configure Service Account check the Use the same service account credentials as provided for Workflow Manager.
  5. In the section Configure Certificate, check the Use the same certification generation key as provided for Workflow Manager.
  6. Accept default ports. 9355 for HTTPS Port, SSL accessible port for a Service Bus deployment.
  7. 9354 for TCP port, Network-accessible port for a Service Bus deployment.
  8. 9356 for Message Broker Port, used for message broker port communication.
  9. 9000 for Internal Communication Port Range.
  10. Uncheck Enable Firewall Rules on this computer.
  11. In the Configure Admin Group section, again use BUILTIN\Administrators.
  12. Click Next.
  13. Click Apply.
  14. Click Close.

Please note that the Workflow Manager Client needs to be present on every SharePoint node in the farm.

Configure SharePoint for Azure workflow

After installing Windows Azure Workflow, you need to use PowerShell to configure the communication between SharePoint 2013 and Windows Azure Workflow. Do the following:

  1. Press Windows+Q.
  2. Type SharePoint.
  3. Click SharePoint 2013 Management Shell.
  4. Execute the following command:

    Register-SPWorkflowService -SPSite “http://moon” -workflowHostUri “http://moon:12291″ -AllowOAuthHttp

Where:
-SPSite refers to one of your site collections.

Install SSRS

install the SSRS add-in for SharePoint yet with sql server software.

  1. Again, run the SQL Server 2012 set up.
  2. Click Installation > “… add features …” and go through the wizard.
  3. When you’re asked, choose to Add features to an existing instance of SQL Server 2012.
  4. Now, check the Reporting Services Add-in for SharePoint Products and complete its installation.

Install Office Web Apps 2013

OWA needs to be installed on a server separate from the SharePoint farm.

Enable auto login on Windows 8 host machine

  1. Press Win+R and enter netplwiz. This opens the User Accounts dialog window.
  2. Uncheck the Users must enter a username and password to use this computer.
  3. Click OK.
  4. Enter your password twice and click OK again.

Extend virtual hard disk

http://www.petri.co.il/expanding-virtual-hard-disks-with-hyper-v.htm

Install SharePoint Designer 2013

  1. During installation, click Customize.
  2. Click Microsoft Office > Run All from My Computer.
  3. Click Install Now.
  4. Click Close.
  5. Start SharePoint Designer 2013 and choose Use recommended settings.

Quick check: Create a new workflow and verify that it has at least two options; SharePoint 2010 Workflow and SharePoint 2013 Workflow.

Configuring Apps

  1. Open SCA.
  2. Go to Application Management > Manage services on server.
  3. Start Microsoft SharePoint Foundation Subscription Settings Service.
  4. Press Windows + Q.
  5. Type DNS and click it. This opens the DNS Manager.
  6. Select [server, in my case: moon] > Forward Lookup Zones > [domain name, in my case lc.corp]
  7. Right-click domain name (lc.corp) > New Alias (CNAME).
  8. In the Alias name textbox, enter *.app.
  9. As a result, *.app.lc.corp will be the FQDN for any SharePoint App that gets installed on the environment.
  10. Click Browse.
  11. Double-click [server name (moon)] > Forward Lookup Zones > [domain name (lc.corp)] > (same as parent folder).
  12. Click OK twice.
  13. Start a command prompt and type: ping test.app.lc.corp. If you followed the steps correctly, this returns a reply.
  14. Go to http://msdn.microsoft.com/en-us/library/fp179923.aspx Copy the script from section “Create an isolated app domain on your development computer”, step 6. This script looks like this:

$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

From a SharePoint 2013 Management Shell prompt, execute the following code:

$account = Get-SPManagedAccount “lc\administrator”
$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

  1. Verify the new service applications.
  2. Open SCA.
  3. Click Application Management > Manage Service Applications.
  4. Verify that AppServiceApp is present and started.
  5. Verify that SettingsServiceApp is present and started.
  6. Click Application Management > Manage services on server.
  7. Check that the App Management Service is running.
  8. Open SCA.
  9. Click Apps.
  10. Click Manage App Catalog.
  11. Click Create a new app catalog site.
  12. Click OK.
  13. Enter Title: DevAppCatalog.
  14. Enter Web Site Address: (sites/) DevAppCatalog.
  15. Enter a Primary Site Collection Administrator, in our case this is lc\administrator.
  16. Enter the following end users: Everyone.
  17. Click OK.
  18. Open SCA.
  19. Click Apps.
  20. Click Configure Store Settings.
  21. Set Apps for Office from the Store to Yes.
  22. Click OK.
  23. Click App Management > Configure App URLs
  24. In the App Domain text box, type: app.[domain name] (e.g. app.lc.corp).
  25. In the App prefix text box, type any prefix that is used  to prefix the subdomain of App urls, e.g.: lcapp.
  26. Click OK.

Now, check if you can add online Apps to your SharePoint environment. But don’t do this using the SharePoint System Account, otherwise you’ll see a message stating: “Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again etc. etc.”

This is a nice example of misplaced SharePoint 2013 friendliness. Don’t expect this small problem to go away by itself!

PowerShell Development

PowerShell has become an important part of SharePoint development and administration. So, let’s make it a little bit easier.

  1. Get PowerGUI, it’s the best free tool we know for doing PS.
  2. Using Start-Transcript  in your scripts is a good idea, but to use the PowerShell dev friendly PowerGUI tool AND use Start-Transcript, download and install the Transcription add-on at http://powergui.org/entry.jspa?externalID=2910
  3. If you need to Disable .NET 4.0 (a SharePoint 2010 issue, but we wanted to mention that it’s possible): http://blog.isaacblum.com/2012/02/29/powergui-scripteditor-error-microsoft-sharepoint-is-not-supported-with-version-4-0-30319-261-of-the-microsoft-net-runtime/
About these ads

4 responses to “Installing a SharePoint 2013 Dev Environment from A to Z

  1. RussD May 6, 2013 at 4:39 pm

    Reblogged this on BrainStorage and commented:
    A very comprehensive outline

  2. m00ntear May 6, 2013 at 5:14 pm

    You now have a lot more information in this blog post compared to the Technet Wiki Version. Do you plan to synch them? I made an edit to the Technet version now, but I’m not sure how you want to synchronize the two.

    • Nikander & Margriet Bruggeman May 7, 2013 at 5:41 pm

      Well, it’s a little bit different. I wrote the tips in a Word document, which is the original source. Then, I started building and extending the Wiki page, and later wrote the blog post. I’ll keep improving the TechNet Wiki page, based on both the original Word doc I’ve created, and new insights, and if others (such as you) participate, that’s just great! I won’t keep updating this blog post, the TechNet Wiki page will be the latest and greatest resource.

  3. Nikander & Margriet Bruggeman May 7, 2013 at 5:44 pm

    Btw, do follow the links in the TechNet Wiki page, a lot is there, hidden under links to subpages.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 642 other followers

%d bloggers like this: