Now, this is a story all about how
ZS got flipped-turned upside down
And I'd like to take a minute
Just sit right back,
I'll tell you how we used Chef on the Microsoft stack.
Come hear the rap on how ZS Associates, a Global Sales and Marketing Data Firm, massively accelerated their change velocity and eradicated manual config errors by implementing Chef on Azure. Hear about ZS’s cool end-to-end provisioning process that uses Powershell and Chef to automate deploy, config and test with one button.
Join 10th Magnitude Senior Consultant John Smyth, 10th Magnitude Consultant and Arrested DevOps Podcast co-host Trevor Hess and ZS Associates Software Engineering Lead-Applications Mahesh Velaga, who will take you through the implementation verse by verse. Trevor, by the way, will literally be rapping--with props to Will Smith.
https://youtu.be/6EQTbrw4OyM
Why Teams call analytics are critical to your entire business
The Chef Prince of Azure - ChefConf 2015
1. The Chef Prince of
Azure
HOW 10TH MAGNITUDE USED CHEF TO FLIP-TURN ZS
ASSOCIATES INTO MICROSOFT AZURE ROYALTY
John Smyth, Trevor Hess, Mahesh Velaga
6. ABOUT ZS ASSOCIATES
6
ZS is the world’s largest firm focused exclusively on
delivering impact through high-performance sales and
marketing solutions
SALES + MARKETING
SOFTWARE AS A SERVICE
Automate key business processes
3,200 PROFESSIONALS
21 OFFICES
WORLDWIDE
ZS is the world’s largest firm focused exclusively on delivering impact
through high-performance sales and marketing solutions
30
+ YEARS OF INDUSTRY
& DOMAIN EXPERTISE
Quota
Management
Compensation
Management & Reporting
MBO
Planning
Territory
Management
Activity &
Call Planning
7. ABOUT 10TH MAGNITUDE
7
Microsoft Azure
Migration
Web, Media and Mobile Application
Development
DevOps and Azure-
Enabled Automation
Managed Applications
and Infrastructure
10th Magnitude was born in the cloud, and offers corporate customers
multiple, interconnected paths to Azure success:
9. THE SERVER CONFIGURATION PROCESS
Lengthy
Provision process time of 3 days
Manual
Half a day of manual server provisioning and validation
Prone to Human Error
Process involved different systems and people working
independently from one another
Lacked an Overall Framework
Lacked consistency and organization and ability for version
control
9
10. PUT CHEF IN THERE!
The Journey to Infrastructure as Code
10
12. OUR APPROACH
12
Define the Pattern Use the Pattern Teach the Pattern
Observe the
Pattern
• Define the appropriate toolset
• Define the development workflow
• Define the object structure
• Define the cookbook structure
13. OUR APPROACH
13
Define the Pattern Use the Pattern Teach the Pattern
Observe the
Pattern
• Set up Chef Server, source control,
base images, boxes, etc.
• Create CI Workflows
• Develop base cookbooks using the
development workflow and CI
process end-to-end
14. OUR APPROACH
14
Define the Pattern Use the Pattern Teach the Pattern
Observe the
Pattern
• Pair with customer resources on
cookbook creation
• Provide guidance on TDD
cookbook development,
Continuous Integration, etc.
• Lead code reviews
15. OUR APPROACH
15
Define the Pattern Use the Pattern Teach the Pattern
Observe the
Pattern
• Be available as SME to customer
• Observe and assist in creation of
tests, cookbooks, and
documentation upon request
• Participate in code reviews
16. METHODOLOGY
Test-Driven Development
Red: Write failing test
Green: Make the test pass
Refactor: Optimize the code
Continuous Delivery
Using Continuous Integration and tests to validate commits
and ensure stable product at all times
16
18. WORKFLOW
1. Local Development with Vagrant
Write tests (mini tests)
Write Chef recipes
Test locally with Vagrant
Iterate
2. CI/CD on Code Check In
Lint the code with Food Critic
Converge and test Cookbook on Vsphere
Converge and test Cookbook on Azure
Upload to Chef server
18
19. 19
Developer tests
with local suite
PushChange Start_here
Upon git check
in…
Bump version
number and
upload to git.
foodcritic lint
berks install—
get
dependencies
berks upload—
upload to chefci
Cookbook CI Pipeline
Azure Tests
Converge_node.rb:
• Reserve test VM by moving to Azure Chef
environment
• Converge with knife:
• Cookbook recipes
• Run minitest
• Remove the test VM from Chef and
destroy the VM
Converge_node.rb:
• “Reserve” test VM by moving Vsphere to
Chef Environment
• Converge with knife:
• Cookbook recipes
• Run minitest
• Remove the test VM from Chef and
destroy the VM
Vsphere Tests
Tag and Upload
Create a
tagged branch
in git for this
version
berks
upload—install
cookbook to
zssd Chef Org
zschefci Chef: zssd
Test nodes
only
Test
VM
Test
VM
Staging
QA
Dev
Productio
n
20. STEP ONE: CREATE THE VM WITH
POWERSHELL
Azure
Create the Virtual Machine
Create the cloud service, if
required
Map appropriate endpoints
Join the domain
Bootstrap Chef and converge
Install Chef Client
Create the node and client
Update chef vault for client key
Set the runlist
Force chef run(s)
VSphere
Create the Virtual Machine
Select the appropriate datastore
Customize the (sysprepped) OS
Set memory and CPU, depending
on VM type
Set port group and adapter type
Join the domain
Move to appropriate OU
Add drives, depending on VM type
Setup WinRM
Bootstrap Chef and converge
Install Chef Client
Create the node and client
Update chef vault for the client key
Set the runlist
Force chef run(s)
20
21. STEP TWO: CONVERGE THE WEB
SERVER WITH CHEF
Base OS Configuration
Install and configure ZS standard third
party software (monitoring, antivirus,
etc)
Install and configure IIS dependencies
Install and configure IIS for ZS web
sites and services
21
Enterprise Chef 11
Windows Cookbook
IIS Cookbook
Webpi cookbook
ms_dotnet4 cookbook
Minitest-handler
cookbook
23. TECHNICAL
Fully automated server provisioning
From days to less than an hour
Consistent versioned deployment
Consistent Azure and VSphere configuration
Infrastructure as Code
Chef Framework
Versioning
23
25. BUSINESS
Accelerated their Azure migration
Frees up IT talent for other projects related to
business generation
More reliable and dependable infrastructure
More rapid deployment of resources
25
JOHN
Transformation story-just like Will Smith transformed him from a shitty rapper to a shitty actor only this one has a happy ending
From business as usual to IaC
MAHESH
ZS is the world’s largest firm focused exclusively on delivering impact through high-performance sales and marketing solutions
Stress importance of software
Microsoft shop
TREVOR
Azure Experts
John makes a joke about his marketing dept.
Trevor reads this slide and prompts
MAHESH
Trevor-It’s a Rube Goldberg
JOHN
JOHN
Trevor explains continuous delivery
JOHN
MAHESH
Test Driven Development
CI tests against VSphere and Azure
Same image/VM deployment for CI and production
--
Task is assigned in JIRA
Developer creates a feature branch and tests on local Vagrant instance
Failing test is implemented
Feature is implemented to make test pass
Developer pushes branch and assigns a reviewer in JIRA
Assigned developer reviews code against standards and merges to master
Check into master Initiates CI process
--
Possible question for Mahesh: IN WF in Jira are they tasks under a single issue or individual issues? (reports)
IF we need time can talk about the separate tasks for tests and code, etc.
Is it a gated check-in process?
JOHN
JOHN
MAHESH
--
Set the time zone
Install Bginfo
Set up Internet Explorer Settings:
Show hidden files
Don’t hide file extensions
Turn off sharing wizard
Disable print spool warnings
Set the page file location and size
Install debug diagnostics
Install network monitor and required netmon parsers
Install VNC
Enable RDP
Configure the firewall
Install Windbg
Add scheduled tasks for WSUS
Install splunk forwarder
Install SQL IO
Set the temp dir
Install anti-virus software
Disable IPv6
Set the power profile
Add static routes
Install IIS required modules
Install IIS rewrite
Install dynatrace
Set timeouts
Configure .NET security
Make various web.config changes for 32 and 64 bit .NET, multiple framework versions
Set the dynamic port range
Set IIS log and temp folders
Enable configure and IIS shared config
Disable Netdma
Set TCP time wait delay
FCN registry setting
Create scheduled tasks, IIS log rotation, app pool status
MAHESH
Used Powershell to spin up VMs in Azure and Vshere
Reused those for rolling out real virtual machines
Same set of powershell scripts and recipes
IaC > Pieces were automated but you’d have to manually tie all the separate scripts together
You can see exactly what ran, what version, etc.
MAHESH
Understood concept of IaC from App Dev, but needed a framework and ability to apply it to infrastructure
MAHESH
Accelerated their Azure migration because it made the organization more technically agile.
John makes comment > technical agility facilitates business agility
JOHN
Started out not doing them but it was so new to everyone that ppl didn’t know what to look for. (Weekly month and half)
When you’re reviewing against standards, you need to have standards
Weekly code reviews helped to build those standards
Teach different Chef best practices (Powershell as an example)
Become familiar with the resources
John learned things! He’s the supposed expert but things came up that were interesting
Establish practices/learn things!
JOHN
Actively involved
Chef
JOHN
It’s not all or none, you make incremental changes
Revolutions are bloody, Evolutions can be much more effective.
You just don’t go from zero to Etsy
TREVOR
[What he thinks is most important]
MAHESH
[What he thinks is most important]
JOHN
Bottom line: accomplishing real work.
“I didn’t really want to do this talk because I thought it wasn’t a big deal. But looking back it is a big deal. We just did one thing at a time and eventually we were at a different place then when we started.”