2. Who am i
Owain Perry
Software architect at thetrainline.com
Twitter: owainperry
Blog: owainperry.com
3. What is Chocolatey?
Chocolatey NuGet is a Machine Package
Manager, somewhat like apt-get, but built
withWindows in mind. - See more at:
http://chocolatey.org/#sthash.WI0IhYUd.dpu
f
4. What is a package?
A collection of stuff, glued into one file
Msi
Self extracting zip exe
Zip file
Nuget
Rpm
Etc…
5. What version is it?
Packages should be versioned?
Question:Which is more helpful?
Setup.exe
Setup_Notepadpp_1.2.3.4.exe
Version.txt inside a zip file.
6. This is not new
Unix has been doing this for the last 20 years
Windows tried to do this with Msi #fail.
7. How do we get it there?
What is wrong with this?
//installers/files/notepadpp/setup.exe
Share permissions
Domain
TCP / UDP Ports 135->139
Only works “easily” on windows.
8. What is installed?
How do we find out what is installed on a
machine?
Check the registry (add / remove programs)?
Scan in
c:program files*
C:program files x86*
What about stuff installed elsewhere?
9. How do we replicate?
We have multiple sites – how to replicate?
Use windows file based replication
Domain hell if not on one domain
Polled replication every x minutes
a pain and slow
hard to see current state
when is it broken?
10. Some technology we have been
using
Nuget.
Zip file containing stuff
API for downloading a specific version via HTTP
Wide adoption amongst the .NET community
Written by *Microsoft*
Lightweight (single .exe)
Large active open source development
community
11. Artifactory
Multiple repositories
Virtual repositories
Near real-time replication
Simple to browse and search
Thought? - Could use SEMVER and promote
packages between repositories
(environments)
12. This can help ops people?
Use the same pattern for installing everything
Same command line
Single repository of packages easy to browse
Obvious version selection
Easy to script
Abstract the implementation away – who cares?
13. What I want?
Simple and easy to use command line
interface
Download via HTTP
Download a specific version(s)
List packages that have been installed.
Install / upgrade / uninstall options.
Simple to create packages using known
language syntax.
14. Chocolatey
Chocolatey NuGet is a Machine Package
Manager, somewhat like apt-get, but built
withWindows in mind. - See more at:
http://chocolatey.org/#sthash.WI0IhYUd.dpu
f
19. This is not ideal
Hundreds of machines installing stuff
Putting the implementation files into the package
keeps it all in house
Provides more control over switches and install
options.
20. Dependants
Chocolatey like nuget supports pulling down
and installing dependants
E.g. getting version 2.1.1.0 of packageA to
install a package B with version 4.8.0.34
24. What is a chocolatey package
then?
Nuget package with:
/tools/chocolateyinstall.ps1
/tools/chocolateyuninstall.ps1
A bunch of helpers
https://github.com/chocolatey/chocolatey/wiki/He
lpersReference
32. clist
Get a list of packages via the command line.
Clist (get from chocolatey.org)
Clist –source http://get.pkgs.ttldev
chocolatey.bat version ttl-msysgit -
localonly
36. So…
We should consider using chocolatey to wrap
all existing installers
Work is minimal to do this.
Near real-time robust replication to multiple
sites
Simple consistent interface to install
applications internal or 3rd party
Easy to what versions are installed.