SlideShare una empresa de Scribd logo
1 de 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?

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 using Chocolatey for application 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 using Chocolatey for application 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

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

using Chocolatey for application 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.