Adds PSU Install Option to Environment#313
Conversation
This should help us maintain consistency across the codebase.
| $ErrorActionPreference = 'Stop' | ||
| Start-Transcript -Path "$env:SystemDrive\choco-setup\logs\Start-C4bPsuSetup-$(Get-Date -Format 'yyyyMMdd-HHmmss').txt" | ||
|
|
||
| Invoke-Choco upgrade powershelluniversal-remove-default-listener.hook --confirm --no-progress |
There was a problem hiding this comment.
Why is it ran before PowerShell Universal is installed? What listener is it removing?
There was a problem hiding this comment.
It's a hook package, so (unless written to run on install as well as a hook) it needs to be in place before the main package is installed. Though thinking about it, this one is fine to move to after, we're making the adjustment in the setup script... so I can move it to after. Easy!
The listener it's removing is the http :5000 from one of the multiple configuration files, so that we can use it ourselves (and so that we don't have an additional http listener that we don't want to have available).
There was a problem hiding this comment.
If this stays as a package, it will need to be added to the chocolatey.json file for the packages used by the guide.
| } | ||
|
|
||
| # Deploy jobs and dashboards | ||
| Invoke-Choco upgrade chocolatey-licensed-psu-environment --confirm --no-progress |
There was a problem hiding this comment.
Where is the PR for this?
There was a problem hiding this comment.
The chocolatey-licensed-psu-environment package must also be added to the chocolatey.json file. Please link to a PR for this package to review or pull down for testing.
| Invoke-Choco upgrade powershelluniversal-remove-default-listener.hook --confirm --no-progress | ||
|
|
||
| # Install PowerShell Universal | ||
| Invoke-Choco upgrade powershelluniversal --confirm --no-progress --install-args="STARTSERVICE=0$(if ($ConnectionString) {" CONNECTIONSTRING=$ConnectionString DATABASETYPE=SQL"})" |
There was a problem hiding this comment.
The PowerShellUniversal CCR package needs to be added to the chocolatey.json file to enable offline installations.
| $CurrentConfiguration = Get-Content $ConfigurationFile | ConvertFrom-Json | ||
|
|
||
| if ($Thumbprint) { | ||
| $PSUPort = 5000 |
There was a problem hiding this comment.
Should we allow the individual running the guide to select the TCP port for their PSU instance? If not in this initial PR, an issue should be raised to support this customization in the future.
Description Of Changes
Adds Start-C4bPsuSetup.ps1 to the install scripts available in the root of the repository.
Motivation and Context
We have a lot of excellent ideas that we can implement by helping customers utilize PowerShell Universal. We need to have a method for installing everything in that case.
Testing
Operating Systems Testing
Change Types Made
[ ] Bug fix (non-breaking change).[ ] Breaking change (fix or feature that could cause existing functionality to change).[ ] Documentation changes.Change Checklist
[ ] Requires a change to the documentation.[ ] Documentation has been updated.[ ] PowerShell code changes: PowerShell v3 compatibility checked?[ ] All items are complete on the Definition of Done.