Chocolatey|BoxStarter Enterprise Deployments

It’s been a while since my last post. For those who still remember I have promised you a Chocolatey marathon series. Apparently I keep my promises with a certain latency when it comes to blogging …. I’ll try to do better next time.

In last twelve monts I have been doing a lot of Chocolatey & BoxStarter based  solutions for customers wanting to explore alternative infrastructure and application deployment methods. In case you follow me on twitter you might have noticed that I’ve been talking a lot this year about Chocolatey & BoxStarter. I really like the idea of apt-get for Windows, dependency management,  home made enterprise app stores. Rob & Chocolatey Team are doing tremendous job bringing this to the community. It is definitely one of the best things that happened in Windows ecosystem in a while.

In case you’ve missed my webinars on xenappblogE2EVC presentation in Orlando, or TIADParis event earlier this year, it might be a good idea to go over some basics before we cover more advanced concepts . However I will not be going over the basic installation steps nor the things you can find on

I’ll try to cover in few blogposts the enterprise packaging methodology, private feeds, configuration deployments, integration with packer. I’ll try to show you how to use Amazon S3 as a repository for your binaries, build enterprise ready AMIs using chocolatey, deploy windows infrastructure as a code in AWS.

So let’s get started…

Probably one of the first things you wanna do with Chocolatey in the enterprise is to setup your private feed and create few packages. I’m personally using MyGet for my feeds. For 7$ a month you get a private feed with advance admin features and 1 GB storage for packages.

In case your security guys are not particularly thrilled with cloud hosted services used in your corporate datacenters. You can run everything from your premises  as well,  there are  descent alternatives like Proget or if you are looking for a less featured solutions, Chocolatey Server  can do the trick as well.

Next thing you wanna do is to install chocolatey client on your servers and point them to a feed you have just built.This can be done from the  shell using “choco sources” command, but I’m usually setting this up during client deployment phase modifying the chocolatey.config on the fly.  Usually I run  a similar code during image preparation phase to make sure that all the boxes are pointing to correct feed. I’m still using Chocolatey client mainly because alternative installation sources and windows features are still not available in 0.9.9 family.

# Install Chocolatey

$nugetRepoId = “nugetRepoId”
$nugetRepo = “nugetRepo”

Write-Host ‘Installing and configuring chocolatey’ -foregroundcolor DarkGreen -backgroundcolor white
Invoke-Expression $binariesPath\chocolatey.ps1

$xml = [xml](get-content $chocoConfig)

Next thing we wanna make sure is to copy the application binaries to a highly available and decently performing storage.If you are using Amazon S3 it is advisable to create a separate packaging bucket.

Hard-coding the application binary paths is a very bad idea you don’t wanna open and modify 350 package library  just because your colleague in Australia wanna try your code but your hard-coded filer is inaccessible or performs poorly over wan. Using environment variables  in your packages to locate binaries is probably the cleanest way to make sure your code can run virtually anywhere.

# Set Chocolatey global env variables

[Environment]::SetEnvironmentVariable(“chocoRepository”, “myPath”, “Machine”)

Chocolatey is built on the NuGet infrastructure. I guess it is not a big surprise for anybody that inside a chocolatey package we can  find an XML package description in nuspec format and Powershell software installation scripts.

Let me try to wrap this up on 7zip example

$destination variable of 7zip installation script resolves to a binary path on a remote file server. As it can be seen the package install logics remains generic. Upgrading 7zip would simply require incrementing $Version variable.

# Declaring Variables

$Vendor =’7zip’
$Product =’7zip’
$Version =’9.20′
$packageName = ‘7zip’
$installerType = ‘msi’
$unattendedArgs = ‘/quiet’
$destination=”${env:chocoRepository}” + “\$Vendor\$Product\$Version\$packageName.$installerType”

# Running Install
Install-ChocolateyPackage $packageName $installerType $unattendedArgs $destination

Now when we have the basics covered we are ready for more advanced concepts that will follow soon.


A word from Supersingular

For those who know me long enough, reading me must be a big surprise. Yes, I finally did it. I have a blog.

With so many hyper-connected smart people out there, I haven’t really felt that a world needs another blogger. To be quite honest, I never felt that I was doing something so extraordinary that required to be shared with the rest of the world.  

I was doing things that I really loved. Sharing few things I’ve learned here and there with my team, building common sense infrastructures for my customers and that was about it. Who would care what I have to say anyway?

In 2013, in a random bar somewhere around Bastille in Paris, I was drinking a bottle of vine with a good friend of mine and a living legend of this industry Shawn Bass. Shawn was doing one of his well know training sessions in Paris when we met. Naturally he was very eager to discover a real Paris nightlife far away from over-priced touristic attractions. As you can imagine I have volunteered for this difficult task.

At the time I have just finished an interesting NetScaler project I was working on for one of the major French investment banks. I was using for my project a Netscaler VPX 200 Standard Edition in production for around 3k concurrent users, mainly traders. Performance was brilliant, environment was stable, customer satisfied with price/feature ratio, life was good, except for a very small detail. At that time Citrix was recommending Netscaler VPX for testing environments with a fictive 500-user limitation. That recommendation was a complete technical nonsense and I was discussing that with Shawn to see if something can be done … He advised me to do a blog post about it. I replied that would be probably one of the less read blog posts in history of IT. He believed the oposite. Eventually I have promised that I would do it. Shawn is not an easiest guy to argue with even when sober, so I left a bar with homework.

I was writing a blog post thinking on how 150 hits including my closest friends and family would affect my ego when that thing gets published. The only satisfaction that I could  find was to prove that great Shawn Bass was wrong. But he wasn’t. I knew nothing about the community.

How far can you get with NetScaler VPX? was read 36k times at the time I’m writing this.

I realized that I was just taking from the community and not giving anything in return. I decided to change, to be more involved, to share knowledge on community organized events and conferences, work on community projects, social networks, name it….

I’ve worked with Barry Schiffer on Netscaler SSL performance research project that made Citrix change recommendation regarding 500 concurrent user limitations on VPX. I have realized that our community really matters and in the same time allowed me to make some great friends.

This blog will be about all of that.

I’ll be sharing in real time the stuff I’m working on. Industry is changing really fast. Some really brilliant code is out there. I enjoy working with windows open-source more and more. Chocolatey & BoxStarter are just great in combination with DSC. Netscaler is not the same product on top of AWS or Azure. Atlantis Computing has a brilliant SDS solution solving tons of problems with software only. Big data is bringing me back to my sources with predictive analysis. I’m working more and more with AWS. VMWare is doing some really cool stuff in EUC space. World is much more complicated than it was back in the day when we were doing XenApp, which is by far the best product Citrix has ever made. I’ll try to, put a word or two on all of that.

I hope you will enjoy it.


Stay tuned for a Chocolatey & BoxStarter marathon series on building infrastructure. I’ll try to cover some basics before deep diving into code. Coming soon !