Showing posts with label SharePoint Development. Show all posts
Showing posts with label SharePoint Development. Show all posts

Wednesday, May 21, 2014

SharePoint 2013 Virtual Development Environment Installation Guide - Part 1

SharePoint 2010 dev server deployment guide can be found here

Scenario
Prerequisites
    • Your workstation must be running a 64bit processor with Hardware Virtualization enabled
    • You must have enough memory (6 GB), disk space (60 GB), and processor power (2 cores) to run the VM and hold all snapshots.  Disk space will need to grow as you add content.
      • I highly recommend running this VM from a solid state drive (SSD) for optimum performance.  Disk speed is the greatest limiter for performance and if your RAM is limited, then the SSD swap file will help compensate.
    • You must have access to and appropriate licensing for above products
      • ex: MSDN Subscription
    • You must have time (about 8 hours) to install everything.
      • Hints:
        • Look for "Wait" for good break points
        • Snapshots can be used to create other virtual machines or to test minimally installed environments
        • Hyper-V, VirtualBox and VMWare specific settings will be called out
How To
  • Download the Software Listed Above - Wait
  • Enable Windows 8 Hyper-V, install VMWare, or install VirtualBox and the Extension Pack
  • Hyper-V: Enable a Shared/NAT virtual switch
    • ICS can only be set up from one network card at a time in Windows 8 so if you have a laptop and switch between WiFi and Ethernet you will need to change the ICS if you need the VM to access the internet
  • Create a new virtual machine named "sp2013"
    • Hyper-V: Generation 2 option
    • 6144 GB RAM (not dynamic)
    • Network: Use a Shared/NAT connection
    • 125GB dynamically expanding boot hard disk
      • You will likely use 45GB of this without any content
    • Increase the processors: 2-8 range
    • Mount the Windows Server 2012 R2 ISO
    • VirtualBox: Enable RDP support
  • Start the sp2013 virtual machine and boot from DVD
    • Hyper-V: Hold down a key to boot to DVD
      • Don't wait till the prompt to "Press a Key" or you will get this error: "Boot Failed. EFI SCSI Device."
  • The Windows Server 2012 R2 installer should begin
    • Select Windows Server 2012 Standard (Server with a GUI)
    • Select Custom (new install)
    • Short Wait
  • Set a new administrator password
    • pass@word1
  • Install VM guest tools (none for Hyper-V)
    • VirtualBox: VirtualBox Guest Additions
      • Auto Reboot
    • VMWare: VMWare Tools
  • Configure Server Manager: Local Server properties
    • Rename the server to sp2013 (Both the name and the computer description)
      • Note: If you forget this step, you will have a randomly named server.
        I have included instructions for aliasing and configuring a randomly named server
      • Restart later (so we can shut down instead)
    • Enable Remote Desktop
    • Disable IE Enhanced Security Configuration
  • Shut down and take a Snapshot named "Windows Install" then boot the machine
  • Server Manager Dashboard: Add Roles
    • Server Roles
      • Active Directory Domain Services
        • Add features and Include management tools
      • Application Server
      • DNS Server
        • Add features and Include management tools
        • Ignore Static IP warning
      • Web Server (IIS)
        • Add features and Include management tools
    • Features
      • ASP.NET 4.5 (under .NET Framework 4.5)
      • Telnet Client
        • SMTP connectivity troubleshooting tool
      • User Interfaces and Infrastructure
        • Desktop Experience
          • Also adds Ink and Handwriting Services
    • Application Server / Role Services
      • Web Server (IIS) Support
        • Add features and Include management tools
    • Allow auto-restarts then Install
    • Short Wait
    • Click "Promote this server to a domain controller"
      • Select "Add a new forest"
      • Root domain name: sp.local
      • Next
      • Forest and Domain functional level: Windows Server 2012 R2
      • Password: pass@word1
      • Continue pressing Next until Install
        • Short Wait for NetBIOS domain name to be recognized and for Prerequisite check
        • Ignore the 3 warnings
      • Install
      • Short Wait
      • Accept reboot prompt
      • Log back in as Administrator
  • Server Manager Dashboard: Add Roles
    • Features
      • ASP.NET 3.5 Features
      • Before installing specify the following alternate path
        • D:\sources\sxs  (where D: is the Windows Server DVD drive)
  • Verify Internet connectivity by opening Internet Explorer and browse to Bing
  • Disable SmartScreen Notifications from the Action Center
  • Windows Update: Turn on auto updates
    • Install Updates and Wait
    • Reboot when prompted
    • Some errors in windows update may occur as they are installed and the server is rebooted. Here are some solutions:
      • Several updates fail and require reboots
        • Open System Configuration (msconfig)
        • Check Selective startup
          • Uncheck Load Startup items
        • OK
        • Restart when prompted
      • Hyper-V: Security Update for Windows Server 2012 R2 (KB2920189) Failed 800F0922
        • Only occurs on Gen 2 Hyper-V with Secure Boot
        • Temporarily disable Secure Boot in the VM settings while installing the update
  • Open Active Directory Administrative Center (Pin to desktop and Start menu)
    • Administrator account
      • Account / Password Options: Password never expires
      • Organization / Email: administrator@sp.local
    • Create a user in the Users OU
      • Full Name: User
      • User SamAccount: sp\user
      • pass: same as Administrator password
      • Account / Password Options: Password never expires
      • Organization / Email: user@sp.local
    • Add User to the Users group
    • Create a user in the Managed Service Accounts OU
      • Full Name: spservice
      • User SamAccount: sp\spservice
      • pass: same as Administrator password
      • Account / Password Options: Password never expires
  • Open Group Policy Management console
    • sp.local / Domains / sp.local / Domain Controllers / Default Domain Controllers Policy
    • Right click and Edit
      • Policies / Windows Settings / Security Settings / Local Policies / User Rights Assignment
      • Edit Allow log on locally
        • Add the Users group
  • Stop and Disable the following Services
    • DFS Namespace
    • DFS Replication
  • Shut down, snapshot "DC and IIS", and start virtual machine
  • Mount the SQL Server ISO to the VM DVD drive
  • Start SQL Server Setup 
    • Install Stand-alone
    • Use MS Updates
    • Ignore DC and Firewall warnings
    • All Features with Defaults
    • Continue
    • Server Configuration / Service Accounts
      • Use the same account for all SQL Server services
        • specify the sp\spservice account and password created above
    • Continue
    • Analysis Services Configuration
      • Account Provisioning
        • Add Current User
    • Reporting Services Configuration
      • Install only for both
    • Distributed Replay Controller
      • Add Current User
    • Continue then Wait
  • Shut down, snapshot "SQL Server", and start virtual machine
  • Open SQL Server Configuration Manager
    • SQL Server Network Configuration
      • Protocols for MSSQLSERVER
        • Enable Named Pipes
  • Restart the SQL Server (MSSQLSERVER) service
  • If your server is randomly named - not sp2013
    • DNS Manager
      • Forward Lookup Zones
        • sp.local
          • Add a new alias
            • Name: sp2013
            • FQDN: Browse to splocal\servername
              • servername will be a randomly generated value
  • Mount the SharePoint Server 2013 iso
  • Start the Prerequisites installer
    • Run D:\Splash.hta (open with MS HTML Application Host)
    • Short Wait
    • Finish to restart
  • Start the SharePoint Install
    • Enter your Enterprise license key
    • Wait
    • Run the Configuration Wizard
    • Create a new server farm
    • Configuration Database
      • Server: sp2013
      • Name: SharePoint_Config
      • Username: sp\spservice
      • Password: same as above
    • Farm Security Settings
      • Passphrase: same as admin password above
    • Central Admin Web App
      • Port: 8000
      • Auth: NTLM
    • Wait
    • Finish
  • IE will open to the central administration website.
    • Join the experience program (or don't)
    • Start the wizard and configure as follows
  • Central Admin Initial Farm Configuration Wizard steps
    • Use existing managed account: sp\spservice
    • All items should be checked except for Lotus Notes
    • Next
    • Wait
    • Create Root Site Collection
      • Title: SP2013
      • URL: /
      • Experience version: 2013
      • Template: Collaboration \ Team Site
      • OK
        • If you encounter a  error, skip to the next step (AAM config) then delete the running timer job, restart IIS, and re-run the wizard from Central Admin
      • Finish
    • Open central admin (http://sp2013:8000) and add the following Alternate Access Mapping (AAM) internal URLs
  • Set the browser home page to http://sp2013
  • Configure Search from Central Admin
    • Central Admin \ Manage service applications \ Search Service Application (first one)
      • Content Sources
        • Local SharePoint Sites
          • Incremental every 30 minutes (or other value here based on needs)
            • Recommend disabling incremental crawls for performance
          • Note: Continuous crawls will require more resources on VM startup
        • Start a full Crawl
  • Open http://sp2013 in IE
    • Add sp\administrator to the sp2013 Members group
    • Add sp\user to the sp2013 Visitors group
    • Validate that the following workset
      • Any workflow
      • Search scopes
      • My Sites and User Profile
  • Performance Tuning
    • Run the following PowerShell scripts (in SharePoint 2013 Management Shell)
      • Set-SPEnterpriseSearchService -PerformanceLevel Reduced
    • Disable the following system services unless/until needed
      • SQL Server Analysis Services (MSSQLSERVER)
        • From Automatic to Disabled
      • SQL Server Reporting Services (MSSQLSERVER)
        • From Automatic to Disabled
      • Optional (if you do not need SharePoint search and want to reduce memory footprint)
        • Remove the incremental crawl scheduled earlier
    • More tips from Andrew Schwenker
  • Shut down, snapshot "SharePoint Configured", and restart
Optional Configurations

Monday, March 10, 2014

SharePoint Farm Infrastructure Architecture Recommendations

Following are some recommendations for a typical SharePoint Development environment topology:

In addition to the corporate Test/Stage and Prod farms, I recommend a standalone Dev VM for each of your MSDN subscriptions/developers.  Development VMs contain a standalone single server farm as well as all development tools.  Any content only solutions (OOB site collection or web scoped) should be configured directly in Production in a new site collection.  Custom development (Visual Studio) is completed on the development VMs, released to Stage, tested, and then released to Prod.  Each Dev VM should be semi-isolated from the corporate network (separate subnet and domain).  Dev VMs should be disposable, distributable, and standardized as in my article here: SharePoint 2010 Development Farm VM

In this way every new developer would only need to copy the VM to their workstation and would be up and running after connecting to Source Control.  They would also have full control of their VM so IT admin requests would be minimized.  Simply recopying the template VM would fix any issues.

The development VM operating system drive should be a solid-state drive.  Optionally, an external BLOB storage and search index partition may be stored on a low cost drive (requires a little more configuration).  Workstations must support hardware virtualization.

The Test/Stage servers may need to be used for debugging and development of integration issues.  Alternatively, a standalone Dev farm on the corporate network can be set aside for this purpose.

In each case, a process for synchronizing Production site collections back onto the Test/Stage and Dev VMs should be maintained.  Usually this includes site collection backups being made available as needed.  However care must be taken to ensure information security policies are maintained.  This can include scrubbing/redacting content, disabling alerts and emails (this may be done through network isolation), and populating sample data.

Monday, March 14, 2011

SharePoint Server 2010 Development VM for VirtualBox or VMWare, Part 2

Continued from SharePoint Server 2010 Development VM for VirtualBox or VMWare, Part 1
This Part covers Application, Office Web Apps, and Mail Server installation

Install
  • Boot up the virtual machine
  • In VirtualBox or VMWare, share the folder on the host machine where the install files are
    • In VirtualBox, Shared Folders appear under Network\VBOXSVR
  • Run the SharePoint Designer Install
    • Close when prompted to go online
  • Open SharePoint Designer
    • Select Use Standard Settings
    • Close SharePoint Designer
  • Mount the Office Professional Plus iso
    • If you install the 64-bit version of Office, you will need to also install the Datasheet View fix: http://support.microsoft.com/kb/2266203
      • I recommend installing 32-bit Office.  The Datasheet View fix does not behave exactly the same as the 2010 version.
  • Run the Setup
    • Enter your license key
    • Modify the InfoPath install files to install all files to the hard drive
    • Continue through the installer
    • Do not go online, close.
  • Add mx record to DNS Server
    • Open DNS Manager
      • Forward Lookup Zones \ sp.local
        • Right-click \ New Mail Exchanger (MX) ...
          • Leave Host domain blank
          • FQDN of mail server: sps2010.sp.local
          • priority: 10
  • Install hMailServer (lightweight alternative to Exchange)
    • Browse to the mapped folder containing the hMailServer executable and run it
      • Use external database engine
      • Create a new hMailServer database
      • Microsoft SQL Server
        • DB address: sps2010
        • DB name: hMailServer
        • Use Windows Auth
      • Service: SQL Server (MSSQLSERVER) (MSSQLSERVER)
      • Password: same as admin password from part1
      • Finish
    • Now hMailServer Administrator should be open
      • Connect to administrator on localhost
      • Add Domain
        • Domain: sp.local
        • Advanced
          • Catch-all address: administrator@sp.local
        • Save
      • Add User
        • Address: administrator
        • Password: same as admin password from part1
        • Administration level: Server
        • Active Directory Tab
          • Domain: sp.local
          • User Name: administrator
        • Save
      • Settings \ Advanced
        • Default Domain
          • sp.local
        • Administration password
          • same as admin password from part1
        • IP Ranges
          • Add
            • Name: sp.local
            • Lower IP: 10.0.0.1
            • Upper IP: 10.255.255.255
        • Save
      • Exit
  • Configure administrator user's email address and remove password expiration
    • Open Active Directory Administrative Center
      • Users
        • Administrator
          • General\Email: administrator@sp.local
          • Account\Account Options: check "Password never expires"
  • Disable IE ESC
    • Server Manager / Configure IE ESC / Administrators = Off
    • This will prevent the about:internet trusted site prompt within Outlook
  • Fix loopback checking for the sps2010 hostname - fixes login via Firefox and login as another user
    • Specify host names (Preferred method if NTLM authentication is desired) To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:
      1. Click Start, click Run, type regedit, and then click OK.
      2. In Registry Editor, locate and then click the following registry key:



        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
      3. Right-click MSV1_0, point to New, and then click Multi-String Value.
      4. Type BackConnectionHostNames, and then press ENTER.
      5. Right-click BackConnectionHostNames, and then click Modify.
      6. In the Value data box, type sps2010, and then click OK.
      7. Quit Registry Editor, and then restart the IISAdmin service.
  • Reset the Internet Explorer home page to http://sps2010
  • Open Outlook 2010
    • Configure Email account
      • Name: Admin
      • Email: administrator@sp.local
  • Configure SharePoint outgoing mail server
    • Open SharePoint Central Administration
      • System Settings
        • Configure Outgoing Email settings
          • Outbound SMTP server: sps2010
          • From address: no-reply@sp.local
  • Configure User Profile Sync
    • Add spservice user to the local administrator group
      • Open Active Directory Administrative Center
        • Users \ spservice \ Add to group
          • Administrators
            • This is necessary to start the User Profile Synchronization Service
    • Grant Replicate Directory Changes permissions on sp.local to sp\administrator
      • Open Active Directory Users and Computers
      • Right-click sp.local and select Delegate Control
    • Grant Full Control rights to Network Service on the C:\Program Files\Microsoft Office Servers\14.0 directory
      • This prevents Application Event Log warning event ids: 1015, 1001, and 1004
      • More Info
    • Open SharePoint Central Administration
      • Application Management
        • Manage Services on Server
          • Start the User Profile Service
            • Use the spservice username and password
          • Start the User Profile Synchronization Service
            • Use the spservice username and password
          • Reset IIS (cmd\iisreset)
        • Manage Service Applications
          • User Profile Service Application
            • Before continuing, make sure the Forefront Identity Manager Service has started
              • Task manager \ services \ services
              • If not, you will receive an error: "MOSS MA not found"
            • Synchronization \ Configure Synchronization Connections
              • Create New Connection
                • Connection Name: sp local users
                • Forest Name: sp.local
                • Account Name: sp\spservice
                • Password: same as before
                • Populate Containers
                  • Navigate to SP
                    • Check Users (first one)
            • Synchronization \ Start Profile Synchronization
              • Start Full Synchronization
              • Wait for this to complete
                • Refresh the page until it says Synchronizing, then wait for about 20 minutes until idle
              • Verify that the sp\administrator profile contains the updated email address.  If not, manually populate.
  • Open SharePoint Workspace
    • Create a new account
      • Name: Admin
      • E-mail: administrator@sp.local
      • check "Allow me to recover my account later"
      • Finish
  • Install Visual Studio 2010
    • Mount the Visual Studio 2010 Premium CD iso
    • Run the installer
    • Install Full
      • Good thing we allocated enough disk space :-)
    • Ignore the "SQL Server Express Service Pack 1" install error
      • We installed the full version of SQL Server, not SQL Express
    • Finish and do not check for updates
    • Set to run as administrator
      • Browse to the Visual Studio 2010 shortcut in the start menu
        • Right-click the shortcut and select properties
        • Select Advanced...
        • Check "Run as Administrator"
        • OK, OK.
  • Install Visual Studio Team Explorer 2010
    • Mount the Visual Studio Team Explorer 2010 CD iso
    • Run Setup.exe from the CD
    • Step through the install
    • Finish
  • Install Visual Studio 2010 Service Packs - SP1 at time of article
    • Run the VS10sp1 installer
    • Step through the install
      • This downloads realtime, so make sure you have a high-speed internet connection
    • Wait a very long time for this to download and install
    • When prompted, reboot the machine
  • Install Firefox
  • Install CodeRush Express
  • Install PowerGUI
    • Add the SharePoint PowerPack from the PowerGui Administrative Console
    • Open PowerGUI Script Editor, add the SharePoint Library from File / Powershell Libraries
    • Apply the .Net 4 fix
  • Install Google Chrome
  • Install Safari
  • Install Snagit
  • Install Firebug
  • Install Fiddler
  • Install Paint.Net
  • The remaining instructions have not yet been vetted. Please check back later for more info.
  • Install Windows Live Essentials
  • Shut down and take a snapshot named "SP Dev Workstation"
  • Start the Virtual Machine
  • Install Office Web Apps
  • Shut down and take a snapshot named "SP Dev Workstation with Office Web Apps"
  • Apply any SharePoint service packs as needed
    • We do this last so you have the option of testing against different SharePoint builds and testing Service Pack deployments against existing Sites
  • Shut down the virtual machine and backup to another machine
  • Distribute to the developers in your team and enjoy!