microsoft / winget-cli-restsource

This project aims to provide a reference implementation for creating a REST based package source for the winget client.
MIT License
236 stars 62 forks source link

Native Winget Repo Server for Windows Server #232

Open steskalja opened 6 months ago

steskalja commented 6 months ago

Description of the new feature / enhancement

Currently, there is no good solution to host an on-prem winget repo that does not connect back to Azure. The idea would be to create a Winget Repo Server/Service for Windows Server that could easily configured by the managing end-user.

Proposed technical implementation details

This could be done by

  1. Writing the server/service in C# using .Net 8.0 and ms sql local db for the database
  2. Implement it using built in web components for site management.
Karl-WE commented 6 months ago

to understand better where this idea is coming from. @steskalja came up with this cool idea on Windows Server summit when winget got introduced.

See that it could be difficult to implement with dependencies for Windows Server team and winget, and limitation of an LTSC release, but well the base idea is good. maybe we can instead of "inbox" bringing up something like that was done with Azure Arc post-release.

https://techcommunity.microsoft.com/t5/windows-server-events/what-s-ahead-for-windows-server/ec-p/4098781#M630

Karl-WE commented 6 months ago

"ms sql local db" we might use the Windows Server internal role "Windows Internal Database".

But technically would have doubts. It was intended for once smaller WSUS and IPAM.

Over the years this WID proves giving admins hard nuts to troubleshoot, maintenance (before ajtek WAM) since this is a very special version of SQL LocalDB.

On top of that this one is still using SQL 2012 or such, would need to revisit this information on WS 2025. If this is still the case this would give me shivers and a reason to loop back internally :)

matsmcp commented 5 months ago

This is one of two issues that prevents us from using winget. The other one is that it doesn't work under WinRM or SSH (it can be hacked to work).

Our scenario is simple. A couple of thousand servers and no internet connection. Since MS Rest example starts with requiring Azure it's end of the line directly.

About the database. For smaller use cases i would prefer just a single textfile (after all - that is how it always has been done in the Linux world)

mherrmann commented 5 months ago

@matsmcp you can run https://github.com/omaha-consulting/winget.pro offline. It's an alternative implementation of a private winget repo. (I am one of the authors.)

Karl-WE commented 5 months ago

Can recommend winget.pro (online version) after an evaluation. Very powerful.

matsmcp commented 5 months ago

@mherrmann looking at it :)