• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
DevOps for PHP
 

DevOps for PHP

on

  • 4,205 views

PHP

PHP

Statistics

Views

Total Views
4,205
Views on SlideShare
4,110
Embed Views
95

Actions

Likes
12
Downloads
61
Comments
0

3 Embeds 95

http://www.scoop.it 92
http://a0.twimg.com 2
http://paper.li 1

Accessibility

Categories

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

    DevOps for PHP DevOps for PHP Presentation Transcript

    • DevOps for PHPFlorian Anderiasch I October 28, 2011 © Mayflower GmbH 2010
    • Developer Ex-Admin DevOp?„I rant a lot“@anderiaschstay in touch! Mayflower GmbH I 2
    • Do you know DevOps? Mayflower GmbH I 3
    • „These are cool tools!“ =>„Im doing DevOps now!“ Mayflower GmbH I 4
    • Its not about the tools! Mayflower GmbH I 5
    • Its aboutthe culture! Mayflower GmbH I 6
    • Mayflower GmbH I 7
    • Coming from WebOpsWe often dont have much operations personnel. LAMP stack is our home Mayflower GmbH I 8
    • Learn from each other! Work together! Mayflower GmbH I 9
    • From ops to dev: repeatabilitychange management monitoring provisioning Mayflower GmbH I 10
    • From dev to ops: unit tests version control agile methods Mayflower GmbH I 11
    • Why DevOps? Mayflower GmbH I 12
    • How manyreleases per year? Mayflower GmbH I 13
    • Some people do up to 60 per day Mayflower GmbH I 14
    • Were strivingfor one per day. For now. Mayflower GmbH I 15
    • Weve come a long way Mayflower GmbH I 16
    • Development in the dark ages Mayflower GmbH I 17
    • Golden ImageVMware/KVM Mayflower GmbH I 18
    • Copying files over FTP to a shared host Mayflower GmbH I 19
    • rsync /vcs checkout Mayflower GmbH I 20
    • Mayflower GmbH I 21
    • Hardware= Software= Configuration Mayflower GmbH I 22
    • OK, tools are important. Mayflower GmbH I 23
    • Bad news:they love ruby Mayflower GmbH I 24
    • Good news:There are DSLs Mayflower GmbH I 25
    • But in the end: It works Mayflower GmbH I 26
    • Going from: do X or Y Towards:I want state Z Mayflower GmbH I 27
    • Dont reinvent the wheel. Mayflower GmbH I 28
    • puppet modulesapache, nginx, varnish php, ruby, tomcatmysql, pgsql, memcache Mayflower GmbH I 29
    • Monitoring Mayflower GmbH I 30
    • http://www.puppetlabs.com/puppet/related-projects/dashboard/ Mayflower GmbH I 31
    • Mayflower GmbH I 32
    • Vagrant I know how I want my servers to look like Lets replicate that for development as close as possible Mayflower GmbH I 33
    • Vagrant Based on VirtualBox automatically create VMs puppet or chef included Mayflower GmbH I 34
    • Vagrant Fully versioned configs On-Demand creation Developer Self Service Mayflower GmbH I 35
    • Getting startedin 3 easy steps Mayflower GmbH I 36
    • Manage your setup with Vagrant and VeeWee(needs VirtualBox and Ruby) Mayflower GmbH I 37
    • $ gem install vagrant$ gem install veewee$ vagrant basebox templates$ vagrant basebox define natty ubuntu-11.04-server-amd64$ vagrant basebox build natty$ vagrant basebox export natty$ vagrant box add natty natty.box Mayflower GmbH I 38
    • http://vagrantbox.es Mayflower GmbH I 39
    • $ gem install vagrant $ vagrant box add maverick64 http://mathie-vagrant-boxes.s3.amazonaws.com/maverick64.box $ mkdir maverick_demo $ cd maverick_demo $ vagrant init maverick64 $ vagrant up $ vagrant sshvagrant@maverick64:~$ Mayflower GmbH I 40
    • Manage yourconfiguration Mayflower GmbH I 41
    • Mayflower GmbH I 42
    • Chef or Puppet Mayflower GmbH I 43
    • - Configuration as Code- Client-only or Client-Server setup- backed by companies- officially supported by Amazon- tried and tested- good documentation- good, vibrant communities Mayflower GmbH I 44
    • - Chef is ruby code, puppet has a DSL- puppet has the bigger community- puppet has more documentation- but chef is catching up- puppet: europe, chef: USA- chef is more flexible- if you puppet, you dont know ruby and vice versa Mayflower GmbH I 45
    • - both know current configuration- you define your nodes (servers)- lots of community cookbooks/modules- easy to extend- templates- providers as platform abstractions (e.g. apt-get/ports/yum) Mayflower GmbH I 46
    • Theres no „better“ tool. But we prefer puppet. Less Ruby ;) Mayflower GmbH I 47
    • user { florian: ensure => present, uid => 507, gid => admin, shell => /bin/bash, home => /home/florian, managehome => true,} Mayflower GmbH I 48
    • user „florian“ do username „florian“ password „$1$P$WXmqrQEVj88fVTHevErxq.“ shell „/bin/bash“ system true supports :manage_home => trueend Mayflower GmbH I 49
    • Back to Vagrant Mayflower GmbH I 50
    • Vagrant::Config.run do |config| config.vm.box = „natty“end Mayflower GmbH I 51
    • $ cat VagrantfileVagrant::Config.run do |config| config.vm.provision :puppet, :module_path =>„modules“ do |puppet| puppet.manifests_path = „manifests“ puppet.manifest_file = „development.pp“ end config.vm.define :web do |web_config| web_config.vm.box = „natty“ web_config.vm.host_name = „webserver01“ web_config.vm.network „33.33.33.10“ web_config.vm.forward_port „http“,80,8080 web_config.vm.port „ssh“,22,2222 web_config.vm.share_folder „v-data“,“/srv/www“,“../silex-demo“ endend Mayflower GmbH I 52
    • $ cat manifests/development.ppimport „classes/*“node „webserver01“ { include web}node „dbserver01“ { include db}node „ciserver01“ { include ci} Mayflower GmbH I 53
    • $ cat manifests/classes/web.ppclass web inherits basenode { include apache include apache::php apache::vhost { silex-demo.local: port => 80, docroot => /srv/www/docroot, } package { [mysql-client,php5-cli,...]: ensure => present, }} Mayflower GmbH I 54
    • $ cat manifests/classes/ci.ppclass ci inherits basenode { include apache include apache::php exec { pear-autodiscover: command => /usr/bin/pear config-set auto_discover 1, } package{ [pear.phpunit.de/PHP_CodeBrowser,...]: ensure => latest, provider => pear, require => Exec[pear-autodiscover], }} Mayflower GmbH I 55
    • Make the configurationpart of your source code Mayflower GmbH I 56
    • .|-- application|-- data|-- docs|-- library|-- public|-- scripts| |-- jobs| |-- build| -- configuration| |-- Vagrantfile| |-- manifests| -- modules|-- temp-- tests Mayflower GmbH I 57
    • Why did I do that? Mayflower GmbH I 58
    • Simple Failsafe Fast SetupRepeatable ConsistentSelf-Service Mayflower GmbH I 59
    • No more golden images! Mayflower GmbH I 60
    • No more USB sticks! Mayflower GmbH I 61
    • Just one directory in your vcs Mayflower GmbH I 62
    • Machine Life Cycle Management: Foreman Mayflower GmbH I 63
    • A frontend for puppetShows the system inventory Create new machines Provisioning Mayflower GmbH I 64
    • Mayflower GmbH I 65
    • Mayflower GmbH I 66
    • I want more! Like 20+ Mayflower GmbH I 67
    • McCloudwrapper around Vagrant and Fog transparent local & cloud usage Mayflower GmbH I 68
    • I want more! Like 500... Mayflower GmbH I 69
    • mCollective ssh-for-loop on steroids fast management for loads of serversuses puppet/facter, MQ-based Mayflower GmbH I 70
    • $ mc-package -W "architecture=x86" status apache *[ ==================================> ] 10 / 10host01.example.com version = apache-2.2.9-7host02.example.com version = apache-2.2.9-7host03.example.com version = apache-2.2.9-7host04.example.com version = apache-2.2.9-7host05.example.com version = apache-2.2.9-7host06.example.com version = apache-2.2.9-7host07.example.com version = apache-2.2.9-7host08.example.com version = apache-2.2.9-7host09.example.com version = apache-2.2.9-7host10.example.com version = apache-2.2.9-7---- package agent summary ----Nodes: 10 / 10Versions: 10 * 0.25.5-1.el5Elapsed Time: 1.03 s Mayflower GmbH I 71
    • DevOps@Mayflower Mayflower GmbH I 72
    • 1-2 „admins“ per team Mayflower GmbH I 73
    • Operations andDevelopment Mayflower GmbH I 74
    • Working hand in handwith company admins Mayflower GmbH I 75
    • Got root? Yes. Mayflower GmbH I 76
    • 1+n puppetmaster 1 central n teams Mayflower GmbH I 77
    • Example setup: puppetmaster 10 developer VMs Jenkins4x Staging (eucalyptus) 4x Live (Amazon) Mayflower GmbH I 78
    • More tools: gitoriouseucalyptus cloud proxmox Mayflower GmbH I 79
    • In the works: VagrantScrum => KanbanPuppet + Nagios Mayflower GmbH I 80
    • Questions? Mayflower GmbH I 81
    • Thanks for listening! Contact Florian Anderiasch florian.anderiasch@mayflower.de +49 89 242054 1134 @anderiasch Mayflower GmbH Mannhardtstrasse 629.10.11 80538 München Mayflower GmbH 82
    • Images Domo-Kun(5) http://www.hawaiikawaii.net/2011/domo-kun-wallpaper-on-my-desktop/Domo-Kun(6), Nina Helmer, CC-BY-NC-ND http://www.flickr.com/photos/origami_potato/3242174542/Clouds (21), John Mueller, CC-BY-NC-ND http://www.flickr.com/photos/johnmueller/52621490/ Domo-Kun (23) http://i572.photobucket.com/albums/ss163/xxLoveorDie54xx/OMG-Its-Domo-kun.jpg puppet-dashboard (31) http://puppetlabs.com/puppet/related-projects/dashboard/ Mayflower GmbH I 83