cli icon indicating copy to clipboard operation
cli copied to clipboard

Add Dapr installer to winget

Open AaronCrawfis opened this issue 4 years ago • 23 comments

/area test-and-release

Describe the feature

Dapr should integrate with winget.

Will require an exe or msi installer for cli.

It can also potentially initialize dapr on the local system.

AaronCrawfis avatar Jul 29 '20 18:07 AaronCrawfis

After chatting w/ @rynowak sounds like we can achieve this by pointing the yaml manifest to the Dapr CLI and adding an install/uninstall flag which adds/removes the Dapr cli to ProgramFiles/ AppData/TBD.

Additionally this install functionality can initialize dapr locally if we want it to

AaronCrawfis avatar Jul 29 '20 18:07 AaronCrawfis

This issue should probably move to the CLI, right?

yaron2 avatar Jul 29 '20 18:07 yaron2

Reading the WinGet documentation it looks like we'll need an executable that:

  • Copies the dapr cli binary into C:\dapr
  • Adds this directory to the local user path

This can be either a standalone .exe named "dapr-installer.exe" or we can add a flag/feature to the existing dapr binary that causes it to copy itself and then update the path.

@artursouza thoughts?

AaronCrawfis avatar Feb 24 '21 21:02 AaronCrawfis

@AaronCrawfis, you seem to be describing a msi installer.

WinGet accepts .msi installers. This can be achieved "easily" with https://wixtoolset.org

The msi installer must be configured to add the dapr.exe in the right folder and update the PATH env variable. The building of the .msi installer belongs to the dapr/cli repo IMO and should be one of the assets generated side-by-side with the executables. This would add value right away since Windows users can install by downloading the msi directly regardless of winget. This work by itself deserves a separate issue.

Then, we add a step to create a PR from DaprBot against the Winget repo adding/updating the yaml file in the end of a cli release. Alternatively, we could use a similar approach from our homebrew setup and have our own winget source repo. I would initially try to work with the official winget repo first, unless they are "too slow" to merge the PRs.

artursouza avatar Feb 25 '21 04:02 artursouza

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Jan 04 '22 01:01 dapr-bot

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Feb 03 '22 01:02 dapr-bot

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

dapr-bot avatar Feb 10 '22 01:02 dapr-bot

Does winget provide some PowerShell install/uninstall scripting extension points? I believe Chocolately does.

cveld avatar May 04 '22 10:05 cveld

/assign

rabollin avatar Jul 20 '22 12:07 rabollin

Looks like this should be significantly easier now due to portable packages in winget 1.3

AndrewBabbitt97 avatar Aug 04 '22 08:08 AndrewBabbitt97

winget doesn't support zip applications in 1.3 release. The supported file formats are EXE, INNO, NULLSOFT, MSI, APPX, MSIX, BURN, PORTABLE. Support for adding zip files is WIP: https://github.com/microsoft/winget-cli/issues/140. A preview release with the support for the same has been released: https://github.com/microsoft/winget-cli/releases/tag/v1.4.2011-preview. As per release notes:

