Using AutoSPInstaller To Install SharePoint 2013

This section talks about the software you should have ready on your system before starting the installation and configuration process of your SharePoint 2013 farm using AutoSPInstaller.

Step 1 – Software Download
  1. Login to your SharePoint Server as your domain\sp2013setup local administrator account
  2. Download SharePoint 2013 Server (w/ SP1 preferably) – http://technet.microsoft.com/en-us/evalcenter/hh973397.aspx
  3. Download latest Cumulative Update – http://technet.microsoft.com/en-us/sharepoint/jj891062.aspx
  4. Download lastest AutoSPInstaller – http://autospinstaller.codeplex.com
  5. Download latest AutoSPInstallerGUI – http://autospinstallergui.codeplex.com
  6. Download latest AutoSPSourceBuilder – https://autospsourcebuilder.codeplex.com

  7. Extract contents of AutoSPInstaller to C: drive (i.e. C:\SP)

  8. Mount your SharePoint 2013 Media File to a drive

  9. Optional (steps 9-12) – Slipstream install any cumulative updates and download prerequisites for an offline install by extracting AutoSPSourceBuilder to C:\SP  Ensure that the SharePoint farm has internet connection to do step 9-12

  10. Open Windows PowerShell as administrator

  11. Change directory to C:\SP (“CD c:\sp“) and run “Set-ExecutionPolicy ByPass

  12. Choose cumulative update (when prompted) and set parameters for an offline prerequisite install by running “.\AutoSPSourceBuilder.ps1 -GetPrerequisites $true

  13. Extract AutoSPInstallerGUI to C:\SP

  14. Ensure that C:\SP\AutoSPInstaller\AutoSPInstallerInput.xml file is not marked as read only

 

Step 2 – Farm Configurations and Installations

This step guides you through some of the basic configuration options that AutoSPInstaller and AutoSPInstallerGUI give you when configuring your farm. More advanced configurations are described on the AutoSPInstaller and AutoSPInstallerGUI CodePlex sites, which is now depreciated. So ignore the next steps below and go to the online GUI at https://autospinstaller.com/FarmConfiguration to create a configuration XML file for the SharePoint farm

  1. Run AutoSPInstallerGUI.exe from C:\SP

    NOTE: Alternatively AutoSPInstallerGUI is out of date and there is now an online version of GUI where you can upload the AutoSPInstallerInput.xml file

  2. Go to File -> Load XML and point to the C:\SP\AutoSPInstaller\AutoSPInstallerInput.xml configuration file

  3. On the Install tab, fill in the necessary components and how you would like your install to be configured
    1. Set the Environment
    2. Optional – Set it to offline install because you ran AutoSPSourceBuilder and auto slip streamed the cumulative updates and downloaded the pre-reqs
    3. Enable Auto Admin with the setup account (sp2013setup in my case) password so you don’t have to keep logging in after reboots to continue the process
    4. Change the search Index Data Directory to a different drive if possible
    5. Set your PID key (product key) and SKU version

  4. On the Farm tab, populate all the appropriate settings for each sub-tab
    1. Ensure you put in a Passphrase so that you can easily add more servers to the farm
    2. Create a database alias in case you ever need to move the SQL Server
    3. Set the DB Prefix with the environment name to easily identify your databases

    Recommend changing all log file locations to a separate drive

  5. Leave or customize the defaults in the web application tab

  6. Set the Service Application tabs properties

     

  7. Configure the enterprise service apps if required

  8. Configure Other properties if required

  9. Go to File -> Save to save your XML file and close AutoSPInstallerGUI
  10. In C:\SP\AutoSPInstaller, right click and run the AutoSPInstallerLaunch.bat file as admin

     

And voila! Once the script has been run, you should have a semi-running SharePoint farm.

Advertisements

Setting up SharePoint 2013 Dev Box on Hyper-V

SharePoint 2013 service-pack 1 is officially out bringing with it support for Windows Server 2012 R2. This is most excellent news for SPDevs because finally SharePoint can be used on generation-2 virtual machines which for developer boxes is a much needed improvement due to the much improved integration for the standard VM viewer. Think remote-desktop type integration; this has been sorely lacking before R2 as Hyper-V is a server-room technology first & foremost so client-side integration has had to take a back-seat for the beginning of Hyper-V’s lifetime at least. Regardless, we now have it finally but it does involve rebuilding the entire virtual machine from scratch as generation 1 VMs can’t be converted or upgraded.

 

Setup Steps

