Skip to main content

TFS & Jenkins & Chef, oh my: Part 1 - Intro to the POC

I'll use (this|these) blog entr(y|ies) as a brain dump for a new proof-of-concept project I'm working on.  Long story short, we investigated build/deploy automation and concluded config mgmt was where it was at (after extensive due diligence).

We have some hurdles to overcome:

  1. Everything build/deploy 'process' today is manual, frankly just due to bad original implementation that was never corrected
  2. We have a LOT of VS2010 setup projects - no longer a thing in VS2013 (2012 actually, and the MS plugin for '13 to support them apparently is buggy)
  3. We don't use software versioning (yes, it's boggling - we use the build version)
  4. We have both Windows services and web apps/svcs
  5. We use BizTalk
  6. 'proof of concepts' tend to be adopted as production tools, so I have to build it right the first time
The initial gist (hm...should this be on github?) of this is straightforward.  Jenkins will build from TFS2010, but instead of bad MSIs, we get raw filedumps.  These will get zipped up into the 'build repo'.  Jenkins 'build version' will become 'the version'.  Chef will handle deployment and rollback.  QA is working on some automated testing, but I think this will be phase 2...

  • TFS2010 - figure out how to dump raw files (done!), write script to zip/move the completed build (NuGet?), are VS2010 setup projects supported in TFS2013? If so, migrate to TFS2013
  • Jenkins - (done!) It's already working doing builds as POC, this should get its own server
  • Chef - This is a fully functional POC on my laptop, need to either migrate or build a new version

The POC the VP wants to see is: (okay, he said, 'working POC', but this is what's required)
  • Deploy a Windows service & webapp/svc (from scratch & update process)
  • Rollback w. verification
  • Version tracking
  • Automated build/deploy on check-in/schedule
  • Front-end to track the process (Go?), with bonus for approval buttons
  • A methodology & timeline to move all our projects into this system
  • A methodology to bring net-new projects into this system

We have one month. 


Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

This warning isn't documented that well on the googles, so here's some google fodder:

You are trying to set up replication for a DFS folder (no existing replication)Source server is 2008R2, 'branch office' server is 2012R2 (I'm moving all our infra to 2012R2)You have no issues getting replication configuredYou see the DFSR folders get created on the other end, but nothing stagesFinally you get EventID 4312:
The DFS Replication service failed to get folder information when walking the file system on a journal wrap or loss recovery due to repeated sharing violations encountered on a folder. The service cannot replicate the folder and files in that folder until the sharing violation is resolved.  Additional Information:  Folder: F:\Users$\\Desktop\Random Folder Name\  Replicated Folder Root: F:\Users$  File ID: {00000000-0000-0000-0000-000000000000}-v0  Replicated Folder Name: Users  Replicated Folder ID: 33F0449D-5E67-4DA1-99AC-681B5BACC7E5  Replication Group…

Fixing duplicate SPNs (service principal name)

This is a pretty handy thing to know:

SPNs are used when a specific service/daemon uses Kerberos to authenticate against AD. They map a specific service, port, and object together with this convention: class/host:port/name

If you use a computer object to auth (such as local service):

If you use a user object to auth (such as a service account, or admin account):

Why do we care about duplicate SPNs? If you have two entries trying to auth using the same Kerberos ticket (I think that's right...), they will conflict, and cause errors and service failures.

To check for duplicate SPNs:
The command "setspn.exe -X

C:\Windows\system32>setspn -X
Processing entry 7
MSSQLSvc/ is registered on these accounts:
CN=SQL Admin,OU=service accounts,OU=resources,DC=company,DC=local

found 1 groups of duplicate SPNs. (truncated/sanitized)

Note that y…

Logstash to Nagios - alerting based on Windows Event ID

This took way longer than it should have to get here's a config and brain dump...

You want to have a central place to analyze Windows Event/IIS/local application logs, alert off specific events, alert off specific situations.  You don't have the budget for a boxed solution.  You want pretty graphs.  You don't particularly care about individual server states.  (see rationale below - although you certainly have all the tools here to care, I haven't provided that configuration)

ELK stack, OMD, NXlog agent, and Rsyslog.  The premise here is as follows:

Event generated on server into EventLogNXlog ships to Logstash inputLogstash filter adds fields and tags to specified eventsLogstash output sends to a passive Nagios service via the Nagios NSCA outputThe passive service on Nagios (Check_MK c/o OMD) does its thing w. alerting
Open Monitoring Distribution, but the real point here is Check_MK (IIRC Icinga uses this...).  It makes Nagios easy to use and main…