Choco Package Manager

Posted on
Choco Package Manager Average ratng: 8,6/10 754 votes

Jul 24, 2018 - A package manager is a tool to install desired software and any other. 'choco install' and 'choco uninstall' have a number of command line.

Tools simplify tasks such as software installs, upgrades and removals. Linux admins use yum and apt-get package management tools to install software onto the OS from via a command-line interface.

The CLI enables an admin to manage software via a script or configuration management system, which is a more efficient approach than the GUI. Chocolatey gives Windows a package manager with functionality similar to yum and apt-get but wholly native to Windows. Chocolatey package manager basics Chocolatey upon which users can build application infrastructure. It is a mechanism to create packages and install and uninstall software. Users can obtain the basic software as an open source offering or choose to license paid versions, including pro and business packages, for more features. Chocolatey uses the, a Microsoft-created method to package and install software. Chocolatey does not change the way in which Windows is technically installed - it simply makes the task easier. A Chocolatey package is actually just a zip file renamed to a.nupkg file extension.

Choco Package Manager

Packages have a that either downloads the installer file from a URL or embeds that installer inside the package. In addition, the script holds metadata about packages in XML files that the Chocolatey client uses to identify packages. The installer files inside packages are the traditional EXE and MSI file types and still use the same methods under the hood to interact with those installers. Chocolatey acts as sort of a wrapper to install MSI and EXE files.

Package installation with Chocolatey on Windows is similar to that with yum on Linux. Like other package management tools, Chocolatey is installed onto Windows but doesn't take up much space; the actual Chocolatey software is less than 15 MB. After installation, add repositories of Chocolatey packages to use the tool.

To see what repositories are currently connected to a Chocolatey client, run choco source list, as demonstrated in Listing 1. The output of choco source list shows the available package repositories for a Chocolatey client. Note the PS to start the code listing, which indicates that we are using PowerShell. Package management for Windows DevOps to enable agile DevOps practices.

DevOps teams should develop, test, version and release applications in an automated fashion. Proper package management is also essential to DevOps automation. Until the addition of the Chocolatey package manager, doing this in Windows was difficult. Native Windows software was never prioritized for DevOps handling methods, instead geared toward GUI-based install steps. Chocolatey handles versioning and dependencies, two essential features of package management.

The package maintainer - or, sometimes, a different person - gives each package a version, which builds a library of trackable versions to use in configuration code. Versioning simplifies package upgrades as well. To try the power of versioning, use the Chocolatey CLI to find if a package can be upgraded. Run choco outdated, as shown in Listing 2. The command choco outdated shows three packages ready for upgrades.

Several interesting things happen in the output of choco upgrade. First, the Chocolatey package manager finds the newest version of the package. Next, it begins to download the required MSI file from a remote location and scans it using VirusTotal, which is a business version feature. It then ensures the hash of the MSI file matches the hash stated in the Chocolatey package.

Lastly, Chocolatey installs the aws-cli package to the local machine and states that environment variables have changed. Integration with configuration management tools In DevOps processes, Chocolatey package manager truly shows its significance when in use alongside, such as Puppet, Chef and PowerShell Desired State Configuration. Chocolatey integrates with diverse tools, replacing the Linux-oriented package management within the process flow.

Finally, A Windows Package Manager - With Chocolate! To the chagrin of the open source community, I’m a Windows guy.

Choco package manager

I do really like Linux based systems, but much of my professional career has remained at least partly in the Windows world. 15 years of using Visual Studio (the only Microsoft product I truly like) have brought me to prefer it greatly over any IDE out there. I even use it for all my, but that’s another post. But if there is anything from the Linux world that I miss when using Windows, it is a proper package manger, a command line one like apt-get on Debian and Ubuntu. As someone who has installed Windows enough to have once had a Windows 98 serial key memorized I can say that a graphical installer is just too much of a pain. Being able to type “apt-get install vlc” (which would install the popular ) and do nothing else is great.