This environment will just consist of x2 VMs for now to try and save on memory/hard-disc:

  • Domain controller box
    • DNS services
    • Active Directory services
    • Certificate Authority services if needed later on
  • SharePoint box
    • SharePoint 2013 with all roles
    • SQL Server – core database engine only

SharePoint just isn’t supported on AD servers as domain controllers have no concept of local security groups – something SharePoint uses a lot. Lots of SharePoint does work on AD machines; more than does not in fact but there’s plenty of functionality that just won’t work unless it’s on a standard member-server so that’s what we’re going to do too.

This guide will run through setting up the environment in the following stages:

  • Configure Hyper-V + virtual networks
  • Install Windows
  • Prepare the AD + add SharePoint machine.
  • Install software – SQL + SharePoint.
  • Install developer apps.
  • Update/tweak SharePoint VM ready to start developing.

Pre-requisitie- Create an Active Directory/Domain Controller Server

SharePoint needs an AD to work properly; either use an existing AD box or build a new one by repeating the process for the SharePoint machine but with a starting memory allocation of 2 GB & x2 CPUs when you edit the machine. Read my blog here for more details on how to create an AD Domain Controller server.

Ensure service, admin/setup accounts with necessary machine and Active Directory permissions (an example of my setup below):

1. Download ISOs

You’ll want to download the Windows Server R2 image, from MSDN most likely as this is just for development:

image

Also if possible, use the SP1 slipstream ISO for SharePoint.

image

Both RTM + SP1 install methods are documented below.

2. Configure Hyper-V + Virtual Networks

For our setup we’re going to have a private network and a public one. The private network will be so the VMs can communicate directly. Create a private network (not “internal”; we don’t want the VM host on the private VM network).

image

Connect an external network to one of your physical network adapters so machines can see out to the internet when necessary.

Create new Generation 2 Virtual Machine(s)

Now create a new VM in your local Hyper-V. Hyper-V can be installed on Windows 8.1 or Windows 2012 R2 – for simple development environments you’ll not notice any difference between the two.

image

Call it whatever you fancy really. Make sure you select “generation 2” – this is the new option that Hyper-V in Windows 8.1/2012 R2 gives us and it provides a much cleaner virtual machine over generation 1.

image

Give your VM 8GB (Maximum) or 4GB minimum of memory with the option to grow. Once everything’s running it’ll consume up-to 16 GB easily; SharePoint development isn’t for developers on a shoe-string-budget for hardware that’s for sure.

image

8 GB is a nice starting amount of RAM – with dynamic memory enabled (not supported for SharePoint normally) Hyper-V will shrink the memory allocation if it’s not needed, which until SharePoint is on & configured will very likely happen. Setting it too low will cause of lot of disc thrashing once SharePoint’s installed and configured due to how quickly memory grows on start-up. This would likely cause various timeouts on a cold boot with an initial allocation of 8 GB at least; remember that SQL Server’s on this machine too. Don’t save money on memory for SPDev – that’s something everyone learns quickly if they fall short.

As for networking, select the internal network for now. Later we’ll add an external adapter too.

Next, put a disk somewhere local to the host machine; somewhere that has decent read/write speeds as it’ll be pretty disk intensive (hint: not a USB drive). Also give it up-to 200 GB of space (or more), not the default 127 GB as by the time we’ve installed all the tools & bits it’s going to get quite full. You can expand the disk later if necessary of course, and if you’ve got bags of actual hard-disk space it’s preferable to not use dynamically expanding disks if possible.

image

Finally, select the ISO to install from – pick your downloaded Windows 2012 R2 ISO as the install source.

3. Edit Virtual Machines to Add More Hardware

The “new VM” wizard for some reason doesn’t ask about CPUs or any other extras for that matter – presumably for simplicity’s sake. SharePoint at least needs at least 4 physical cores so be functional, especially given it’s an “all-roles-in-one” box + developer tools on-top installation so we need to go back and edit each VM to give them more CPU power.

image

For networking, you might want to also add an external adapter too so the machine can see out to the big-wide-world when needed. When we don’t we can disable the adapter in the VM so as to avoid re-configuring Hyper-V again.

5. Install Windows Server

Next up; a good old clean Windows install. Being generation-2 machines, this won’t take long at all. It’s so fast in fact I’ve seen gen-2 VMs install quicker than some real servers boot up, but I digress – start the ball rolling…

image

I’m based in Spain so I need a Spanish keyboard layout; get the right layout here so you don’t get keyboard rage later.

