SlideShare a Scribd company logo
LEVERAGING MSBUILD TO
AUTOMATE SSRS DEPLOYMENTS
KOEN 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 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
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 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
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
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
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
         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
AUTOMATE YOUR DEPLOYMENT


 ssrsmsbuildtasks.R2.tasks




                              11
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
AUTOMATE YOUR DEPLOYMENT


 PropertyGroups
     - ReportServer: defines URL and folders      (lines 6-12)




     - Target Dependencies   (lines 60-71)




other targets




                                             13
AUTOMATE YOUR DEPLOYMENT


 ItemGroups
   - Reports and DataSets   (lines 15-38)
                                                 set properties   wildcard




                                                                         object path




                                            14
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
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
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
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
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




                                      20
TIPS&TRICKS


 specify folder properties



 specify authentication




 single report deployment?
    - every data source and dataset has to be redeployed!




                                      21
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
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
 allows for automatic deployment
 has a learning curve
 has some disadvantages
   - difficult iterative deployments
   - lots of unnecessary warnings
   - hard to debug




                                       24
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
Q&A
 26
THANK YOU


koen.verbeeck@ordina.be
@Ko_Ver
http://www.linkedin.com/in/kverbeeck
Blog @ LessThanDot




                               27

More Related Content

What's hot (19)

PPT
SSIS Presentation
BarbaraBederman
 
PPTX
SQL Server 2008 Overview
David Chou
 
PPT
1\9.SSIS 2008R2_Training - Introduction to SSIS
Pramod Singla
 
PPTX
SQL Server Reporting Services
Ahmed Elbaz
 
PPT
Basics & Intro to SQL Server Reporting Services: Sql Server Ssrs 2008 R2
Bala Subra
 
PPTX
Professional Recycling - SSIS Custom Control Flow Components With Visual Stud...
Wolfgang Strasser
 
PPTX
Presentation 1 - SSRS (1)
Anurag Rana
 
PDF
Ssis 2016 RC3
MSDEVMTL
 
PPT
Tableau Architecture
Kishore Chaganti
 
PDF
MSBI-SQL Server Reporting Services
Thejaswi shasthri
 
PPT
SSRS 2008 R2
tomerl
 
PPT
SQL Reporting Services
neha mittal
 
PPTX
Reports with SQL Server Reporting Services
Peter Gfader
 
PDF
Programmability enhancements in sql server 2008 r2
Antonios Chatzipavlis
 
PPTX
Business Intelligence Portfolio
pleeloy
 
PPTX
Bilirs Business Intelligence Portfolio SSRS PPS SP ES Project
Figen Bilir
 
PDF
Difference between sql server 2008 and sql server 2012
Umar Ali
 
DOCX
Sql server reporting services
ssuser1eca7d
 
PPTX
Sql server introduction
Riteshkiit
 
SSIS Presentation
BarbaraBederman
 
SQL Server 2008 Overview
David Chou
 
1\9.SSIS 2008R2_Training - Introduction to SSIS
Pramod Singla
 
SQL Server Reporting Services
Ahmed Elbaz
 
Basics & Intro to SQL Server Reporting Services: Sql Server Ssrs 2008 R2
Bala Subra
 
Professional Recycling - SSIS Custom Control Flow Components With Visual Stud...
Wolfgang Strasser
 
Presentation 1 - SSRS (1)
Anurag Rana
 
Ssis 2016 RC3
MSDEVMTL
 
Tableau Architecture
Kishore Chaganti
 
MSBI-SQL Server Reporting Services
Thejaswi shasthri
 
SSRS 2008 R2
tomerl
 
SQL Reporting Services
neha mittal
 
Reports with SQL Server Reporting Services
Peter Gfader
 
Programmability enhancements in sql server 2008 r2
Antonios Chatzipavlis
 
Business Intelligence Portfolio
pleeloy
 
Bilirs Business Intelligence Portfolio SSRS PPS SP ES Project
Figen Bilir
 
Difference between sql server 2008 and sql server 2012
Umar Ali
 
Sql server reporting services
ssuser1eca7d
 
Sql server introduction
Riteshkiit
 

Similar to SQLUG MSBUILD SSRS Deployments (20)

PPTX
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Is Antipov
 
PPTX
Tfs Build vNext (Jelle Druyts)
Visug
 
PPTX
Harish Aspnet Deployment
rsnarayanan
 
PDF
Build automation best practices
Code Mastery
 
PPT
End To End Build Automation With Team Build
wbarthol
 
