• Save
SF DevOps: Introducing Vagrant
Upcoming SlideShare
Loading in...5
×
 

SF DevOps: Introducing Vagrant

on

  • 4,034 views

 

Statistics

Views

Total Views
4,034
Views on SlideShare
2,976
Embed Views
1,058

Actions

Likes
6
Downloads
0
Comments
0

7 Embeds 1,058

http://dev2ops.org 840
http://www.planetdevops.net 206
url_unknown 6
http://www.slideshare.net 2
http://dev2ops.dtosolutions.com 2
http://dev2ops.squarespace.com 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

SF DevOps: Introducing Vagrant SF DevOps: Introducing Vagrant Presentation Transcript

  • Vagrant
  • Mitchell Hashimoto@mitchellh
  • VagrantWith a focus on Ops
  • Agenda
  • AgendaWhat is Vagrant
  • Agenda What is VagrantWhy use Vagrant
  • Agenda What is Vagrant Why use VagrantDevOps with Vagrant in mind
  • VagrantWhat is Vagrant?
  • The Grid
  • A tool for building and distributing virtualized environments.
  • A local cloud.
  • Create and tear down virtual machines
  • Create and tear down virtual machinesUse automation to provision and configure
  • Create and tear down virtual machinesUse automation to provision and configure Network multiple virtual machines
  • Create and tear down virtual machinesUse automation to provision and configure Network multiple virtual machines Package and distribute VM images
  • VagrantWhy use Vagrant?
  • User space Browser Editor Queue Other Music Server Server Web DB App IRC IM Server Server Server Operating System
  • No isolation
  • No isolationNo repeatability
  • No isolationNo repeatability No verification
  • User space Virtualized OS Browser Editor Web App DB Server Server Server IRC IM Operating System
  • Isolation
  • IsolationMirror production
  • Isolation Mirror productionTest Ops scripts with a free server
  • Isolation Mirror productionTest Ops scripts with a free server Faster onboarding
  • Isolation Mirror productionTest Ops scripts with a free server Faster onboarding Designers can do it, too!
  • VagrantDevOps
  • Goal: DevelopCookbooks/Modules to run in a VM and production.
  • Little extra effort. Big gain.Good practices.
  • Little extra effort. Big gain.Good practices.
  • Don’t assume EC2/RackSpace/MyCloudInc# Allow app servers to access DB-A INPUT -p tcp -s <%= node[:ec2][:local_ipv4] %> --dport <%= node[:mysql][:port] %> -j ACCEPT
  • Don’t assume EC2/RackSpace/MyCloudInc# Allow app servers to access DB-A INPUT -p tcp -s <%= local_ip(node) %> --dport <%= node[:mysql][:port] %> -j ACCEPT
  • Don’t assume EC2/RackSpace/MyCloudInc# Returns the local-network IP of a node# based on the environment.def local_ip(node) return “127.0.0.1” if in_vagrant? return node[:ec2][:local_ipv4] if in_ec2? raise “Unknown server environment.”end
  • Short-circuit Recipes/ManifestsINFO: Chef Run complete in 1442.890442 secondsINFO: Running report handlersINFO: Report handlers complete
  • Short-circuit Recipes/Manifests# Only install certain software when not# in Vagrant.if !in_vagrant? include_recipe “flume::node” include_recipe “kiip_monitoring::client” ...end
  • Short-circuit Recipes/ManifestsINFO: Chef Run complete in 946.418511 secondsINFO: Running report handlersINFO: Report handlers complete Not great, but I’ll take 50% speedups.
  • Flexible Configurationattributes = { :kiip_mongo => { :mount_ebs => false }, :kiip_web => { :app_source => "folder" }, ...}
  • Role Compositionrun_list => [ “role[base]”, “role[kiip_mongodb]”, “role[kiip_memcached]”, “role[kiip_web]”, “role[kiip_utility]”] Normally different servers. But no problem on one!
  • DevOps Zen
  • VagrantIs it battle tested?
  • vagrantup.comgithub.com/mitchellh/vagrant