Bake your own Chocolatey NuGet repository

INTRO: I recently attended SoCal Code Camp to check out talks on some DevOps tools I’ve been looking into adding to my toolkit (Vagrant and either Chef or Ansible). The talk on Chef was in the second hour and looked like it would end up being standing room only, so in the first hour I went to the talk that was in the same room to make sure I’d have a seat for Chef. The talk was “Quickly spin up a new windows machine and get your software installed using Chocolatey” by Justin James. I quickly Googled Chocolatey; being a PowerShell guy I figured it sounded pretty cool and I’d be able to save a seat for Chef, win-win. Little did I know that Chocolatey would be the best thing I’d discover at Code Camp that weekend. 🙂

Also, I need to give credit to itToby for his article Setup Your Own Chocoloatey/NuGet Repository.  It was a huge help in getting a jump start in understanding what was going on under the hood with the NuGet Server setup after seeing the demo at Code Camp.  I used that walk-through when I built my first server, but then I kept thinking back to the demo and felt it was much easier…  Thats when I remembered the Chocolatey.Server package that Justin used and figured I could Boxstarter the whole thing.

I can’t think of a better way to show off how cool Chocolatey and Boxstarter.org are than using them to build themselves.  So, get yourself a Windows 2012 server, open up CMD.EXE and run the following:  START http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/RichHopkins/chocolatey-server-build/master/chocolatey.server.build.txt

START

START

Click through a few Boxstarter prompts and kick back.  Its that easy!

Warning 1

Warning 1

Warning 2

Warning 2

Finished

Done!

Next post…  re-working the Chocolatey and Boxstarter installers and packaging them on your own repository for a fully internal build setup.

Advertisements
This entry was posted in DevOps, Enterprise Management and tagged , , , , , , , . Bookmark the permalink.

6 Responses to Bake your own Chocolatey NuGet repository

  1. Pingback: Modifying Chocolatey and Boxstarter packages for internal use | Rich Hopkins

  2. Pingback: How To Host Your Own [Private/Internal/Public] Package Repository Server (aka Package Feed) | Something Different

  3. djuplina says:

    For anybody still playing with this, the second to last line doesn’t kick off properly, as the C:\ProgramData\chocolatey\lib\chocolatey.server.0.1.1 directory should be updated to C:\ProgramData\chocolatey\lib\chocolatey.server\tools\chocolatey.server\*

    • dragon788 says:

      Excellent tip, I was going to make the same comment before I saw yours. I forked the original gist and commented out some sections I didn’t need, at some point I may try to push it as a package that acts as a “wrapper” around the base Chocolatey.Server on Chocolatey.org so it requires less effort from a user who just wants a simple Nuget feed without having to know anything about IIS.

  4. Pingback: Bake your own Chocolatey NuGet repository | Chocolatey

  5. dragon788 says:

    This also was having issues for me on IIS 7.5 and higher (Server 2012/R2) so I updated the Gist with some alternative options that are valid for the newer IIS and ensure that the permissions from the Chocolatey wiki step 3 are properly applied as well so you can push to the server remotely and not just copy files to the directory on the server itself to deploy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s