Skip to main content

TFS & GO & Chef, oh my: Part 12 - Conclusion, and lessons learned


Well, the presentation went over really well, so this project is now a real thing.  I'll probably post a follow-up once the pilot is in place that will highlight the questions that needed answering before it could go ahead.

If you're looking at having to go this route, some questions to consider:

  1. Why are YOU looking at solving this problem?  If it's just you, either you or everyone is doing it wrong.
  2. Is there a cross-dept team linking the project together?  Why not?
  3. What is 'DevOps' to you?  It should mean 'making things flow better'.
  4. (realizing the irony of this) Have you already picked out tools?  If so, you're doing it wrong.
  5. Do you understand exactly what you're trying to accomplish?  I mean, really?  You sure?

Feel free to reach out if you have any questions.  I know these posts have been incoherent at times.

Lessons learned

  • Technical: Using Go & Go agents to remote around means you're always kinda wondering what user you are, and why such and such doesn't work - truly highlights how little you grasp of authentication (or how well Microsoft has abstracted that process from users)
  • Technical: Chef documentation is still a work in progress
  • Technical: Missing idempotency features in key cookbooks (IIS, I'm looking at you!)
  • Technical: No real simple explanation of how to layer/architect your cookbooks/recipes/roles - took hours and hours of reading to figure out (and still not certain)
  • Technical: Having to learn ssh keys, how Linux deals with sessions coming from Windows, etc.
  • Technical: (Still) learning to use Git
  • Technical: Trying to figure out the best way to deal with multi-environment configs in IIS (and the config source usage gotcha - must be inside the dir!!! i.e. cannot be a separately called dir, aka repo)
  • Technical/Process: Trying to reverse engineer MSI packages built by our company so long ago nobody knew anything about them
  • Technical: Learning to be a developer with no training (no choice here - in the coming years, Ops must learn to code)
  • Process: Trying to understand our deployment process with the mentality that it was an existing 'good' thing (when it was a very very bad thing, i.e. trying to automate a crappy process when you have the option of re-doing the process instead)
  • People: Trying to do this without (dedicated) input from all teams is bad.  In our case we had no choice, but that didn't make it good.
  • Process: Trying to do this without FULLY grasping the scope of the project was a bad idea.  Again, we had no real choice here, but yeah.  Bad.
  • People: The reason why something has never been done before is almost always NOT technical...sometimes it just takes someone who is willing to do it.
  • People: When faced with the choice of 'stay the same and decay' or 'invest time to move forward' - people rarely will rationally choose the former.  Conversely, they will rarely choose the latter voluntarily.  (just my experience)

Comments

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$\user.name\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):
MSSQLSVC/tor-sql-01.domain.local:1433

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

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/server1.company.local:1433 is registered on these accounts:
CN=SERVER1,OU=servers,OU=resources,DC=company,DC=local
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 going...so here's a config and brain dump...

Why?
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)

How?
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
OMD
Open Monitoring Distribution, but the real point here is Check_MK (IIRC Icinga uses this...).  It makes Nagios easy to use and main…