Note: The [Windows Package Manager Community Repository](https://github.com/microsoft/winget-pkgs) does not accept zip applications. They will not be accepted until after 1.4 is Generally Available and has been rolled out to the majority of Windows systems via the automatic upgrade from the Microsoft Store. Users may test with local manifests.

shivamkm07 avatar Aug 26 '22 11:08 shivamkm07

Looks like this should be significantly easier now due to portable packages in winget 1.3

Portable packages as well require releases in one of the supported formats, e.g. kubectl, youtube-dl

shivamkm07 avatar Aug 26 '22 11:08 shivamkm07

Looks like this should be significantly easier now due to portable packages in winget 1.3

Portable packages as well require releases in one of the supported formats, e.g. kubectl, youtube-dl

Currently the windows Dapr CLI is zipped on its own, as such it could just as well be uploaded to the release page directly without compression thus making it possible to create an install manifest on the winget community repo.

AndrewBabbitt97 avatar Aug 26 '22 11:08 AndrewBabbitt97

winget doesn't support zip applications in 1.3 release. The supported file formats are EXE, INNO, NULLSOFT, MSI, APPX, MSIX, BURN, PORTABLE. Support for adding zip files is WIP: microsoft/winget-cli#140. A preview release with the support for the same has been released: https://github.com/microsoft/winget-cli/releases/tag/v1.4.2011-preview. As per release notes:

Note: The [Windows Package Manager Community Repository](https://github.com/microsoft/winget-pkgs) does not accept zip applications. They will not be accepted until after 1.4 is Generally Available and has been rolled out to the majority of Windows systems via the automatic upgrade from the Microsoft Store. Users may test with local manifests.

So possible solutions could be:

  1. Release .exe directly on the release page
  2. Have msi installers for cli and then use it for winget
  3. Wait till 1.4 GA, might be long

@artursouza thoughts?

shivamkm07 avatar Aug 26 '22 11:08 shivamkm07

@shivamkm07 Can you investigate on creating an MSI installer? I believe that is the way to move forward with this. Similarly we could have dmg package for macOS at a later point in time.

mukundansundar avatar Aug 26 '22 11:08 mukundansundar

@shivamkm07 Can you investigate on creating an MSI installer? I believe that is the way to move forward with this. Similarly we could have dmg package for macOS at a later point in time.

Brew is usually the prefered way to grab most single file tools such as dapr, kubectl, istioctl, and many others in the CNCF for both Linux and Mac so DMG is likely unnecessary. Same thing could likely go for Windows, MSI is a bit excessive for a single executable when winget already supports that scenario.

AndrewBabbitt97 avatar Aug 26 '22 11:08 AndrewBabbitt97

Short version of the story is, if exe's were directly published onto the release page we could have a winget package released within a day.

AndrewBabbitt97 avatar Aug 26 '22 11:08 AndrewBabbitt97

Not sure why just publishing the exe is not favorite. Maybe because of filesize?

Out of curiosity, in the past you had these unzip bootstrap exe wrappers. I.e. still one exe but the payload gets decompressed when executed.

Has this been considered?

Op vr 26 aug. 2022 13:40 schreef Andrew Babbitt @.***>:

Short version of the story is, if exe's were directly published onto the release page we could have a winget package released within a day.

— Reply to this email directly, view it on GitHub https://github.com/dapr/cli/issues/424#issuecomment-1228388333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPIYJEZ4MMMCDA74NR433LV3CUKFANCNFSM4PL5NIVA . You are receiving this because you commented.Message ID: @.***>

cveld avatar Aug 26 '22 12:08 cveld

@shivamkm07 when should the associated PR be merged??

mukundansundar avatar Sep 30 '22 04:09 mukundansundar

@shivamkm07 when should the associated PR be merged??

It can be merged only after:

  1. There is an existing manifest for dapr in winget: https://github.com/microsoft/winget-pkgs/pull/81209
  2. Fork of winget-pkgs is created under dapr org: https://github.com/dapr/community/issues/229

EDIT: An another PR in winget-pkgs need to be merged as well before this one: https://github.com/microsoft/winget-pkgs/pull/82429

shivamkm07 avatar Oct 02 '22 06:10 shivamkm07

Update: 1.9.0-rc.1 has been published to winget: https://github.com/microsoft/winget-pkgs/tree/master/manifests/d/Dapr/CLI/Preview/1.9.0-rc.1

As per discussion with maintainers of winget-pkgs (https://github.com/microsoft/winget-pkgs/pull/82508), rc releases would be released with PackageIdentifier Dapr.CLI.Preview while the stable ones would be released as Dapr.CLI. This is to avoid version conflicts between the stable and preview releases. The same has also been updated in the docs: https://github.com/dapr/docs/issues/2848. So the associated PR would have to wait till we have 1.9.0 stable release published in winget

The fork of winget-pkgs would be created automatically under https://github.com/dapr-bot when the workflow runs. @artursouza has verified DAPR_BOT_TOKEN has required permissions.

shivamkm07 avatar Oct 12 '22 08:10 shivamkm07

@shivamkm07 I think this issue can be closed?

mukundansundar avatar Oct 14 '22 05:10 mukundansundar

For the automation part, create a separate issue and tag it to 1.10 milestone ...

mukundansundar avatar Oct 14 '22 05:10 mukundansundar

FYI 1.9.1 CLI is published to winget: https://github.com/microsoft/winget-pkgs/pull/83516 image

shivamkm07 avatar Oct 18 '22 04:10 shivamkm07

For the automation part, create a separate issue and tag it to 1.10 milestone ...

Created. This issue can be closed now.

shivamkm07 avatar Oct 18 '22 05:10 shivamkm07