• Save
DevOps and Chef improve your life
Upcoming SlideShare
Loading in...5
×
 

DevOps and Chef improve your life

on

  • 1,495 views

Quick intro to DevOps techniques and methodologies and configuration management with Chef

Quick intro to DevOps techniques and methodologies and configuration management with Chef

Statistics

Views

Total Views
1,495
Views on SlideShare
1,055
Embed Views
440

Actions

Likes
1
Downloads
0
Comments
0

4 Embeds 440

http://juanvicenteherrera.eu 428
http://www.linkedin.com 5
http://translate.googleusercontent.com 5
http://webcache.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution License

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

DevOps and Chef improve your life DevOps and Chef improve your life Presentation Transcript

  • Devops and Infrastructure Automation with Chef
  • DevOpsDev who? Ops what?Dont bother me dude
  • It works on my machine...Developers We need mongo 2.2.1 BTW the deployment is due tomorrow
  • Sysadmins We don’t support that versionThe architecture doesn’t match our network, deployment, or security model We weren’t consultedabout security / monitoring / backup / provisioning
  • WE SHOULD TALK!
  • Current situationThe damn developers are not aware aboutthe impact of his source code in theproduction systems.They have a optimized toolkit for developquicklyThey run the code locally in his laptop evenif there are testing/staging/integration envsto try code
  • The key for get business objectivesDevelopers contribute value to the businessimplementing functional requirementsSysadmins contribute value to the businessimplementing security, stability and performanceBoth objectives crush because new funcionalitiesinvolve assume risksSysadmins try to decrease risks avoiding changesand release deployments are delayed and finally a lotof changes are done simultaneously
  • Operations objective is not onlymaintain a safety, stable and fasterenvironmentAnother important objective is enablebusiness objectivesBusiness requires changes and changesare the root of the instability so..
  • RecommendationsImplication since first steps of development➔Configuration is code, separated of the application code➔Common and integrated tools between teams➔Abstract administration➔Continuous integration➔Infrastructure and provisioning automated➔Shared KPI➔
  • ToolsVersion management➔DNS➔Inventory➔Monitoring➔Reports➔Configuration management➔Incidents management➔Deployment➔
  • Automation• Infrastructure• Provisioning• Deployment
  • DevOpsCombined interest of developers and operations in➔ Processes➔ Communication➔ AutomationClose cooperation based on common tools
  • CommunicationConfidencePositive attitudeAvoid to blame others
  • ChefOpen Source Provisioning Tool➔ Configures your servers➔ Cookbooks & recipes➔ Ruby DSL
  • Chef Solo
  • Chef Server
  • Common TerminologyThe following are some Chef terms that will be helpful to know before weStart.Node: A managed machine. When the Chef client runs, it executes theconfiguration for a node.Client: An authorized user of the Chef API. In most cases, every machine youmanage will be represented by: a) a client for logging into the API and b) anode configuration to apply. Administrators and the web interface are alsoclients.Cookbook: A collection of attributes, recipes, custom resources, anddefinitions to configure a certain application or service. For instance you willfind shared cookbooks available on the web for NTP, Apache httpd, MySQL,nginx, and other common services.Recipe: A list of resources that should be applied to a node. Recipes arewritten in normal Ruby extended by the Chef resource domain-specificlanguage. This gives you the power of anything you can do in Ruby(conditionals, using gems, etc.) while not having to be verbose in managingthe resources that make up your configuration.
  • Chef componentsKnifeKnife is the tool you will use as a system administrator to interact withthe server most often, especially taking cookbooks and other customconfigurations and loading them into the server for distribution to clientsChef ClientThe Chef client runs on the servers you are managing. It gathersinformationabout itself using Ohai, synchronizes the cookbooks it needs from the Chefserver, compiles the collection of resources that make up the configuration,and then “converges” the resources it has compiled with the state of thecurrent machineWeb-UIChef includes a web interface that lets you browse cookbooks and browseandedit nodes, roles, and clients.Server/APIThe Chef server sits at the center of the system. The Chef server exposesa RESTful API, which is used by the other components in the system. Yourmanaged nodes, knife, and the web interface are all clients of the API..
  • Ohai Detects data about your local machine & OS➔ Kernel stats➔ Modules & drivers➔ Programming Languages➔ Users➔ Filesystems➔ Network configuration● Populates attributes and makes them available for Chef
  • Configuration● JSON: /etc/chef/solo.json Run Chef Solo
  • Resources ● The steps that make up a recipe● Implemented by providers, depending on your platform● (in this case apt-get, rpm, zypper or MacPorts)
  • ● Script Resource Supports bash, csh, Ruby, Python, and Perl
  • Deploying● Deploy resource● Compatible with Capistrano layout● Supports Capistrano hooks via deploy/hook_name.rb
  • Deploying● Available in all Resources● Common methods:action➔provider➔Supports➔ignore_failure➔not_if / only_if➔notifies➔subscribes➔
  • Notifications● Notifiy other resources to execute an action ● Default notification happens at the end of the Chef run,
  • RolesComposites of recipes and attributes➔➔ Nodes can have multiple roles
  • Role Definition● $ cat roles/webserver.rb
  • Chef Server Knife● CLI tool for Chef-Server:➔ List nodes, cookbooks & attributes➔ Assign roles➔ Upload new cookbooks
  • Two Phases of Chef1) CompileLoad all attributes & recipes and build list ofactions/dependenciesCompute attribute tree2) RunRandom Ruby Code runs hereActually execute the resources
  • Chef Experiences Great way to automate provisioning of servers➔Infrastructure as code➔Understandable by dev & ops➔ Easy to extend➔ Easy to integrate in managementframework➔(SSH, mcollective, Nanite, ..)➔Ignore Chef-Server when starting toplay with Chef(dev envs)
  • Devops Rocks!
  • Author● Juan Vicente Herrera Ruiz de Alejo● http://juanvicenteherrera.eu● @jvicenteherrera
  • References● http://www.slideshare.net/appdynamics/call-of- duty-dev-ops● http://www.slideshare.net/therobot/que- demonios-es-eso-de-devops-y-porquedebera- interesarme