Over the Christmas break there was a question in the Project forums around how to deploy the various demand management assets from Development to Test to Production in a controlled manner, i.e. not manually. When I say demand management assets I mean things like Enterprise Project Types, Workflow Stages, Workflow Phases, Project Detail Pages, Web parts, Project Custom Fields and Workflow Proxy settings, i.e. all the bits that your Demand Management workflow needs to operate correctly, but not the necessarily the workflow itself. As you can imagine when you start to develop big complex workflows for your project management process, the number of stages and PDP’s could become quite arduous to manage.
Luckily MS provide two tools that can assist in packaging and moving these assets between environments which I am going to cover off in two posts. In this one, I will be looking at a tool called Playbooks, which allows you script out all the configuration settings from one environment and import them into another. In the next post, I will look at the DMImport / DMExport solution starter and provide a walkthrough of how to build, install and use it.
Playbooks is the de-facto tool when it comes to moving Project Server configuration settings between environments. The tool interrogates the Project Server configuration settings and scripts them out into an XML file that can then be replayed back into a restore server.
For the purposes of this post, I am going to concentrate on moving only the demand management components, and will leave the general use of the tool and the various nuances to Andrew Lavinsky’s post.
Before we are in a position to run the tool, there are a few pre-requisite steps that need to be completed on the server being backed up.
- Save any custom project workspace templates that may be referenced in your Enterprise Project Types
- Save any project templates you may have associated with an Enterprise Project Type
- Determine the UIDs of the project templates, this will be needed later on to map the template UIDs to the UID’s in the restore server. This last step can be a little tricky as there is no ‘simple’ way of getting the UID of a template. The easiest way I have found is to run the following query against the Draft DB.
select PROJ_UID as [Project GUID], PROJ_NAME as [Project Name], PROJ_TYPE as [Project Type] from MSP_PROJECTs where PROJ_TYPE = 1
Once completed, the saved workspace template and project templates need to be installed on the restore server. In the case of the workspace template, this is as simple as Site Actions > Site Settings > Solutions and uploading the various project workspace templates into the gallery. The project templates require a little more work and will need you to use Project Professional connected to the restore server and to open and subsequently save each schedule template to the restore server, not forgetting to choose the ‘Template’ type in the Save to Project Server dialog.
Once the templates have been saved into the restore server, run the above SQL Query again and you will have the new UIDs of the templates needed for mapping in the playbooks file.
To back up the demand management settings on the source server, it is necessary to install Playbooks onto the server itself. Once started, you will need to point the tool at the backup Project Server instance, in the case below http://project.contoso.com/PWA.
The tool will then provide a list of all the settings that can be backed up for the user to select from. As we are only interested in the demand management or workflow components, check the Workflow setting in the tool as highlighted below.
You will notice that several Enterprise Data options will also be checked automatically to ensure the correct reference data is also backed up. Also remember to provide a Filename to save the configuration settings into, this file will then be moved onto the restore server. Once the backup has completed you will see something like this including a link to the log for troubleshooting if needed.
Mapping the Templates.
Before the backup can be restored, it is necessary to modify the backup file slightly to map the new project schedule template UIDs to the old ones. This should be as simple as doing a find and replace using the UIDs from the backup sever and replacing them with the corresponding UIDs from the restore server. If you don’t do this step, the restore will fail with an “EnterpriseProjectTypeInvalidProjectPlanTemplateUID” error.
After transferring the updated mapped XML file to the restore server, the restore process is very similar to that of the backup, simple select the PS instance to restore the demand management settings to, load up the mapped XML file, select ‘Replace’ as the restore strategy and click on restore. Once again, it is important that Playbooks is run on the restore server itself and not remotely, even though the tool will allow it, otherwise the restore will fail.
If all goes well and you have completed the pre-requisites successfully, the demand management assets should now be restored to the server, and visible in the server settings, ready to be used with your workflows.
In the next post, I will look at DMImport & DMExport, a ‘solution starter’ that approaches the problem in a slightly different manner, instead of picking up all the demand management assets in one go, it allows you to selectively export the assets, so you can choose which assets you want to deploy, not all of them.