What is Chocolatey?
The Package Manager for Windows!
|
- Paul Broadwith, Glasgow, Scotland
- 30 years in IT in financial, government, manufacturing and services sectors
- Technical Engineering Manager at Chocolatey Software, Inc.
- Lead Engineer on Boxstarter and cChoco DSC Resource
|
|
|
|
|
-
High level overview of Chocolatey
-
Understand what Chocolatey is
-
Learn why Chocolatey was created - what pain points does it solve?
-
Learn what the Chocolatey Community Repository is and when you should, and should not, use it
-
Understand the process when you submit a package to the Chocolatey Community Repository
The world of package managers
A sad and brief comparison
To install PowerShell Core on Linux:
apt install -y powershell
yum install -y powershell
pacman -S powershell
To install PowerShell Core on Mac:
brew cask install powershell
To install PowerShell Core on Windows:
-
Chocolatey is the package manager for Windows
-
Created by Rob Reynolds (@ferventcoder)
-
First version released on 23 March 2011
-
Chocolatey is almost 11 years old!
-
Latest version is 0.11.3
-
Version 1.0 released soon - watch this space!
Through Chocolatey, now Windows can install PowerShell Core:
choco install powershell-core -y
-
Windows 8.1 / Server 2008R2 in Azure
-
Older Operating Systems may work with some hoop jumping
-
Windows PowerShell 2
-
.NET 4 (TLS 1.2 requires .NET 4.5)
Fundamental Tenet Of Chocolatey
Chocolatey manages packages.
|
Packages manage installers.
|
Chocolatey does not manage installers.
What Is A Chocolatey Package?
What is a Chocolatey package:
-
Special Zip file with a .nupkg extension
-
Commonly called ‘nupkeg’ or ‘noo package’ due to file extension
-
It contains metadata, PowerShell scripts and sometimes other files
-
Builds on NuGet package framework while remaining compatible with v2 repositories
|
packagename.nuspec
chocolateyInstall.ps1
googlechrome.msi
|
What can a Chocolatey package do:
-
Chocolatey
PowerShell
-
PowerShell scripts install, upgrade and uninstall software
-
Almost anything you can do in PowerShell you can do with a Chocolatey package
|
chocolateyInstall.ps1
chocolateyBeforeModify.ps1
chocolateyUninstall.ps1
|
Demo 1
Lets look at a Chocolatey package
Everything you wanted to know but were afraid to ask.
-
Community Repository is at https://community.chocolatey.org hosted by Chocolatey
-
Chocolatey uses it as the default ‘chocolatey’ package source
-
The repository is an OData Nuget v2 feed
-
Vast majority of packages created by volunteer maintainers
-
Some vendors maintain their own packages
-
Repository is for the many and not the few - use is monitored
-
Licensing is important - does not have redistribution rights
Monthly website stats as of November 2021:
-
2.92B requests
-
226.35TB of data
-
11.81M visitors
|
|
|
Push
|
|
choco push mypackage.1.0.0.nupkg
--api-key="'123456'"
|
|
|
Received
|
|
- Package Validator
- Package Verifier
- Package Scanner
- Human Moderator
|
|
|
Approved
|
|
Monthly Package Verifier
|
Demo 2
Manage Chocolatey packages
-
We know what Chocolatey is
-
We know what pain point it solves
-
We learned what the Chocolatey Community Repository is
-
We followed the process when you submit a package to the Chocolatey Community Repository
|
blog.pauby.com
|
Paul Broadwith
|
|
@pauby
|
|
github.com/pauby
|
|
pau.by/linkedin
|
pau.by/talks