Click next; you want a GUI install. Server core is the preferred install generally but SharePoint doesn’t support it, not to mention this is a dev environment so unless you’re a PowerShell master you’ll be wanting a nice & easy GUI to get things done.

Select “advanced” setup so you can partition the virtual disc etc, and start the process. After a couple of reboot you’ll need to set a local administrator password and you’re done!

Enable New Virtual Machine Integration

At some point, you’ll see this window pop-up which you might not’ve seen before:

image

This is basically the new integration tools kicking in now Windows is fully loaded and the generation-2 interfaces kick-in. Think RDP for Hyper-V – you can connect host discs, copy/paste freely, play sounds, etc. It’s just much friendlier than the traditional integration. Configure this now – I’d highly recommend you connect up local discs (show options; local resources; more)

image

Make sure you select “drives” to connect your local disks to the VM for file-copying – a very convenient improvement in generation-2. Once you confirm the integration settings, the VM viewer tool will reconnect. To edit these settings again you need to close the viewer, right-click on the VM in Hyper-V manager and click “Connect…” and which point the viewer will re-open and allow you to change the integration configuration.

image

I have to admit this wasn’t so obvious to me either but there you go.

Configure Local Network & Join to Domain Controller Server

At some point you’re going to have to setup the private network for your SharePoint + AD + any other boxes you want for testing (Office Web Apps server for example). Static IP allocation is the way to go; To get SharePoint dev box server to join to the Domain Controller virtual machine, that was created here, follow this instruction from Microsoft

5. Prepare the SharePoint VM Machine.

Prepare SharePoint VM – Add to Domain

Now all the system prep is done we want to add our new SharePoint machine to our domain. As ever it’s in system-properties:

image

If your SharePoint VM DNS settings are correct you should see this when you click “OK” and enter a domain admin credentials:

image

Good times. Reboot to complete the configuration.

 

6. Install Local SQL Server + SharePoint

SQL Server

After domain-joining the SharePoint VM you should now log in with a domain account; an administrator preferably. Remember the login is “domain\Administrator” not just “Administrator” as there’s a local account with that name too.

Get hold of SQL Server 2012 with SP1 integrated. Install a standalone instance – install the SQL setup files (let the installed find and install the newer setup files)

image

Anyway, follow the rest of the wizard – install just the database engine & management tools, use the default instance name (MSSQLSERVER) & add your current domain user to the list of DBAs when prompted. We’re going for a skinny SQL install because that’s all SharePoint needs for the most part.

image

Next step is to install SharePoint bits after running the prep-tool. At the time of writing there’s no slipstreamed SharePoint 2013 + SP1 install yet so we’re going to have to work around the fact the pre-requisites installer just doesn’t work very well on 2012 R2 – just running it will fail.

Install SharePoint 2013 + SP1 Prerequisites

If you have SharePoint 2013 installer with SP1 slipstreamed this is definitely the easiest way because the prerequisite installer actually works.

image

If however that’s not an option…

Install SharePoint 2013 RTM Prerequisites

What we need to do is manually what the installer would do; download & install the prerequisites. We need to configure the server roles and then install the list of packages that would normally happen automatically.

Install the roles needed with:

Import-Module ServerManagerAdd-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45 -Source D:\Sources\sxsAdd-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer,Windows-Identity-Foundation -Source D:\Sources\sxs

The software packages to be installed are as follows:

Install SharePoint Server

Now we can install SharePoint 2013 by running “setup.exe” to launch the normal setup program. Select “complete” installation as we already have SQL Server ready (plus management tools).

image

When this finishes, do not run the wizard if this is RTM! We’ll do that once it’s all patched-up to SP1, which if your install isn’t slip-streamed will need to be done separately.

For more details about installing SharePoint 2013 and SQL Server, read below As-Built documentation

7. Install Development Tools and Office Apps

Next we want to get all our development tools & dependencies installed. First up; Visual Studio. 2013 now comes with the Office tools built-in which is nicer than before as they were separate. Install Visual Studio first.

Then we want to get Office + Visio + Project + SharePoint Designer on at the same time because installing new Office components requires the service-packs & some patches to be reapplied afterwards. Yes, SharePoint Designer is technically a part of Office so if you install SPD after patching Office to SP1 for example you’d have to re-apply SP1 again.

image

Configure Farm

