TFS & Jenkins & Chef, oh my: Part 2 - POC detail

The goal is simplify the POC...I think my initial vision will be a bit much to pull off 'well' inside a month.  Some key points like packaging/dependency management, pipelining, etc, will have to be set aside.

POC Scenario: Build and deploy a webapp/svc project (it just needs to deploy with no human intervention)

  1. New code checked in; Orchestrator sees new code and kicks off build script
    1. Build command runs, creates zip file & moves it into Jenkins build# folder?
  2. Build successful? Orchestrator runs deploy script (otherwise notify failure)
    1. Hey Chef, please install the updated project (build) into QA
      1. Ok, let's check out the project definition:
        1. Get latest build.zip
        2. Stop services
        3. Copy/extract/overwrite files
        4. Copy new configuration files
        5. Start services
      2. Let's test! serverspec?
    2. Report success (pipeline?)

Bonus Scenario: Rollback

  1. Something is not caught by testing, we need to roll back ASAP.
  2. Authorized person chooses 'rollback to previous version' for this project
  3. Orchestrator deletes the latest build?
  4. Chef runs and installs LastSuccessful

Pain points - even with the simplest method

  • Consistency in projects varies - this means where ProjectA puts all files in this folder, ProjectB puts them elsewhere, ProjectA and BProject (naming conventions)
  • Dependencies - not defined anywhere for anything (i.e. IIS req's, server req's...etc)
  • Configuration files - consistency in naming (mostly pathing and connection strings)
  • Versioning - this is done very wrong/not at all today, also - how to version Chef/config files?

More info on Windows & CD
Did some reading/viewing, very interesting stuff...we aren't even doing CI at this point, so there isn't a huge rush to make it perfect.

  • http://thoughtworks.github.io/p2/issue06/cd-in-windows-part-1/
  • http://thoughtworks.github.io/p2/issue07/cd-in-windows-part-2/
  • https://www.youtube.com/watch?v=TpzRuUB9r9o&feature=youtu.be
Orchestrator 
I think it's going to be TeamCity or GO at this point.  After having used Jenkins now, it works, but has issues around living in Windows (building from TFS at this point requires it to live there), specifically around the Chef/ruby stuff (doesn't work in Windows Jenkins).  Plus a few other...inconsistencies (the plugin update/restart process occasionally working)...have lead me to investigate other options.  TeamCity comes highly recommended, and it's free - at least for the POC stage (up to 20 projects).  I would have had to use GO & Jenkins together anyways (for pipeline visualization)...so if TeamCity can do both, or if GO can do both...ya.

Packaging
The quick and dirty is 'zip'.  Better is to have dependencies and whatnot laid out, so things like NuGet/Chocolatey can be used.  Really no clue about how to do this.

Deployment
Chef, for sure...it's really now just taking our existing deployment documents and using the principle 'Chef does everything, until it can't...then PowerShell'.  How the whole Chef repo works, and how we do configuration files...not sure yet.

Comments

Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

Fixing duplicate SPNs (service principal name)

Logstash to Nagios - alerting based on Windows Event ID