SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
CHOCOLATEY
Software deployments using
Who am i
Owain Perry
Software architect at thetrainline.com
Twitter: owainperry
Blog: owainperry.com
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
What is a package?
 A collection of stuff, glued into one file
 Msi
 Self extracting zip exe
 Zip file
 Nuget
 Rpm
 Etc…
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.
This is not new
 Unix has been doing this for the last 20 years
 Windows tried to do this with Msi #fail.
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.
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?
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?
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
Artifactory
 Multiple repositories
 Virtual repositories
 Near real-time replication
 Simple to browse and search
 Thought? - Could use SEMVER and promote
packages between repositories
(environments)
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?
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.
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
Chocolatey
 Nuget packages with extra stuff
 Tools/chocolatey-install.ps1
Commands
 chocolatey [install [packageName [-source source] [-version version] | pathToPac
 kagesConfig] | installmissing packageName [-source source] | update packageName
 [-source source] [-version version] | list [packageName] [-source source] | hel
 p | version [packageName] | webpi packageName | windowsfeatures packageName | ge
 m packageName [-version version] |uninstall packageName]
 example: chocolatey install nunit
 example: chocolatey install nunit -version 2.5.7.10213
 example: chocolatey install packages.config
 example: chocolatey installmissing nunit
 example: chocolatey update nunit -source http://somelocalfeed.com/nuget/
 example: chocolatey help
 example: chocolatey list (might take awhile)
 example: chocolatey list nunit
 example: chocolatey version
 example: chocolatey version nunit
 example: chocolatey uninstall
Commands - shortcuts
Cpack – create a chocolatey package (nuget
style)
Cpush – push a package
Cinst – install
Cup – update
Clist – list
Cuninst – uninstall
Cver – display version
Cwindowsfeature – add a windows feature
How most chocolatey.org
packages work
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.
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
We can build them
What does an install script
look like?
 It’s just PowerShell.
 Everything you can do in PowerShell you
have at your finger tips
What does an install script
look like?
$packageName = 'notepad++'
$silentArgs = '/S'
$validExitCodes = @(0)
$url = $(Split-Path –parent)
$MyInvocation.MyCommand.Definition) +
"..datanpp.6.3.Installer.exe"
$url64 = $url
Install-ChocolateyPackage $packageName "exe"
"$silentArgs" "$url" "$url64" -validExitCodes
$validExitCodes
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
Helpers
 Install-ChocolateyPackage
Install-ChocolateyZipPackage
Install-ChocolateyPowershellCommand
Install-ChocolateyVsixPackage - v0.9.8.20+
helpers
 Install-ChocolateyPackage
 Start-ChocolateyProcessAsAdmin
 Install-ChocolateyInstallPackage
 Install-ChocolateyPath - when specifying machine path
 Install-ChocolateyEnvironmentVariable - when specifying
machine path v0.9.8.20+
 Install-ChocolateyExplorerMenuItem - v0.9.8.20+
 Install-ChocolateyFileAssociation - v0.9.8.20+
 Update-SessionEnvironment - v0.9.8.20+
helpers
 Install-ChocolateyZipPackage
 Install-ChocolateyPowershellCommand
 Write-ChocolateySuccess
 Write-ChocolateyFailure
 Get-ChocolateyWebFile
 Get-ChocolateyUnzip
 Install-ChocolateyPath - when specifying user path
 Install-ChocolateyEnvironmentVariable - when specifying user path v0.9.8.20+
 Install-ChocolateyDesktopLink
 Install-ChocolateyPinnedTaskBarItem - v0.9.8.20+
Build a package
 We have a build script in nuget and a
