marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
429 stars 168 forks source link

Installation Options - Finding Power BI Template files #77

Open wsmelton opened 5 years ago

wsmelton commented 5 years ago

I can see the benefit of including an installation command within dbatools. However the downside to this is a user is not going to be made aware where to find the PBIT files that are pulled down from GitHub when they perform the installation. image

I would recommend removing the commands from dbatools and simply building out your own PowerShell module. You can always put a dependency upon dbatools and utilize the structure for deployments, but you get more visibility by letting your solution be a sqlwatch module on the PowerShell Gallery. In addition to that you can then set the path to be a more easily accessible (or known) directory such as the root of the module folder.

As it stands right now you are using the temporary folder for dbatools which is buried within a user's profile path on Windows. If you for example had your own module that pulled the repository down I would know to just go look at my PSModulePath for the sqlwatch and find a folder (would also put them in a folder for better organization) of say PowerBITemplates.

marcingminski commented 4 years ago

Hi, Thank you for your input and apologies for the delay in responding - I did not ignore you. I have started exploring this now as the project has grown a bit and there are needs for more flexible deployments, perhaps some custom parameters as well as passing the deployment profile publish.xml . I suppose options are the PowerShell Gallery or modify the Install-DbaSqlWatch to fulfil the above.

If I decide to go down the PowerShell Gallery route, will I not need expensive code signing? Would you mind giving some guidance please? According to the Gallery it seems possible to publish a standalone ps1 file?

As far as the location of PBI goes, could we not fix that with a simple message telling location of the PBI?

wsmelton commented 4 years ago

Code signing is an option but not required. With dbatools we made the decision to just because of the breadth of users and we had feedback from multiple folks that it not being signed was a blocker (along with few other items).

You might look at dbachecks and how Rob managed their templates. I recall he had a command that would actually open the initial templates, but that method may not work with your workflow.

In dbatools we used to copy files out to a user's profile, which may work more for individual users that use your code. Another option would be a command that allows deploying your reports to Power BI itself (on-premises or the online service).