Devops

What is Chocolatey and Why Would I Use It

Chocolatey is an application repository with a commandline provider similar to apt or yum on Linux. The great thing about Chocolatey is it makes software installation scriptable. Think of setting up new workstations or servers. Depending on the environment there is a ton of software to install, things like notepad++, .Net Framework, New Relic, or if you’re setting up a dev environment maybe Visual Studio, notepad++, Adobe Reader, Java JDK, etc. Now you can automate this with a PowerShell script, or better yet if you use Puppet you can leverage the Puppet forge module for Chocolatey.

Installing Applications

To install applications in Chocolately you will find the commands listed next to the software in the Chocolatey packages library at https://chocolatey.org/packages or you can use the commandline search tool (See https://github.com/chocolatey/choco/wiki/CommandsList for examples). You can also setup your own local Chocolatey server if you are in an enterprise environment, however this is outside the scope of this article. Below is an example of several common applications being installed via Chocolatey in PowerShell

choco install googlechrome

choco install firefox

choco install git

choco install adobereader

choco install notepadplusplus

choco install 7zip

choco install ccleaner

choco install sysinternals

choco install filezilla

choco install ruby

choco install nscp

choco install puppet

choco install zabbix-agent

Puppet Forge Module

If your organization is already using Puppet to do config management you can use Chocolatey as a provider in Puppet. To install the module on your Puppet master run the following command: