SlideShare ist ein Scribd-Unternehmen logo
1 von 37
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?

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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)
 

Kürzlich hochgeladen

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Kürzlich hochgeladen (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

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.