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)
Bonus Scenario: Rollback
Pain points - even with the simplest method
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.
POC Scenario: Build and deploy a webapp/svc project (it just needs to deploy with no human intervention)
- New code checked in; Orchestrator sees new code and kicks off build script
- Build command runs, creates zip file & moves it into Jenkins build# folder?
- Build successful? Orchestrator runs deploy script (otherwise notify failure)
- Hey Chef, please install the updated project (build) into QA
- Ok, let's check out the project definition:
- Get latest build.zip
- Stop services
- Copy/extract/overwrite files
- Copy new configuration files
- Start services
- Let's test! serverspec?
- Report success (pipeline?)
Bonus Scenario: Rollback
- Something is not caught by testing, we need to roll back ASAP.
- Authorized person chooses 'rollback to previous version' for this project
- Orchestrator deletes the latest build?
- 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
Post a Comment