0
LEVERAGING MSBUILD TOAUTOMATE SSRS DEPLOYMENTSKOEN VERBEECK                1
WHO AM I?            2
OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION                        3
INTRODUCTION SSIS & SSAS both have (somewhat) easy methods to automate  deployments   - DTUTIL   - XMLA ... but what abo...
OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION                        5
WHAT IS MSBUILD? platform for building applications    - typically used in conjunction with Visual Studio    - project fi...
WHAT IS MSBUILD? requires    - .NET framework    - Visual Studio is not required to run MSBuild sample (source: Walkthro...
WHAT IS MSBUILD? how do we use this to deploy our SSRS projects?   - SQL Server Reporting Services MSBuild Tasks        ...
OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION                        9
AUTOMATE YOUR DEPLOYMENT solution consists of the following objects    - folder with objects to be deployed         repo...
AUTOMATE YOUR DEPLOYMENT ssrsmsbuildtasks.R2.tasks                              11
AUTOMATE YOUR DEPLOYMENT breakdown of the MSBuild project file   - project element (required) (line 1)                   ...
AUTOMATE YOUR DEPLOYMENT PropertyGroups     - ReportServer: defines URL and folders      (lines 6-12)     - Target Depend...
AUTOMATE YOUR DEPLOYMENT ItemGroups   - Reports and DataSets   (lines 15-38)                                             ...
AUTOMATE YOUR DEPLOYMENT ItemGroups   - Data Sources    (lines 41-58)       needs to be fully specified in project file ...
AUTOMATE YOUR DEPLOYMENT Targets/Tasks   (lines 76-112)   - GetFullServerURL: uses GetFullURL to find the URL of the webs...
AUTOMATE YOUR DEPLOYMENT Targets/Tasks   - CreateConnectionSources: uses CreateReportingDataSource to create     shared d...
AUTOMATE YOUR DEPLOYMENT Targets/Tasks   - SetReportDataSet: uses SetReportDataSet to link reports with shared data     s...
OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION                        19
TIPS&TRICKS possible to exclude items specify aliases for datasets    - not possible for data sources                   ...
TIPS&TRICKS specify folder properties specify authentication single report deployment?    - every data source and datas...
TIPS&TRICKS other objects can be deployed as well    - subscriptions         data and e-mail/file    - schedules out of...
OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION                        23
CONCLUSION MSBuild uses open source SSRSMSBuildTasks   - download from Codeplex can deploy all SSRS 2008R2 objects allo...
RESOURCES   MSBuild    http://msdn.microsoft.com/en-us/library/vstudio/dd393574.aspx   Walkthrough: Creating an MSBuild ...
Q&A 26
THANK YOUkoen.verbeeck@ordina.be@Ko_Verhttp://www.linkedin.com/in/kverbeeckBlog @ LessThanDot                             ...
Upcoming SlideShare
Loading in...5
×

SQLUG MSBUILD SSRS Deployments

2,121

Published on

This is the slidedeck of the presentation delivered to the Belgian SQL user group at 29th January of 2013. It's about automating SSRS deployments using MSBUILD.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,121
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
45
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "SQLUG MSBUILD SSRS Deployments"

  1. 1. LEVERAGING MSBUILD TOAUTOMATE SSRS DEPLOYMENTSKOEN VERBEECK 1
  2. 2. WHO AM I? 2
  3. 3. OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION 3
  4. 4. INTRODUCTION SSIS & SSAS both have (somewhat) easy methods to automate deployments - DTUTIL - XMLA ... but what about SSRS? - Visual Studio (not automated) - RS.exe with VBScripts  hard to generate yourself and no built-in tool  RSScripter fills this gap - but has some shortcomings - MSBuild (open source)  has a learning curve 4
  5. 5. OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION 5
  6. 6. WHAT IS MSBUILD? platform for building applications - typically used in conjunction with Visual Studio - project file (XML) controls how MSBuild processes and builds software  ItemGroup - input of the build process - typically refers to source files  Task - unit of executable code used to perform build operations  Target - groups tasks together  Properties - key/value pairs configuring the build 6
  7. 7. WHAT IS MSBUILD? requires - .NET framework - Visual Studio is not required to run MSBuild sample (source: Walkthrough: Creating an MSBuild Project File from Scratch) 7
  8. 8. WHAT IS MSBUILD? how do we use this to deploy our SSRS projects? - SQL Server Reporting Services MSBuild Tasks  C# open source project on Codeplex by Steven Wright (blog | twitter)  tasks specify how SSRS objects are deployed to a server - uses the SSRS webservice in the background - tasks are available for  SSRS 2008 - Native mode  SSRS 2008 - Integrated mode  SSRS 2008R2 8
  9. 9. OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION 9
  10. 10. AUTOMATE YOUR DEPLOYMENT solution consists of the following objects - folder with objects to be deployed  reports & shared data sets - bin folder with ssrsmsbuildtasks.dll  contains actual code - ssrsmsbuildtasks.R2.tasks in home folder  maps tasks to the assembly containing the task implementation - MSBuild project file  specifies what to deploy and in what order - batch file to start the build process  schedule this to automate your deployment 10
  11. 11. AUTOMATE YOUR DEPLOYMENT ssrsmsbuildtasks.R2.tasks 11
  12. 12. AUTOMATE YOUR DEPLOYMENT breakdown of the MSBuild project file - project element (required) (line 1) specifies optional targets imports build tasks - import element (line 3)  imports content from one project file into another  in this solution, tasks are defined in assembly, not in project file itself 12
  13. 13. AUTOMATE YOUR DEPLOYMENT PropertyGroups - ReportServer: defines URL and folders (lines 6-12) - Target Dependencies (lines 60-71)other targets 13
  14. 14. AUTOMATE YOUR DEPLOYMENT ItemGroups - Reports and DataSets (lines 15-38) set properties wildcard object path 14
  15. 15. AUTOMATE YOUR DEPLOYMENT ItemGroups - Data Sources (lines 41-58)  needs to be fully specified in project file (no object to import) name of the data source SQL Server SSAS 15
  16. 16. AUTOMATE YOUR DEPLOYMENT Targets/Tasks (lines 76-112) - GetFullServerURL: uses GetFullURL to find the URL of the webservice - DeleteFolders: uses ReportfolderExists & DeleteReportfolder - CreateReportingFolders: uses CreateReportFolder 16
  17. 17. AUTOMATE YOUR DEPLOYMENT Targets/Tasks - CreateConnectionSources: uses CreateReportingDataSource to create shared data sets - CreateShareDataSet: uses AddShareDataSets to deploy shared data sets - DeployReports: uses AddReports 17
  18. 18. AUTOMATE YOUR DEPLOYMENT Targets/Tasks - SetReportDataSet: uses SetReportDataSet to link reports with shared data sets - SetReportsDataSource: uses SetReportDataSource to link reports with shared data sources 18
  19. 19. OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION 19
  20. 20. TIPS&TRICKS possible to exclude items specify aliases for datasets - not possible for data sources 20
  21. 21. TIPS&TRICKS specify folder properties specify authentication single report deployment? - every data source and dataset has to be redeployed! 21
  22. 22. TIPS&TRICKS other objects can be deployed as well - subscriptions  data and e-mail/file - schedules out of scope for this session check out the sample from codeplex 22
  23. 23. OUTLINE INTRODUCTION WHAT IS MSBUILD? AUTOMATE YOUR DEPLOYMENT TIPS&TRICKS CONCLUSION 23
  24. 24. CONCLUSION MSBuild uses open source SSRSMSBuildTasks - download from Codeplex can deploy all SSRS 2008R2 objects allows for automatic deployment has a learning curve has some disadvantages - difficult iterative deployments - lots of unnecessary warnings - hard to debug 24
  25. 25. RESOURCES MSBuild http://msdn.microsoft.com/en-us/library/vstudio/dd393574.aspx Walkthrough: Creating an MSBuild Project File from Scratch http://msdn.microsoft.com/en-us/library/vstudio/dd576348.aspx MSBuild Command-Line Reference http://msdn.microsoft.com/en-us/library/vstudio/ms164311.aspx SQL Server Reporting Services MSBuild Tasks http://ssrsmsbuildtasks.codeplex.com/ Jamie Thomson - Deploying Reporting Services reports using msbuild http://sqlblog.com/blogs/jamie_thomson/archive/2009/10/31/deploying-reporting-services- reports-using-msbuild.aspx 25
  26. 26. Q&A 26
  27. 27. THANK YOUkoen.verbeeck@ordina.be@Ko_Verhttp://www.linkedin.com/in/kverbeeckBlog @ LessThanDot 27
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×