infrastructure development on windows ldn cd meetup
DESCRIPTION
A talk from the London Continuous Delivery meetup group on Infrastructure development on windows, things to think about and war storiesTRANSCRIPT
![Page 1: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/1.jpg)
INFRASTRUCTURE DEVELOPMENT ON WINDOWS
@owainperry
London CD meetup – 4th September 2014
![Page 2: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/2.jpg)
Who am I
Owain Perry
Software architect at Justgiving.com
@owainperry
@owainperry
![Page 3: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/3.jpg)
Justgiving.com
Enable people to raise money for charity
£~400 million
20 to 75 transactions / min avg
Steady load
Very spike loads (viral traffic)
@owainperry
![Page 4: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/4.jpg)
What am I going to talk about?An windows infra dev 101 for those starting outThings to think about
@owainperry
![Page 5: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/5.jpg)
Quick poll
Who’s working in a Windows environment?
Puppet / chef / other
@owainperry
![Page 6: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/6.jpg)
Our Architecture (as of today) Lots of change in our software architecture
Existing monolithic application (chopping up)
Micro services
Event Driven Architecture
CQRS
Event sourcing
@owainperry
![Page 7: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/7.jpg)
Just giving server estate
Smaller hosting supplier based on VMware
250 - 300+ servers mostly in AWS, growing rapidly.
Some servers in Azure
@owainperry
![Page 8: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/8.jpg)
Why do automation?
The Friday failure - We go live on Tuesday
Auto upgrade=true
Chocolatey upgraded to a non recoverable broken state
One we realised the issue (Mean Time To Comprehension ~ 1hr)
Changed the setting
We blew away the whole estate ~60 servers while at lunch
Job done.
@owainperry
![Page 9: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/9.jpg)
Tools and tech stack
Windows Linux (a little) Chef Vagrant Minitest (test kitchen) Chocolatey Artifactory Ruby Powershell Berkshelf
@owainperry
![Page 10: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/10.jpg)
Where do you start?
Configuration management
There is a need to manage configuration between environments
Configuration of servers
What software is installed.
We are using Chef
@owainperry
![Page 11: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/11.jpg)
Why Chef?
Ok windows support
DSL and ruby at the same time....
Search (powerful, but you need to use it with thought)
ChefDK
Great community
@owainperry
![Page 12: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/12.jpg)
Doing windows infrastructure development
Vagrant
Work on your servers from the comfort of your own desktop
Images for windows are large 6+ GB
*hint use packer.io to build your base images
@owainperry
![Page 13: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/13.jpg)
Package management
To keep things sane , you need package management
Chocolatey - it works
Oneget – in powershell 5
Download a package over http
Download a specific version
Easy to build
(just, but it's not apt-get or rpm) still a bit beta , but better than nothing
*hint, build your own self contained packages, so you don't depend on the internet
*rant come on MS lets party like it’s 1999
@owainperry
![Page 14: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/14.jpg)
Artifact repository
Store your Software deliverables
Chocolatey packages
Other stuff? (custom gems)
Supports HA , fast , support (becomes very central to infrastrcuture)
examples include Nexus, Artifactory,....
@owainperry
![Page 15: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/15.jpg)
Mini test (test kitchen)
Write tests around your infrastructure - start doing TDD
Just provides some sanity when changing things
Takes discipline
@owainperry
![Page 16: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/16.jpg)
Using CI
to upload your infrastructure code to server
Execute tests on you infra code
Supports TDD
Makes change to the server repeatable.
Version stamping
@owainperry
![Page 17: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/17.jpg)
Writing windows automation
Chef primitive providers (pretty good coverage)
To powershell or not to powershell?
How do you make things idempotent with powershell?
Writing things in ruby? (for chef it's more native)
@owainperry
![Page 18: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/18.jpg)
Who's the boss?
Group policy? Chef?
What is the point of group policy in a chef world?
E.g. Create a local user to run a service using chef, group policy will try and remove it.
@owainperry
![Page 19: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/19.jpg)
Frustrating things about windows SomeUser (domain or local?)
./Someuser
hostname/someuser
etc...
Installing .Net 3.5 can only be done usingfeatures
Writing a shutdown script
Installing .Net 4 via winrm (can’t install update)
@owainperry
![Page 20: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/20.jpg)
Yesterdays issue…
Servers Ran out of diskspace due to local caching
20 mins to delete the data on each server (High CPU load) while serving traffic.
We flicked from the blue to green side
Just deleted the servers and recreated (~10 mins)
Automation is just awesome….
@owainperry
![Page 21: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/21.jpg)
So…
Choose a configuration manager
use vagrant - it's just awesome
sort out package management
Try and do TDD if you can
Get some CI in place
Write code
(get frustrated with Microsoft every couple of hours)
Delete your estate and rebuild it while you have lunch , it makes you feel great
@owainperry
![Page 22: Infrastructure development on windows ldn cd meetup](https://reader033.vdocuments.us/reader033/viewer/2022060121/55942e831a28ab2e3d8b45e1/html5/thumbnails/22.jpg)
Questions?
@owainperry