repository layout to make this quick and easy
for 3rd party tools.
Quick demo
Install chocolatey
@powershell -NoProfile -ExecutionPolicy
unrestricted -Command "iex ((new-object
net.webclient).DownloadString('https://chocola
tey.org/install.ps1'))" && SET
PATH=%PATH%;%systemdrive%chocolateybi
n
cinst
 Install a package
 Cinst <package name> (get from chocolatey.org)
 Cinst ttl-msysgit –source
http://get.pkgs.ttldev
 Cinst ttl-msysgit –version 1.2.3.4 –source
http://get.pkgs.ttldev
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
Using chef.
 Installation using chef is just this.
Or really this…
What’s installed? The chef way
 Chocolatey ohai plugin
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.
Questions?

Más contenido relacionado

La actualidad más candente

Chocolatey Goodness: From Fringe to Mainstream #dotnetfringe
Chocolatey Goodness: From Fringe to Mainstream #dotnetfringeChocolatey Goodness: From Fringe to Mainstream #dotnetfringe
Chocolatey Goodness: From Fringe to Mainstream #dotnetfringeRob Reynolds
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipeilittlebtc
 
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...Daniel Fisher
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichunglittlebtc
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserlittlebtc
 
npm + browserify
npm + browserifynpm + browserify
npm + browserifymaxgfeller
 
Running a Successful Open Source Project
Running a Successful Open Source ProjectRunning a Successful Open Source Project
Running a Successful Open Source ProjectRob Reynolds
 
Heroes of Paragon: publishing Unity WebGL game on Facebook
Heroes of Paragon: publishing Unity WebGL game on FacebookHeroes of Paragon: publishing Unity WebGL game on Facebook
Heroes of Paragon: publishing Unity WebGL game on FacebookDevGAMM Conference
 
Ubento with own cloud
Ubento with own cloud Ubento with own cloud
Ubento with own cloud schaplinski
 
node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!욱진 양
 
Bringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronBringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronNir Noy
 
WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014Michael Carnell
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLior Tal
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToRaymond Camden
 
Using multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify developmentUsing multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify developmentcoderaaron
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress GovLoop
 
Wp cli- intro and basics
Wp cli- intro and basicsWp cli- intro and basics
Wp cli- intro and basicsDwayne McDaniel
 

La actualidad más candente (20)

Chocolatey Goodness: From Fringe to Mainstream #dotnetfringe
Chocolatey Goodness: From Fringe to Mainstream #dotnetfringeChocolatey Goodness: From Fringe to Mainstream #dotnetfringe
Chocolatey Goodness: From Fringe to Mainstream #dotnetfringe
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
2015 TechSummit Web & Cloud - Gem, NPM, Bower, Nuget, Paket - Päckchen hier, ...
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browser
 
npm + browserify
npm + browserifynpm + browserify
npm + browserify
 
Running a Successful Open Source Project
Running a Successful Open Source ProjectRunning a Successful Open Source Project
Running a Successful Open Source Project
 
Heroes of Paragon: publishing Unity WebGL game on Facebook
Heroes of Paragon: publishing Unity WebGL game on FacebookHeroes of Paragon: publishing Unity WebGL game on Facebook
Heroes of Paragon: publishing Unity WebGL game on Facebook
 
Ubento with own cloud
Ubento with own cloud Ubento with own cloud
Ubento with own cloud
 
node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!
 
Bringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronBringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with Electron
 
WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGL
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
Using multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify developmentUsing multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify development
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress
 
Wp cli- intro and basics
Wp cli- intro and basicsWp cli- intro and basics
Wp cli- intro and basics
 
PowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepointPowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepoint
 
Introducing Wordpress Multitenancy
Introducing Wordpress MultitenancyIntroducing Wordpress Multitenancy
Introducing Wordpress Multitenancy
 

Destacado

Zen and the Art of Automated Acceptance Test Suite Maintenance
Zen and the Art of Automated Acceptance Test Suite MaintenanceZen and the Art of Automated Acceptance Test Suite Maintenance
Zen and the Art of Automated Acceptance Test Suite MaintenanceJohn Ferguson Smart Limited
 
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex BAM CEP / Business Activity Monitoring , Complex Event Processingomplex
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex Liviu Claudiu Cismaru
 
Web App Security Horror Stories
Web App Security Horror StoriesWeb App Security Horror Stories
Web App Security Horror StoriesSimon Willison
 
Continuous integration 101
Continuous integration 101Continuous integration 101
Continuous integration 101Gary Park
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPuppet
 
How to create great slides for presentations
How to create great slides for presentationsHow to create great slides for presentations
How to create great slides for presentationsmikejeffs
 
The new masters of management
The new masters of managementThe new masters of management
The new masters of managementrsoosaar
 
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseases
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseasesNiuchangchih (Antrodia camphorata) and its potential in treating liver diseases
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseasesAffiliate marketing
 
关于 Twitter 以及 Twitter 与 NGO2.0
关于 Twitter 以及 Twitter 与 NGO2.0关于 Twitter 以及 Twitter 与 NGO2.0
关于 Twitter 以及 Twitter 与 NGO2.0刘 勇
 
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and CascadingBoulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and CascadingPaco Nathan
 
Budget Simulation Assignment Renee Jackson
Budget Simulation Assignment Renee JacksonBudget Simulation Assignment Renee Jackson
Budget Simulation Assignment Renee Jacksonrjackstar
 
All about Interview
All about InterviewAll about Interview
All about InterviewPratik Patel
 
ZENworks Configuration Management
ZENworks Configuration ManagementZENworks Configuration Management
ZENworks Configuration ManagementRoel van Bueren
 
A Little Pumpkin Likes Reading Books
A Little Pumpkin Likes Reading BooksA Little Pumpkin Likes Reading Books
A Little Pumpkin Likes Reading BooksPEPY Empowering Youth
 

Destacado (20)

Zen and the Art of Automated Acceptance Test Suite Maintenance
Zen and the Art of Automated Acceptance Test Suite MaintenanceZen and the Art of Automated Acceptance Test Suite Maintenance
Zen and the Art of Automated Acceptance Test Suite Maintenance
 
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex BAM CEP / Business Activity Monitoring , Complex Event Processingomplex
BAM CEP / Business Activity Monitoring , Complex Event Processingomplex
 
Web App Security Horror Stories
Web App Security Horror StoriesWeb App Security Horror Stories
Web App Security Horror Stories
 
Continuous integration 101
Continuous integration 101Continuous integration 101
Continuous integration 101
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 
How to create great slides for presentations
How to create great slides for presentationsHow to create great slides for presentations
How to create great slides for presentations
 
The new masters of management
The new masters of managementThe new masters of management
The new masters of management
 
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseases
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseasesNiuchangchih (Antrodia camphorata) and its potential in treating liver diseases
Niuchangchih (Antrodia camphorata) and its potential in treating liver diseases
 
关于 Twitter 以及 Twitter 与 NGO2.0
关于 Twitter 以及 Twitter 与 NGO2.0关于 Twitter 以及 Twitter 与 NGO2.0
关于 Twitter 以及 Twitter 与 NGO2.0
 
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and CascadingBoulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
 
Budget Simulation Assignment Renee Jackson
Budget Simulation Assignment Renee JacksonBudget Simulation Assignment Renee Jackson
Budget Simulation Assignment Renee Jackson
 
ppppk
ppppkppppk
ppppk
 
Gps4b
Gps4bGps4b
Gps4b
 
Rescue.asd
Rescue.asdRescue.asd
Rescue.asd
 
All about Interview
All about InterviewAll about Interview
All about Interview
 
ZENworks Configuration Management
ZENworks Configuration ManagementZENworks Configuration Management
ZENworks Configuration Management
 
B.j. mate i
B.j. mate iB.j. mate i
B.j. mate i
 
Modul 1 bahasa indonesia kb 1
Modul 1 bahasa indonesia kb 1Modul 1 bahasa indonesia kb 1
Modul 1 bahasa indonesia kb 1
 
A Little Pumpkin Likes Reading Books
A Little Pumpkin Likes Reading BooksA Little Pumpkin Likes Reading Books
A Little Pumpkin Likes Reading Books
 
Business ppt-template-043
Business ppt-template-043Business ppt-template-043
Business ppt-template-043
 

Similar a Chocolatey Software Deployments

TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...
TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...
TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...Concentrated Technology
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or lessrijk.stofberg
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostoutDylan Jay
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneVincenzo Barone
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as codeJulian Simpson
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsMichael Kröll
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottleJordi Soucheiron
 
Martin Aspeli Extending And Customising Plone 3
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3Vincenzo Barone
 
Python setup for dummies
Python setup for dummiesPython setup for dummies
Python setup for dummiesRajesh Rajamani
 
Compile open cpn on windows
Compile open cpn on windowsCompile open cpn on windows
Compile open cpn on windowsrandikaucsc
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementFelipe
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet
 

Similar a Chocolatey Software Deployments (20)

TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...
TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...
TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Wind...
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostout
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
NuGet Nuggets
NuGet NuggetsNuGet Nuggets
NuGet Nuggets
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Unlocked package
Unlocked packageUnlocked package
Unlocked package
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with Jenkins
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Prepping software for w7 deployment
Prepping software for w7 deploymentPrepping software for w7 deployment
Prepping software for w7 deployment
 
Martin Aspeli Extending And Customising Plone 3
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3
 
LIGGGHTS installation-guide
LIGGGHTS installation-guideLIGGGHTS installation-guide
LIGGGHTS installation-guide
 
Python setup for dummies
Python setup for dummiesPython setup for dummies
Python setup for dummies
 
Compile open cpn on windows
Compile open cpn on windowsCompile open cpn on windows
Compile open cpn on windows
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration management
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
 

Último

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 

Último (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 

Chocolatey Software Deployments

  • 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
  • 15. Chocolatey  Nuget packages with extra stuff  Tools/chocolatey-install.ps1
  • 16. Commands  chocolatey [install [packageName [-source source] [-version version] | pathToPac  kagesConfig] | installmissing packageName [-source source] | update packageName  [-source source] [-version version] | list [packageName] [-source source] | hel  p | version [packageName] | webpi packageName | windowsfeatures packageName | ge  m packageName [-version version] |uninstall packageName]  example: chocolatey install nunit  example: chocolatey install nunit -version 2.5.7.10213  example: chocolatey install packages.config  example: chocolatey installmissing nunit  example: chocolatey update nunit -source http://somelocalfeed.com/nuget/  example: chocolatey help  example: chocolatey list (might take awhile)  example: chocolatey list nunit  example: chocolatey version  example: chocolatey version nunit  example: chocolatey uninstall
  • 17. Commands - shortcuts Cpack – create a chocolatey package (nuget style) Cpush – push a package Cinst – install Cup – update Clist – list Cuninst – uninstall Cver – display version Cwindowsfeature – add a windows feature
  • 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
  • 21. We can build them
  • 22. What does an install script look like?  It’s just PowerShell.  Everything you can do in PowerShell you have at your finger tips
  • 23. What does an install script look like? $packageName = 'notepad++' $silentArgs = '/S' $validExitCodes = @(0) $url = $(Split-Path –parent) $MyInvocation.MyCommand.Definition) + "..datanpp.6.3.Installer.exe" $url64 = $url Install-ChocolateyPackage $packageName "exe" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes
  • 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
  • 26. helpers  Install-ChocolateyPackage  Start-ChocolateyProcessAsAdmin  Install-ChocolateyInstallPackage  Install-ChocolateyPath - when specifying machine path  Install-ChocolateyEnvironmentVariable - when specifying machine path v0.9.8.20+  Install-ChocolateyExplorerMenuItem - v0.9.8.20+  Install-ChocolateyFileAssociation - v0.9.8.20+  Update-SessionEnvironment - v0.9.8.20+
  • 27. helpers  Install-ChocolateyZipPackage  Install-ChocolateyPowershellCommand  Write-ChocolateySuccess  Write-ChocolateyFailure  Get-ChocolateyWebFile  Get-ChocolateyUnzip  Install-ChocolateyPath - when specifying user path  Install-ChocolateyEnvironmentVariable - when specifying user path v0.9.8.20+  Install-ChocolateyDesktopLink  Install-ChocolateyPinnedTaskBarItem - v0.9.8.20+
  • 28. Build a package  We have a build script in nuget and a repository layout to make this quick and easy for 3rd party tools.
  • 30. Install chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocola tey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%chocolateybi n
  • 31. cinst  Install a package  Cinst <package name> (get from chocolatey.org)  Cinst ttl-msysgit –source http://get.pkgs.ttldev  Cinst ttl-msysgit –version 1.2.3.4 –source http://get.pkgs.ttldev
  • 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
  • 33. Using chef.  Installation using chef is just this.
  • 35. What’s installed? The chef way  Chocolatey ohai plugin
  • 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.