OneGet (it's in the Windows 10 Preview!)
With a useful build of OneGet making an appearance in the Windows 10 Technical Preview (build 9926+) I thought it was a good time to stop and catch y'all up on what the heck is goin' on.
Before we get into all this, I would like to remind y'all that OneGet is a work-in-progress -- you're going to find some rough edges, some things that don't quite work right, and maybe even some stuff that really needs changin'. That being said, I reckon that it's also in a pretty good state, and it's getting better every day. The upside about publishing bits like this is that you get to see the stuff as it's being made (and if you want to really feel that wild west experience, you can head over to the Github project and grab a really cutting edge build.)
For those tuning in for the first time, let me shine some light on exactly what we're buildin'.
OneGet is a Package Management Aggregator -- it's basically a core module that anyone can write a plugin (what we call Providers ) and creates a consistent interface for software discovery, installation and inventory. On the one side of this core module, is a set of PowerShell Cmdlets that let the user work with all these different package management systems, and on the other is the interface for writin' package providers.
Regardless of the installation technology underneath, users can use these common cmdlets to install/uninstall packages, add/remove/query package repositories, and query a system for the software installed.
We've started a list of all the package providers that we'd like to see built. Some will be built by Microsoft, some by third parties. Over time I'd expect that there's gonna be quite a number.
What's in the box?
In-the-box, we're going to restrict how many of these providers that we ship-- and make it real easy to install new package providers on-the-fly. Think of it like this -- all we really need to have is the basic set that allows us to discover and install more providers for more types of software. Keeping the core unencumbered means that we can dynamically install and update the package providers with greater ease and agility.
At this point, we're likely going to keep the core set to :
- a Bootstrap provider (the provider that knows where to get more providers from)
- an MSI provider for handling MSI files
- an MSU provider for handling Microsoft update files
- an ARP provider (Add/Remove programs) for providing inventory data of anything that registered itself with Add/Remove programs
- PowerShellGet -- for accessing PowerShell modules.
So, things like the ability to work with Chocolatey, NuGet, or any other package format will be available to be 'bootstrapped' on the fly.
Getting Started with OneGet
OneGet is available in a few ways:
- In the recent Windows 10 Technical Preview (any build 9926+),
- In the Windows Management Frameworks 5.0 November Preview (currently for Windows 8.1 and Windows Server 2012 R2)
- We also have an experimental community build off the http://oneget.org site, which should work for all systems back to Windows 7 (maybe even Vista?) -- it requires PowerShell 3.0 and .NET 4.0
Note: the experimental build is exactly what it says it is, experimental. If you're not comfortable with unstable or experimental bits, say on your horse, and wait for the release.
So, grab yourself a heapin' helpin' of OneGet and lets get started.
On a fresh install of OneGet, when you use the get-packageprovider cmdlet you will get a list of the currently installed package providers, which right now, doesn't look like much.
However, you can ask the hidden Bootstrap provider what providers it knows about:
And, you can have it automatically prompt to install one by asking for it by name:
You could also have it just install it on-the-fly if you use it in a command:
ProTip: If you don't want it to bug you with the prompt, you can include the -ForceBootstrap switch on the command line.
Dip your fingers in some Chocolatey
Chocolatey is a community-run package management system that is tailored towards simplifying the installation of mostly developer/devops/itpro software. OneGet has a rudimentary Chocolatey-compatible package provider written for it.
Once you've bootstrapped it, you can find some packages to install using the find-package cmdlet:
and installation is a snap:
The current implementation of the chocolatey provider requires you to set the execution policy to unrestricted:
Don't use this if you're not comfortable with changing the PowerShell execution policy and what that means.
This will be fixed soon.
I know that this has been the briefest of posts on OneGet, but I figured it was better to start the ball rollin', spill some beans and y'all can keep watchin' as I post more updates.
If you want to follow close along as this is being developed, follow me on Twitter: @FearTheCowboy