Most of the time you can even just guess at a package being available and it usually is. The first to try to fix this on Windows was which is great for most people and has a very concise, curated list of available applications. But it’s web-based and, well, has a curated list of applications it has the common 90%, but I’m the type that uses that other 10%. If you can forgive the odd name, Chocolatey is fantastic. Not quite up to the level of apt-get but it’s pretty darn close.

Essentially it works in an almost identical fashion to apt-get. It is fully command line (though there is a GUI availabe if you want to be lame) and has community added that span an wide range of interests (1971 in total as of this writing). First off, let’s get Chocolately installed. Installation is super simple, just paste the code below onto your command line and hit enter (you’ll need Windows 7 or greater): @powershell -NoProfile -ExecutionPolicy unrestricted -Command 'iex ((new-object net.webclient).DownloadString('&& SET PATH=%PATH%;%ALLUSERSPROFILE% chocolatey bin Give it a minute to download and install and you are all set to get going.

The official documentation makes things a little confusing by having way too many aliases for all the different commands. Autocad 2013 crack file 32-bit free download. There are at least three ways to install a package: “cinst “, “chocolatey install “, and “choco install “. For the sake of simplicity and to keep things as similar to apt-get, I’m going to use the “choco” base command from here on. Typing “chocolatey” is just too much to type and I don’t want to remember all of the aliases for the sub-commands like install, update, etc. First up, finding a package with the “list” command, which is good for if you aren’t quit sure what the exact name of the package is you want to install since you must specify the name exactly. Choco list #find available packages matching choco list -all #show all versions for the specified pacakge choco list -localonly #find already installed packages matching c: choco list arduino arduinoide 1.0.5.20140625 arduinoidegalileo 0.7.5 Note that it displays the package name followed by the latest version number, which can be useful if you need to install an older version.

Use the “-all” flag shown above to see what other versions are available. In this case, we also see two packages; the first is the standard Arduino IDE and the second being a special version for the new Intel Galileo boards. So, now install Arduino using: choco install arduinoide Note how you can specify the package version as well as multiple packages that will all be installed at once. By default, Chocolatey will automatically install any needed dependencies. Choco install arduinoide -version 1.0.5.20140625 #install specific version of arduinoide choco install arduinoide python2 kdiff #install Arduino, Python 2.7, and KDiff at the same time.

Choco Package Manager

You can also use Chocolatey to update packages using the update command, even updating all packages on your system at once. Choco update arduinoide #update just Arduino choco update all #update every package currently installed with Chocolatey Last of all is the ability to uninstall packages which is quite simple: choco uninstall arduinoide If you are unsure of the name of the packages you already have installed, simply use the list all local command: choco list all -localonly That’s the basics of using Chocolatey, though there are many more advanced features like package sources, missing dependency installation, python and ruby integration, and many others that can be seen on the page. But last, to show why Chocolatey is so awesome, here’s a one-liner that installs nearly everything I use for all of my development work: choco install arduinoide python2 notepadplusplus kdiff make mingw Sudo GnuWin SublimeText3 ConEmu githubforwindows tortoisesvn That’s it! I save this and can just paste it into my console on any new machine. In the above order, the tools are:.

Chocolatey Install Powershell

Arduino IDE. Python 2.7. Notepad - Awesome Windows text editor. KDiff - file diff/merge tool. make - Windows port of the “make” build tool. MinGW - Minimalist GNU for Windows (mainly used for GCC). Sudo - just like Sudo on Linux but for Windows.

Choco Package Manager

Choco Package

GnuWin - Windows native ports of GNU tools like ls, sed, awk, grep, wget. SublimeText3 - Another great text editor with more project management. ConEmu - Best Windows console terminal I’ve ever used. GitHub for Windows - GitHub’s official Windows GUI client. Tortoise SVN - Windows GUI for Subversion Think of how long that would take to download and install off of these programs manually! Hopefully this will save you a great deal of time the next time you need a new application.

© 2018 Maniacal Labs, LLC.