Post on 21-Jul-2015
Immutable ServersМеняйте сервера, как перчатки!
DevOps is RuiningMy Craft
– ALEX TATIYANTS http://tatiyants.com/devops-is-ruining-my-craft/
“I come from a long line of sysadmins. My father was a sysadmin, as was his father
before him…”
“I consider myself an artist and a craftsman of server building.”
“…my greatest achievement is a collection of servers I built and configured… Just like beautiful
snowflakes swirling in the winter’s breath, no two were exactly alike,
but all were quite similar…”
Who is Who?
What is IS?
– http://martinfowler.com/bliki/ImmutableServer.html
“…a server that once deployed, is never modified, merely
replaced with a new updated instance.”
How to implement IS?
Ingredients
Kris Krüg: Chai Tea Raw Fresh Organic Ingredients https://flic.kr/p/2gZEE
1
“configuration management tool”
Resources
Recipes
Cookbooks
mysql, nginx, apache, java, apt, git, postgresql,
build-essential, php, nodes, mongoldb, etc..
2
– Packer.io
“Packer is a tool for creating identical machine images
for multiple platforms from a single source configuration”
“A machine image is a static unit thatcontains a pre-configured operating
system and installed software …”
Builders• EC2 AMI
• DigitalOcean
• VirtualBox
• VMWare
• Parallels
• OpenStack
• etc.
Provisioners
• Shell
• Ansible
• Chef
• Puppet
• Salt
Templates
Building
3
“Manage virtual servers, load balancers
and …”
Through the APIRuby, JS, Python, Java, C#, PHP, Go
Visible DNS, LB
Volatile app servers
Persistance db, logs
ELB
app app app
DB
Visible
Volatile
Persistance
ELB
app app app
DB
Lets Mix It!
ApplicationRubyOnRails
Chef RecipesTo configure app server
Chef Cookbooks
• ruby
• git
• application_ruby
• nginx
• monit (or runit)
Packer Template
• amazon-ebs
• chef-solo
Ruby Scripts to Orchestrate
DONE!
?
PCI DSS
Because
• Scalability
• Testability
• No ad-hoc changes
• …
But!
1 server - 1 role
Micro-services architecture
Discoverability
Data Storages
Freshness
Time
Спасибо!
?alovak@gmail.com