Upload
codecampiasi
View
956
Download
2
Tags:
Embed Size (px)
Citation preview
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Infrastructure as code
Bogdan Gâza
CODECAMP 2012 @hurrycane
Tools for DevOps
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
$ whoami
Student at Faculty of Computer Science, Iasi, Romania
https://github.com/sferik/rails_admin
@hurrycane
Saturday, March 10, 12
Agenda
DevOps Culture
Tools for devops
Automated infrastructure
Demo
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Devsvs
Ops
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
The team
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
The team
CODECAMP 2012 @hurrycane
Dev Ops Dev Ops
Saturday, March 10, 12
OpsOps’ job is to keep the site stable and fast
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
DevDev’s job is to add new features
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
Discourage change to increase stability
Allow change as soon as it’s needed.
VS
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
The blame game
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
Lowering risk of changethrough tools and culture
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
Ops who think like devsDevs who think like ops
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
DevOps
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
Tools for DevOps
Saturday, March 10, 12
Tools for DevOps
• Automated infrastructure
• Shared version control
• One step build / deploy
• Always ship trunk
• Shared metrics
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Automated infrastructure
Reconstructing of the application from
source code repository
application data backup
bare metal resources.
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
CODECAMP 2012 @hurrycane
Role &ConfigurationManagement
OS Imaging
In cloud environments:
Saturday, March 10, 12
Automated infrastructure
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Automated infrastructure
CODECAMP 2012 @hurrycane
Minions
Saturday, March 10, 12
Automated infrastructure
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Puppet
CODECAMP 2012 @hurrycane
A tour of puppet
Saturday, March 10, 12
Puppet
CODECAMP 2012 @hurrycane
Puppet MasterModules Configuration
Node Node Node Node
Saturday, March 10, 12
Puppet
CODECAMP 2012 @hurrycane
node 'codecamp.ro' { package { 'ruby' ensure => 'latest' }}
Saturday, March 10, 12
Puppet
yum install ruby
apt-get install ruby
ports install ruby
rpm -Uvh ruby-1.8.7.i386.rpm
up2date ruby
fink install ruby
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
ChefA tour of chef
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
Chef
CODECAMP 2012 @hurrycane
Chef ServerCoobooks
Chefclient
Chefclient
Chefclient
Chefclient
Saturday, March 10, 12
Chef
Each system that has chef-client installed is called a node
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
ChefEach node has attributes.
CODECAMP 2012 @hurrycane
{ "kernel" : { "machine" : "x86_64", "os" : "Darwin", "release" : "10.7.3" }, "ipaddress" : "192.168.0.12", "hostname" : "latte"}
Saturday, March 10, 12
Chef
Each node has a Run list in which each Role is applied
CODECAMP 2012 @hurrycane
{ "runlist" : [ "role[webserver]", "role[database_master]", "role[development]" ]}
Saturday, March 10, 12
Chef
To describe a state of your node you use Resources
CODECAMP 2012 @hurrycane
package "ruby" do version '1.8.7', action 'install'end
Saturday, March 10, 12
Chef
Cookbook directory
CODECAMP 2012 @hurrycane
.!"" metadata.rb!"" recipes# %"" default.rb%"" templates %"" default %"" port_ssh.erb
Saturday, March 10, 12
DemoSetting up a Ruby on Rails stack using Chef and EC2
CODECAMP 2012 @hurrycane
Saturday, March 10, 12
RubyAndRails 2010 @hurrycane
QA
Saturday, March 10, 12
Thanks!
RubyAndRails 2010 @hurrycane
And please don’t forget the evaluation form!
Saturday, March 10, 12