PDF
SqlSaturday Denmark 2017 - Automate your SSIS deployment process
Bartosz Ratajczyk
 
PPTX
Customizing the visual studio 2010 share point deployment process
Eric Shupps
 
PPTX
02 - Build and Deployment Management
Sergii Shmarkatiuk
 
PPT
Proof of conecpt ms build property command 20120504 joncash-02
LearningTech
 
PDF
SCCM 2007 Introduction - PICC 2012
capriguy84
 
PPTX
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
Ordina Belgium
 
DOCX
important DotNet Questions For Practicals And Interviews
Rahul Jain
 
PPTX
Extending the build workflow of TFS 2010
Gian Maria Ricci
 
PPTX
Web deploy
Larry Nung
 
PDF
Agile Change and Release Management at the #1 Online Rental Site in the US
Matt Stratton
 
PPTX
Version One Highlights
Nishanth K Hydru
 
PPTX
Application Lifecycle Management with TFS
Mehdi Khalili
 
PPTX
Fly Buys website development using SharePoint 2007
Ari Bakker
 
PPTX
MSBuild Concepts
Praveen Chamarthi, ITIL®
 
PDF
Application deployment automation (XebiaLabs)
XebiaLabs
 
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Is Antipov
 
Tfs Build vNext (Jelle Druyts)
Visug
 
Harish Aspnet Deployment
rsnarayanan
 
Build automation best practices
Code Mastery
 
End To End Build Automation With Team Build
wbarthol
 
SqlSaturday Denmark 2017 - Automate your SSIS deployment process
Bartosz Ratajczyk
 
Customizing the visual studio 2010 share point deployment process
Eric Shupps
 
02 - Build and Deployment Management
Sergii Shmarkatiuk
 
Proof of conecpt ms build property command 20120504 joncash-02
LearningTech
 
SCCM 2007 Introduction - PICC 2012
capriguy84
 
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
Ordina Belgium
 
important DotNet Questions For Practicals And Interviews
Rahul Jain
 
Extending the build workflow of TFS 2010
Gian Maria Ricci
 
Web deploy
Larry Nung
 
Agile Change and Release Management at the #1 Online Rental Site in the US
Matt Stratton
 
Version One Highlights
Nishanth K Hydru
 
Application Lifecycle Management with TFS
Mehdi Khalili
 
Fly Buys website development using SharePoint 2007
Ari Bakker
 
MSBuild Concepts
Praveen Chamarthi, ITIL®
 
Application deployment automation (XebiaLabs)
XebiaLabs
 
Ad

SQLUG MSBUILD SSRS Deployments

  • 1. LEVERAGING MSBUILD TO AUTOMATE SSRS DEPLOYMENTS KOEN VERBEECK 1
  • 3. OUTLINE  INTRODUCTION  WHAT IS MSBUILD?  AUTOMATE YOUR DEPLOYMENT  TIPS&TRICKS  CONCLUSION 3
  • 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. OUTLINE  INTRODUCTION  WHAT IS MSBUILD?  AUTOMATE YOUR DEPLOYMENT  TIPS&TRICKS  CONCLUSION 5
  • 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. 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. 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. OUTLINE  INTRODUCTION  WHAT IS MSBUILD?  AUTOMATE YOUR DEPLOYMENT  TIPS&TRICKS  CONCLUSION 9
  • 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. AUTOMATE YOUR DEPLOYMENT  ssrsmsbuildtasks.R2.tasks 11
  • 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. AUTOMATE YOUR DEPLOYMENT  PropertyGroups - ReportServer: defines URL and folders (lines 6-12) - Target Dependencies (lines 60-71) other targets 13
  • 14. AUTOMATE YOUR DEPLOYMENT  ItemGroups - Reports and DataSets (lines 15-38) set properties wildcard object path 14
  • 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. 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. 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. 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. OUTLINE  INTRODUCTION  WHAT IS MSBUILD?  AUTOMATE YOUR DEPLOYMENT  TIPS&TRICKS  CONCLUSION 19
  • 20. TIPS&TRICKS  possible to exclude items  specify aliases for datasets - not possible for data sources 20
  • 21. TIPS&TRICKS  specify folder properties  specify authentication  single report deployment? - every data source and dataset has to be redeployed! 21
  • 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. OUTLINE  INTRODUCTION  WHAT IS MSBUILD?  AUTOMATE YOUR DEPLOYMENT  TIPS&TRICKS  CONCLUSION 23
  • 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. 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