Obviously we need to create a new farm at some point soon. Some people have all-singing, all-dancing scripts to do it (and even me too) but for developer environments I tend to prefer a more practical approach of just creating stuff as it’s needed. Everything will run under the one service-account which is a local admin (and thus breaking every best-practise in the book) but as we’re in dev-land we don’t care for now. Add your farm account to the local admins group:

image

Then fire up the wizard and create a new farm.

image

Make it clear this is a development farm.

I’ll not go into the ins’ & outs of configuring a developer “farm”; needless to say on a dev-box most good practices go out the window anyway. Just make sure your testing/staging/production environments do not in any way mirror the lazy setup that’s fine in development. Seriously don’t; minimum security practices are essential for security but we don’t need it in dev.

 

8. Updates, Tweaks, and Tools

Once you’ve got everything installed, the system will need patching. Start by installing Office 2013 service-pack 1 – http://support.microsoft.com/kb/2817430 as that covers a multitude of sins.

After that, run Windows Update too to bring everything up-to-date too

image

You’ll probably have lots to update; leave it updating overnight to reduce patch-stress.

Final Touches – Make Your VM Nice to Develop With

This is going to be a development environment which means maximum convenience 1st; security and correct architecture 2nd. The machine can die and it won’t matter in other words so we’re going to make it all cosy to use, which servers by default aren’t. This next bit is completely subjective – what’s comfortable to me might not be to someone else but I thought I’d jot it down anyway.

Install Useful Tools

I have a standard set of SPTools I like to use on dev machines and even some production machines. These are:

  • My very own ULS Studio for capturing ULS logs in real-time. It’s a work in progress and there are other tools out there but my version isn’t bad either (not that I’m biased at all, honest). There is of course also ULS Viewer too which most people seem to use. For now ;)
  • Fiddler – for HTTP tracing. Very useful.
  • Network Monitor for taking lower-level traces & not just HTTP.
  • SMTP4Dev – SMTP server for testing alerts. It shows just a log of messages received; perfect for development.
  • Telnet Windows component – useful for probing firewalls & raw network responses. Installable via Server Manager (Windows Features).
  • Process monitor – kernel-level troubleshooting for access denied issues.
  • Firefox + Firebug add-on for alternative browser testing. Firebug is a great HTTP debugging tool if you don’t want to use the IE11 tools (which have had a major overhaul since IE10).
  • SharePoint Manager – great for traversing the SharePoint object-model from farm to individual list items.
  • WinRAR – archiving tool.
  • ILSpy – handy for peeking inside any assembly quickly.
  • LINQPad – execute C# directly against SharePoint, PowerShell style.
Disable Overly Protective Security

Start by turning off UAC and the IE lock-down mode. Don’t do either of these in production of course; they’re there for a good reason. In server manager, under “local server” you’ll see a link called “IE Enhanced Security Configuration”. Click it and disable IE ESC for both types of users. To disable UAC, search on the start screen for “UAC” and you’ll see “Change User Account Controls setting” – open and move setting to “Never notify” – a dangerous move normally as UAC is a great help in making sure nothing wants to sneakily change your system configuration (for better or worse) but on this development environment there’ll be nothing of any real value running except our code.

Again, this security is normally pretty useful as humans don’t do such a good job of checking files for threats but I digress…

 

References

Building SharePoint 2013 BI Demo Environment (Part 1 to 10). This series consists of the following parts:

Installing SharePoint 2013 Using AutoSPInstaller (4 part series):

 

The links to these parts will be updated when the series progresses.

AutoSPInstallerGUI

Overview

AutoSPInstallerGUI was originally a windows UI to create config files to automate deployment of SharePoint 2010 & 2013. AutoSPInstallerGUI was originally developed by Ivan and he published it to CodePlex in April 2015.

Since then NOTE that, AutoSPInstallerGUI is now depreciated. It has been replaced with the online version at  http://autospinstaller.com or http://autospinstaller.azurewebsites.net homepage

 

Getting started

  1. Read the AutoSPInstaller Guide
  2. Download and extract the zip file for the AutoSPInstaller PowerScript version here
  3. After step 1 and 2 has been done, at this point you want to begin configuring AutoSPInstaller via online by going to Load Default Template section of the farm config webpage and click “Begin with Template” button (**if you don’t have an existing config file). Follow the instruction to save and download the configuration as an XML file
  4. Follow the installation step section from the AutoSPInstaller Guide. In summary:
    • Drop the XML into the extracted \SP\AutoSPInstaller folder that was done in stp 2
    • Run AutoSPInstaller.bat on each farm

**If you already have a config file, then upload the XML file by clicking the Browse button from Load from my XML section