The thought
occured to me that my previous article on this subject detailed how I go about
building a nice clean development environment, but not what the next steps were,
i.e. getting a working copy of the production web application on that
environment. Hopefully, this article will show you how.
So, assuming you have
got a vm which has SharePoint installed on it, but not really configured, and
with no web apps (as it would be after following my previous article), the next
steps I follow are:
DNS Enteries
Create some DNS host
enteries for the web applications you are going to be creating. In the domain's
forward looking zone, I create the following 3 host enteries pointing to my vm's
ip address:
Configure Services on Server
Next, I complete the
MOSS configuration by opening Central Admin (Start->All
Programs->Microsoft Office Server->SharePoint 3.0 central Administration).
Click on the "Operations" tab, and "Services on Server" link.
As the development vm
is a single machine environment, I would activate all of the services, and in
this order (NB: you can see all available services by choosing the "Custom"
server role):
- Document Load Balancing
- Document Conversions Launcher Service (select your vm name in the
"Load-balancer" dropdown)
- Excel Calculation Services
- Office SharePoint Server Search (using the svc-spssearch account)
- Windows SharePoint Services Search (using the svc-spssearch account for
both service and content access accounts)
Create SSP
Next step is to create a Shared Services Provider. To do this, click the
"Shared Services Administration" in your Quicklaunch, then click the "New SSP"
link. The resultant page asks you to specify an SSP web application and MySites
web applciation, but also provides you with links to create these web
apps.
Click the create a new web app link for your ssp, and create it on port 80
using "ssp" as your host header. For the application pool identity, use the
svc-spsapool account. Change the Database name to be something meaningful (like
WSS_Content_SSP), and select your vm as the search server in the drop down.
Repeat this process to create your Mysite web app.
Back on the create SSP page, use the svc-spsadmin as you ssp service
credentials (you could really create a unique account for this if you wanted
to), and then click ok to generate your SSP.
Create Web App
Time to create the web application that will eventually hold a copy of your
prod web app. Click the "Back to Central Admin" link in the QuickLaunch, then
click the "Application Management" tab. On this screen, click "Create or Extend
a Web Application".
As before, create it on port 80 using "moss" as your host header. For the
application pool identity, use the svc-spsapool account. Change the Database
name to be something meaningful (like WSS_Content_Moss), and select your vm as
the search server in the drop down.
Configue SSP
Click on the "SharedServices1" link in the quicklaunch to get to the setup
screen for this SSP. Most of the defaults will be acceptable here, with the
only things I think you need to consider being:
- the time zone
- upload file size limit (may need to be increased)
- recycle bin status (ensure default values are appropriate for
you)
Once you "ok" this screen, you are taken into the SSP web app itself, where
you can configure things like profile importing and search. The things I would
look at for my dev vm are:
- User Profiles - configure the profile importing so that the full import
(weekly) and incremental import (daily) take place at an appropriate time (when
you vm will actually be on).
- Search settings - click on "Content source and crawl schedules", and then on
the auto generated "Local Office SharePoint Server Sites" content source. This
should show 4 start addresses - http://moss, http://mysite, http://ssp
and sps3://mysite.
Click the "Create a schedule" link under the "Full
Crawl Schedule" dropdown, and specify a weekly time for a full crawl of the
content to be done. This can be resource intensive, so best if you plan it for
a time when you know your vm will be active, but you probably wont be using it
(weekly team meetings time is ideal).
Repeat this process for the
incremental crawl schedule, but make it a daily crawl - I tend to make it repeat
every 20mins.
Backup your "Baseline" Dev SharePoint
Farm
At this point you have a SharePoint farm on you vm that is a good clean
baseline farm. I would recommend backing the vm up at this point, and using a
fresh copy of it for each "production" farm copy you are going to make to
develop against.
Backup Production
Environment
If it is small enough, I like to take a backup of the production
environment, and install it onto my dev environment. Often the production web
application is too large to make a straight backup and restore viable, but you
can usually get around this by exporting the root and a few sub sites of the
production environment and importing them onto your dev environment. The steps
that follow here assume that the prod envirnment is small enough to do a backup
and restore:
- Backup up the web app: use STSADM to backup the web app to a file with the
command
stsadm.exe -o backup -url -filename
You can
add a "-overwrite" flag as well, which indicates that if the file already exists
it should be overwritten - probably not necessary for most ad hoc
backups.
- Web.Config: grab a copy of the web.config to get an custom settings and
safecontrols
- Hive-12: next, you need to grab a copy of the production's have 12 directory
so that you pick-up any additions/customizations here. The directory is
(generally) found at C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\TEMPLATE
- Solutions/DLL's: last step is to add any of the customized solutions used on
the production farm to your dev environment.
If you have the solution
packages to hand then great, put them on your vm and install them using "stsadm
-o addsolution" - this way you get them added to the dev farm's solution store
correctly, and the web.config gets updated appropriately.
If you don't
have them, a dirtier way of getting the functionality across is to just copy the
custom DLL's from the GAC and/or bin directory onto your vm, and update the
web.config yourself.
Restore to Dev
Environment
It is best to restore you prod backup over an existing site collection, so
the first thing to do is to create a site collection in your "Moss" web
application of the same template type used on prod (eg. publishing). Do this by
opening Central Admin, clicking on the "Application Management" tab, and
clicking "Create Site Collection"
Take a backup of the existing 12-Hive Template directory (I generally
create a zip "TEMPLATE-orig.zip" of it in the '12' directory), and then restore
your prod copy of this directory over the top of the existing one.
As mentioned previously, if you have all the customizations for the
production environment you can install and deploy them, otherwise copy the DLL's
to the appropriate directory (generally the GAC) and manually update the
web.config.
Lastly, bring your vm's web.config in to line with web.config from the prod
environment. I would suggest doing this manually (rather then trying to copy
one over the top of the other) as some differences may be acceptable (or even
necessary). Areas to pay close attention to include:
- Safe Controls
- Any additional custom ConfigSections
- Custom Errors section
And thats it - hopefully now you should have a replica of your prod
environment on your vm, ready for you to start developing against.