SlideShare a Scribd company logo
The Modern Developer Toolbox 
Photo by https://www.flickr.com/photos/zergev/ 
Pablo Godel @pgodel 
https://joined.in/11798
Hi, I am Pablo.
Hi, I am Pablo. 
! 
@pgodel
The Modern Developer Toolbox
The Modern Developer Toolbox 
Modern?
The Modern Developer Toolbox
The Modern Developer Toolbox 
[root@prod] # vi index.php
The Modern Developer Toolbox 
Never stop ! 
improving
The Modern Developer Toolbox 
The Toolbox
The Modern Developer Toolbox 
Development environment
The Modern Developer Toolbox 
Development environment 
! 
Testing
The Modern Developer Toolbox 
Development environment 
! 
Testing 
! 
Debugging
The Modern Developer Toolbox 
Development environment 
! 
Testing 
! 
Debugging 
! 
Profiling
The Modern Developer Toolbox 
Development environment 
! 
Testing 
! 
Debugging 
! 
Profiling 
! 
Deployment
The Modern Developer Toolbox 
Development environment 
! 
Testing 
! 
Debugging 
! 
Profiling 
! 
Deployment 
! 
Logging
The Modern Developer Toolbox 
Development environment 
! 
Testing 
! 
Debugging 
! 
Profiling 
! 
Deployment 
! 
Logging 
! 
Monitoring
The Modern Developer Toolbox 
Development Environment
Development Environment 
Everything starts with a 
great development environment
Development Environment 
Choosing an OS
The Development Modern Developer Environment 
Toolbox 
Rule #1
The Development Modern Developer Environment 
Toolbox 
Rule #1: Stay close to Production
The Development Modern Developer Environment 
Toolbox 
Rule #2
The Development Modern Developer Environment 
Toolbox 
Rule #2: Ditch Windows
The Development Modern Developer Environment 
Toolbox 
Rule #3
The Development Modern Developer Environment 
Toolbox 
Rule #3: Don’t forget Rule #2
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox
The Development Modern Developer Environment 
Toolbox 
Automate your setup
The Development Modern Developer Environment 
Toolbox 
Automate your setup 
! 
#1 Store your dot-files in Git/GitHub
The Development Modern Developer Environment 
Toolbox 
Dot files 
.profile / .bash_profile / .bashrc 
.gitconfig 
.gitignores 
.ssh/config 
https://github.com/pgodel/dotfiles 
https://github.com/everzet/dotfiles
The Development Modern Developer Environment 
Toolbox 
Automate your setup 
! 
#2 Automate your software installation
The Development Modern Developer Environment 
Toolbox 
Homebrew! 
! 
• hhvm 
• wget 
• git 
• tmux 
• ssh-copy-id 
• brew-cask 
• ansible
The Modern Developer Toolbox 
Even .dmg’s! 
! 
$ brew cask install … 
! 
Development Environment 
• google-chrome 
• vagrant 
• virtualbox 
• iterm2 
• alfred 
• phpstorm 
! 
https://github.com/caskroom/homebrew-cask
The Development Modern Developer Environment 
Toolbox 
Installing PHP 
Run Linux natively / locally 
! 
• REMI repo for CentOS 
• PPAs for Ubuntu / Debian
The Development Modern Developer Environment 
Toolbox 
Installing PHP 
Run Linux on VPS / remote 
! 
• REMI repo for CentOS 
• PPAs for Ubuntu / Debian
The Development Modern Developer Environment 
Toolbox 
Installing PHP 
Mac OSX 
! 
• MAMP 
• Liip PHP installer
The Development Modern Developer Environment 
Toolbox 
Installing PHP 
Virtual Machine 
• VirtualBox / Parallels / VMware 
• Vagrant 
• Docker
The Development Modern Developer Environment 
Toolbox 
PHARS! 
! 
• Composer 
• PHPUnit 
• behat 
• WP-CLI 
• versionscan
The Development Modern Developer Environment 
Toolbox 
Vagrant! 
! 
• PuPHPet 
• Phansible
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Vagrant 
Host 
Vagrant 
VM VM VM 
Web 
DB 
Server 
Server 
App 
Server
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Docker 
Host 
Docker client 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Docker 
Host 
Docker client 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Docker 
Host 
Docker client 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Docker 
Host 
Docker client 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server 
Host 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server
ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox 
Docker 
Host 
Docker client 
C 
VM 
Web 
Server 
C C 
DB 
Server 
App 
Server 
Host 
C 
VM 
Web 
Server 
Host 
C C 
DB 
Server 
C C 
App 
Server 
C 
Web 
Server 
DB 
Server 
App 
Server 
Docker 
Kernel
The Development Modern Developer Environment 
Toolbox 
$ ansible-playbook -i inventories/dev  
playbook.yml -v -K 
https://github.com/pgodel/ansible-local-dev
The Development Modern Developer Environment 
Toolbox 
Use the right Editor/IDE for you
The Development Modern Developer Environment 
Toolbox 
Choose the right Editor/IDE for you! 
! 
• PHPStorm 
• Zend Studio 
• TextMate 
• Vim
The Development Modern Developer Environment 
Toolbox 
Choose the right Editor/IDE for you! 
! 
• PHPStorm! 
• Zend Studio 
• TextMate 
• Vim
The Development Modern Developer Environment 
Toolbox 
Choose the right Editor/IDE for you! 
! 
• PHPStorm! 
• Fast 
• Syntax highlighting with PHP 5.6 
• Git diffs and other actions 
• Breakpoints 
• and much more! 
! 
!
Development Environment 
Setting up SSH 
$ ssh-keygen -t dsa 
~/.ssh/id_dsa.pub 
! 
$ ssh-copy-id user@remote-host 
~/.ssh/authorized_keys 
~/.ssh/authorized_keys2 
! 
$ ssh-add
Development Environment 
Setting up SSH 
~/.ssh/config 
Host * 
ForwardAgent yes 
Port 22123 
! 
Host gh 
HostName github.com 
Port 22 
PreferredAuthentications publickey 
IdentityFile ~/.ssh/me_rsa
Development Environment 
Virtual Document Root 
UseCanonicalName Off 
! 
VirtualDocumentRoot /var/www/vhosts/%0/web 
! 
<Location /var/www/vhosts> 
AllowOverride All 
Options +FollowSymLinks 
</Location> 
example.com => /var/www/vhosts/example.com/web 
example2.com => /var/www/vhosts/example2.com/web
The Modern Developer Toolbox 
Testing
Testing 
! 
! 
• Unit testing with PHPUnit
Testing 
! 
! 
• Unit testing with PHPUnit 
• BDD with Behat
Testing 
! 
! 
• Unit testing with PHPUnit 
• BDD with Behat 
• Git hooks + php -l
Testing 
! 
! 
• Unit testing with PHPUnit 
• BDD with Behat 
• Git hooks + php -l 
• Jenkins
Testing 
! 
! 
• Unit testing with PHPUnit 
• BDD with Behat 
• Git hooks + php -l 
• Jenkins 
• Travis CI 
!
Testing 
! 
! 
• Unit testing with PHPUnit 
• BDD with Behat 
• Git hooks + php -l 
• Jenkins 
• Travis CI 
• JoliCI
! 
! 
Testing 
• phpmd / PHP Depend 
• PhpMetrics 
• SensioLabs Insight 
• Scrutinizer
The Modern Developer Toolbox 
Debugging
Debugging 
print_r($data);
LadyBug 
<?php 
$var = array( 
array( 
Debugging 
'name' => 'Raul', 
'age' => 29 
), 
array( 
'name' => 'John', 
'age' => 27 
) 
); 
! 
ladybug_dump($var)
LadyBug 
Debugging
Debugging 
XDebug + PHPStorm
The Development Modern Developer Environment 
Toolbox 
Debug CLI commands with PHPStorm 
! 
PRO TIP 
$ export  
XDEBUG_CONFIG=“idekey=PHPSTORM"
Debugging 
Symfony Developer Toolbar
Debugging 
Zend Studio + Zend Server + Z-Ray
The Modern Developer Toolbox 
Profiling
Profiling 
! 
! 
XDebug
Profiling 
! 
! 
XHProf + XHProf.io
Profiling 
! 
Commercial options 
! 
• Zend Server 
• SensioLabs Profiler (coming soon)
The Modern Developer Toolbox 
Deployment
Deployment 
• Capistrano (Ruby) / Capifony 
• Fabric (Python) 
• Idephix (PHP) 
• Magellanes (PHP) 
• Deployer (PHP) 
• Laravel / envoy (PHP) 
• Rocketeer (PHP) 
• Ansible (YAML)
Deployment 
Common steps
Deployment 
! 
! 
• Define hosts
Deployment 
! 
! 
• Define hosts 
• Define tasks / actions
Deployment 
! 
! 
• Define hosts 
• Define tasks / actions 
• Run process
Deployment 
! 
! 
• Define hosts 
• Define tasks / actions 
• Run process 
• Safe operation
Deployment 
! 
! 
• Define hosts 
• Define tasks / actions 
• Run process 
• Safe operation 
• Migrations
Deployment 
! 
! 
• Define hosts 
• Define tasks / actions 
• Run process 
• Safe operation 
• Migrations 
• Rollbacks
Deployment 
Deploying with
Deployment with Ansible 
! 
! 
Define hosts 
[webservers] 
foo.example.com 
bar.example.com 
www[01:50].example.com 
! 
[dbservers] 
one.example.com 
two.example.com 
three.example.com
Deployment with Ansible 
! 
! 
Define tasks / actions 
--- 
- hosts: webservers 
vars: 
http_port: 80 
max_clients: 200 
remote_user: root 
tasks: 
- name: ensure apache is at the latest version 
yum: pkg=httpd state=latest 
- name: write the apache config file 
template: src=/https/www.slideshare.net/srv/httpd.j2 dest=/etc/httpd.conf 
notify: 
- restart apache 
- name: ensure apache is running
Deployment with Ansible ! 
! 
Define tasks / actions 
- hosts: webservers 
roles: 
- { 
role: servergrove.symfony2, 
symfony2_project_root: /var/www/vhosts/ 
example.com/, 
symfony2_project_name: demo, 
symfony2_project_branch: master , 
symfony2_project_release: 1 
}
Deployment with Ansible 
! 
! 
Run process 
$ ansible-playbook -i inventories/servers  
playbook.yml -v
Deployment with Ansible 
! 
! 
Run process
Deployment 
Effing Package Management 
Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity. 
fpm -s dir -t rpm -n "webapp" -v 1.0 /var/www/webapp 
! 
fpm -s dir -t deb -a all -n webapp -v 1.0 /etc/apache2/ 
conf.d/my.conf /var/www/webapp 
https://github.com/jordansissel/fpm
The Modern Developer Toolbox 
Logging
Logging 
tail -f /var/log/*
Logging 
tail -f /var/log/* | grep “Fatal error”
Logging 
Logstash + ElasticSearch + Kibana 
App / Logstash 
App / Logstash App / Logstash 
Redis Logstash 
filter/processor 
ElasticSearch Kibana
Monolog 
Logging 
use MonologLogger; 
use MonologHandlerStreamHandler; 
! 
// create a log channel 
$log = new Logger('name'); 
$log->pushHandler(new StreamHandler('path/to/your.log', 
Logger::WARNING)); 
! 
// add records to the log 
$log->addWarning('Foo'); 
$log->addError('Bar');
Logging 
Monolog 
! 
• Rotates logs 
• Syslog / AMQP 
• Email / Chat servers 
• Redis / MongoDB / ElasticSearch 
• NullHandler 
• FingersCrossedHandler
Logstash 
Logging 
input { 
file { 
path => “/var/log/apache2/access_log” 
} 
} 
output { 
elasticsearch { 
host => localhost 
} 
}
Kibana 
Logging
The Modern Developer Toolbox 
Monitoring
Monitoring 
Measure everything!
Monitoring 
StatsD + Graphite + Grafana 
App 
App App 
StatsD Graphite 
Grafana
Monitoring 
StatsD + liuggio/statsd-php-client 
$ composer require liuggio/statsd-php-client:dev-master
Monitoring 
StatsD + liuggio/statsd-php-client 
$sender = new SocketSender(/*'localhost', 8126, 'udp'*/); 
! 
$client = new StatsdClient($sender); 
$factory = new StatsdDataFactory('LiuggioStatsdClientEntityStatsdData'); 
! 
// create the data with the factory 
$data[] = $factory->timing('usageTime', 100); 
$data[] = $factory->increment('visitor'); 
$data[] = $factory->decrement('click'); 
$data[] = $factory->gauge('gaugor', 333); 
$data[] = $factory->set('uniques', 765); 
! 
// send the data as array or directly as object 
$client->send($data);
Monitoring 
StatsD + liuggio/statsd-php-client 
$data[] = $factory->timing('usageTime', 100);! 
! 
// send the data as array or directly as object 
$client->send($data);
Monitoring 
StatsD + liuggio/statsd-php-client 
$data[] = $factory->increment('visitor');! 
! 
// send the data as array or directly as object 
$client->send($data);
Monitoring 
StatsD + liuggio/statsd-php-client 
$data[] = $factory->decrement('click');! 
! 
// send the data as array or directly as object 
$client->send($data);
Monitoring 
StatsD + liuggio/statsd-php-client 
$data[] = $factory->gauge('gaugor', 333);! 
! 
// send the data as array or directly as object 
$client->send($data);
Graphite 
Monitoring
Graphite 
Monitoring
Grafana 
Monitoring
Monitoring 
Apache Requests 
<Location /server-status> 
SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from .your_domain.com 
</Location> 
! 
ExtendedStatus On
Monitoring 
Apache Requests
Monitoring 
CPU / Memory / IO 
top
Monitoring 
IO 
iotop
The Modern Developer Toolbox 
https://www.flickr.com/photos/jaquiza
The Modern Developer Toolbox 
Questions!
The Modern Developer Toolbox 
! 
! 
! 
Thank you! ! 
Rate me please! 
! 
! 
https://joind.in/11798 
http://slideshare.net/pgodel 
@pgodel

More Related Content

What's hot (20)

PPTX
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
PDF
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Puppet
 
PDF
Django dev-env-my-way
Robert Lujo
 
ODP
ATDD with Behat and Selenium (LDNSE6)
Shashikant Jagtap
 
PDF
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Puppet
 
PDF
Open Source Tools for Leveling Up Operations FOSSET 2014
Mandi Walls
 
PDF
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Alessandro Nadalin
 
KEY
Perlbrew
Kang-min Liu
 
PDF
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
 
PDF
Towards Continuous Deployment with Django
Roger Barnes
 
KEY
Practical introduction to dev ops with chef
LeanDog
 
PDF
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
PDF
How to integrate front end tool via gruntjs
Bo-Yi Wu
 
PDF
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
Shengyou Fan
 
PDF
Gearman work queue in php
Bo-Yi Wu
 
PDF
Building a Drupal site with Git
dirtytactics
 
PDF
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
 
PPTX
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Baruch Sadogursky
 
PPTX
DevOps Hackathon - Session 1: Vagrant
Antons Kranga
 
PDF
Building a private CI/CD pipeline with Java and Docker in the cloud as presen...
Baruch Sadogursky
 
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Puppet
 
Django dev-env-my-way
Robert Lujo
 
ATDD with Behat and Selenium (LDNSE6)
Shashikant Jagtap
 
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Puppet
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Mandi Walls
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Alessandro Nadalin
 
Perlbrew
Kang-min Liu
 
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
 
Towards Continuous Deployment with Django
Roger Barnes
 
Practical introduction to dev ops with chef
LeanDog
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
How to integrate front end tool via gruntjs
Bo-Yi Wu
 
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
Shengyou Fan
 
Gearman work queue in php
Bo-Yi Wu
 
Building a Drupal site with Git
dirtytactics
 
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
 
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Baruch Sadogursky
 
DevOps Hackathon - Session 1: Vagrant
Antons Kranga
 
Building a private CI/CD pipeline with Java and Docker in the cloud as presen...
Baruch Sadogursky
 

Viewers also liked (20)

PPTX
Marama 3
PAOLA GIAROLI
 
PDF
Musicas cifradas bossa nova samba 01
Elvis Live
 
PDF
Media Platforms Emerge: 2004 onward - The rise of Embeddability
Nick Kellet
 
PPT
1960s shortened
Krista Leh
 
PPTX
Ingless
PAOLA GIAROLI
 
PPTX
God Is Holy
William Harris
 
PDF
Threat intelligence at the cloud
Or Katz
 
PDF
Hack In The Box (Dubai) 04172008
guesta84549
 
PPTX
Mapas conceptuales de solci thieroldt ♥
Solcita123
 
PPTX
Infosys
Santosh Laladiya
 
PPSX
Neo-noir: The Dark Side of Creative Writing
Michael Forman (Author/Photographer)
 
PDF
Zombies, Run! Transforming Fitness, Games & Story
Adrian Hon
 
PDF
Blue ocean strategy 3
Daniel
 
PPTX
Train a Social Workforce: How AT&T Trained Thousands of Employee Advocates
SocialChorus
 
PDF
Are you listening to your data? Chris Stanley Virtusa
John Colley
 
PDF
Verilog-HDL Tutorial (6)
Hiroki Nakahara
 
PPT
Work wants to be social (talk at Web 2 Expo 2010)
Rashmi Sinha
 
PPTX
Outline of How to Publish a Book
Guy Kawasaki
 
PPTX
QUEST/SmarterMeasure Learning Readiness Indicator Lunch & Learn Webinar Series
SmarterServices Owen
 
PDF
How we calculated the $ value of candidate experience and transformed the per...
LinkedIn Talent Solutions
 
Marama 3
PAOLA GIAROLI
 
Musicas cifradas bossa nova samba 01
Elvis Live
 
Media Platforms Emerge: 2004 onward - The rise of Embeddability
Nick Kellet
 
1960s shortened
Krista Leh
 
Ingless
PAOLA GIAROLI
 
God Is Holy
William Harris
 
Threat intelligence at the cloud
Or Katz
 
Hack In The Box (Dubai) 04172008
guesta84549
 
Mapas conceptuales de solci thieroldt ♥
Solcita123
 
Neo-noir: The Dark Side of Creative Writing
Michael Forman (Author/Photographer)
 
Zombies, Run! Transforming Fitness, Games & Story
Adrian Hon
 
Blue ocean strategy 3
Daniel
 
Train a Social Workforce: How AT&T Trained Thousands of Employee Advocates
SocialChorus
 
Are you listening to your data? Chris Stanley Virtusa
John Colley
 
Verilog-HDL Tutorial (6)
Hiroki Nakahara
 
Work wants to be social (talk at Web 2 Expo 2010)
Rashmi Sinha
 
Outline of How to Publish a Book
Guy Kawasaki
 
QUEST/SmarterMeasure Learning Readiness Indicator Lunch & Learn Webinar Series
SmarterServices Owen
 
How we calculated the $ value of candidate experience and transformed the per...
LinkedIn Talent Solutions
 
Ad

Similar to The Modern Developer Toolbox (20)

PPTX
Learn you some Ansible for great good!
David Lapsley
 
PDF
Evolution of deploy.sh
Leonid Mamchenkov
 
PDF
PHP Development Tools
Antony Abramchenko
 
PDF
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
PDF
Modern web dev_taxonomy
kevin_donovan
 
PDF
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot
 
PDF
Build & deploy PHP application (intro level)
Anton Babenko
 
PDF
infra-as-code
Itamar Hassin
 
PDF
Puppet for Sys Admins
Puppet
 
PDF
DevOps Bootcamp course resource (1)-1-99.pdf
AminulKarim2
 
PPTX
Warden @ Meet magento Romania 2021
alinalexandru
 
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
PDF
Modernize Your Drupal Development
Chris Tankersley
 
PDF
From Dev to DevOps
Agile Spain
 
PPTX
Devops
JyothirmaiG4
 
PDF
Instant LAMP Stack with Vagrant and Puppet
Patrick Lee
 
PDF
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
Wong Hoi Sing Edison
 
PPT
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Jeff Geerling
 
KEY
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
PDF
Deploying PHP Applications with Ansible
Orestes Carracedo
 
Learn you some Ansible for great good!
David Lapsley
 
Evolution of deploy.sh
Leonid Mamchenkov
 
PHP Development Tools
Antony Abramchenko
 
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
Modern web dev_taxonomy
kevin_donovan
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot
 
Build & deploy PHP application (intro level)
Anton Babenko
 
infra-as-code
Itamar Hassin
 
Puppet for Sys Admins
Puppet
 
DevOps Bootcamp course resource (1)-1-99.pdf
AminulKarim2
 
Warden @ Meet magento Romania 2021
alinalexandru
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Modernize Your Drupal Development
Chris Tankersley
 
From Dev to DevOps
Agile Spain
 
Devops
JyothirmaiG4
 
Instant LAMP Stack with Vagrant and Puppet
Patrick Lee
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
Wong Hoi Sing Edison
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Jeff Geerling
 
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
Deploying PHP Applications with Ansible
Orestes Carracedo
 
Ad

More from Pablo Godel (20)

PDF
SymfonyCon Cluj 2017 - Symfony at OpenSky
Pablo Godel
 
PDF
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Pablo Godel
 
PDF
DeSymfony 2017 - Symfony en OpenSky
Pablo Godel
 
PDF
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
Pablo Godel
 
PDF
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
Pablo Godel
 
PDF
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
Pablo Godel
 
PDF
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Pablo Godel
 
PDF
Lone StarPHP 2013 - Building Web Apps from a New Angle
Pablo Godel
 
PDF
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
Pablo Godel
 
PDF
Creating Mobile Apps With PHP & Symfony2
Pablo Godel
 
PDF
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
PDF
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
PDF
Soflophp 2013 - SysAdmin skills for PHP developers
Pablo Godel
 
PDF
Symfony2 and MongoDB - MidwestPHP 2013
Pablo Godel
 
PDF
Rock Solid Deployment of Web Applications
Pablo Godel
 
PDF
Codeworks'12 Rock Solid Deployment of PHP Apps
Pablo Godel
 
PDF
PFCongres 2012 - Rock Solid Deployment of PHP Apps
Pablo Godel
 
PDF
Symfony2 y MongoDB - deSymfony 2012
Pablo Godel
 
PDF
Declare independence from your it department sysadmin skills for symfony dev...
Pablo Godel
 
PDF
Symfony2 and MongoDB
Pablo Godel
 
SymfonyCon Cluj 2017 - Symfony at OpenSky
Pablo Godel
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Pablo Godel
 
DeSymfony 2017 - Symfony en OpenSky
Pablo Godel
 
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
Pablo Godel
 
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
Pablo Godel
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
Pablo Godel
 
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Pablo Godel
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Pablo Godel
 
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
Pablo Godel
 
Creating Mobile Apps With PHP & Symfony2
Pablo Godel
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
Soflophp 2013 - SysAdmin skills for PHP developers
Pablo Godel
 
Symfony2 and MongoDB - MidwestPHP 2013
Pablo Godel
 
Rock Solid Deployment of Web Applications
Pablo Godel
 
Codeworks'12 Rock Solid Deployment of PHP Apps
Pablo Godel
 
PFCongres 2012 - Rock Solid Deployment of PHP Apps
Pablo Godel
 
Symfony2 y MongoDB - deSymfony 2012
Pablo Godel
 
Declare independence from your it department sysadmin skills for symfony dev...
Pablo Godel
 
Symfony2 and MongoDB
Pablo Godel
 

Recently uploaded (20)

PPT
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
PPTX
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
PPTX
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
PDF
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PDF
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PDF
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
PPTX
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
PDF
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
PPTX
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PPTX
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
PPTX
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
PDF
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 

The Modern Developer Toolbox

  • 1. The Modern Developer Toolbox Photo by https://www.flickr.com/photos/zergev/ Pablo Godel @pgodel https://joined.in/11798
  • 2. Hi, I am Pablo.
  • 3. Hi, I am Pablo. ! @pgodel
  • 5. The Modern Developer Toolbox Modern?
  • 7. The Modern Developer Toolbox [root@prod] # vi index.php
  • 8. The Modern Developer Toolbox Never stop ! improving
  • 9. The Modern Developer Toolbox The Toolbox
  • 10. The Modern Developer Toolbox Development environment
  • 11. The Modern Developer Toolbox Development environment ! Testing
  • 12. The Modern Developer Toolbox Development environment ! Testing ! Debugging
  • 13. The Modern Developer Toolbox Development environment ! Testing ! Debugging ! Profiling
  • 14. The Modern Developer Toolbox Development environment ! Testing ! Debugging ! Profiling ! Deployment
  • 15. The Modern Developer Toolbox Development environment ! Testing ! Debugging ! Profiling ! Deployment ! Logging
  • 16. The Modern Developer Toolbox Development environment ! Testing ! Debugging ! Profiling ! Deployment ! Logging ! Monitoring
  • 17. The Modern Developer Toolbox Development Environment
  • 18. Development Environment Everything starts with a great development environment
  • 20. The Development Modern Developer Environment Toolbox Rule #1
  • 21. The Development Modern Developer Environment Toolbox Rule #1: Stay close to Production
  • 22. The Development Modern Developer Environment Toolbox Rule #2
  • 23. The Development Modern Developer Environment Toolbox Rule #2: Ditch Windows
  • 24. The Development Modern Developer Environment Toolbox Rule #3
  • 25. The Development Modern Developer Environment Toolbox Rule #3: Don’t forget Rule #2
  • 26. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox
  • 27. The Development Modern Developer Environment Toolbox Automate your setup
  • 28. The Development Modern Developer Environment Toolbox Automate your setup ! #1 Store your dot-files in Git/GitHub
  • 29. The Development Modern Developer Environment Toolbox Dot files .profile / .bash_profile / .bashrc .gitconfig .gitignores .ssh/config https://github.com/pgodel/dotfiles https://github.com/everzet/dotfiles
  • 30. The Development Modern Developer Environment Toolbox Automate your setup ! #2 Automate your software installation
  • 31. The Development Modern Developer Environment Toolbox Homebrew! ! • hhvm • wget • git • tmux • ssh-copy-id • brew-cask • ansible
  • 32. The Modern Developer Toolbox Even .dmg’s! ! $ brew cask install … ! Development Environment • google-chrome • vagrant • virtualbox • iterm2 • alfred • phpstorm ! https://github.com/caskroom/homebrew-cask
  • 33. The Development Modern Developer Environment Toolbox Installing PHP Run Linux natively / locally ! • REMI repo for CentOS • PPAs for Ubuntu / Debian
  • 34. The Development Modern Developer Environment Toolbox Installing PHP Run Linux on VPS / remote ! • REMI repo for CentOS • PPAs for Ubuntu / Debian
  • 35. The Development Modern Developer Environment Toolbox Installing PHP Mac OSX ! • MAMP • Liip PHP installer
  • 36. The Development Modern Developer Environment Toolbox Installing PHP Virtual Machine • VirtualBox / Parallels / VMware • Vagrant • Docker
  • 37. The Development Modern Developer Environment Toolbox PHARS! ! • Composer • PHPUnit • behat • WP-CLI • versionscan
  • 38. The Development Modern Developer Environment Toolbox Vagrant! ! • PuPHPet • Phansible
  • 39. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Vagrant Host Vagrant VM VM VM Web DB Server Server App Server
  • 40. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Docker Host Docker client C VM Web Server C C DB Server App Server
  • 41. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Docker Host Docker client C VM Web Server C C DB Server App Server
  • 42. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Docker Host Docker client C VM Web Server C C DB Server App Server
  • 43. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Docker Host Docker client C VM Web Server C C DB Server App Server Host C VM Web Server C C DB Server App Server
  • 44. ThDe eMvoeldoeprmn eDnetv Eenlovpireorn Tmooelnbtox Docker Host Docker client C VM Web Server C C DB Server App Server Host C VM Web Server Host C C DB Server C C App Server C Web Server DB Server App Server Docker Kernel
  • 45. The Development Modern Developer Environment Toolbox $ ansible-playbook -i inventories/dev playbook.yml -v -K https://github.com/pgodel/ansible-local-dev
  • 46. The Development Modern Developer Environment Toolbox Use the right Editor/IDE for you
  • 47. The Development Modern Developer Environment Toolbox Choose the right Editor/IDE for you! ! • PHPStorm • Zend Studio • TextMate • Vim
  • 48. The Development Modern Developer Environment Toolbox Choose the right Editor/IDE for you! ! • PHPStorm! • Zend Studio • TextMate • Vim
  • 49. The Development Modern Developer Environment Toolbox Choose the right Editor/IDE for you! ! • PHPStorm! • Fast • Syntax highlighting with PHP 5.6 • Git diffs and other actions • Breakpoints • and much more! ! !
  • 50. Development Environment Setting up SSH $ ssh-keygen -t dsa ~/.ssh/id_dsa.pub ! $ ssh-copy-id user@remote-host ~/.ssh/authorized_keys ~/.ssh/authorized_keys2 ! $ ssh-add
  • 51. Development Environment Setting up SSH ~/.ssh/config Host * ForwardAgent yes Port 22123 ! Host gh HostName github.com Port 22 PreferredAuthentications publickey IdentityFile ~/.ssh/me_rsa
  • 52. Development Environment Virtual Document Root UseCanonicalName Off ! VirtualDocumentRoot /var/www/vhosts/%0/web ! <Location /var/www/vhosts> AllowOverride All Options +FollowSymLinks </Location> example.com => /var/www/vhosts/example.com/web example2.com => /var/www/vhosts/example2.com/web
  • 53. The Modern Developer Toolbox Testing
  • 54. Testing ! ! • Unit testing with PHPUnit
  • 55. Testing ! ! • Unit testing with PHPUnit • BDD with Behat
  • 56. Testing ! ! • Unit testing with PHPUnit • BDD with Behat • Git hooks + php -l
  • 57. Testing ! ! • Unit testing with PHPUnit • BDD with Behat • Git hooks + php -l • Jenkins
  • 58. Testing ! ! • Unit testing with PHPUnit • BDD with Behat • Git hooks + php -l • Jenkins • Travis CI !
  • 59. Testing ! ! • Unit testing with PHPUnit • BDD with Behat • Git hooks + php -l • Jenkins • Travis CI • JoliCI
  • 60. ! ! Testing • phpmd / PHP Depend • PhpMetrics • SensioLabs Insight • Scrutinizer
  • 61. The Modern Developer Toolbox Debugging
  • 63. LadyBug <?php $var = array( array( Debugging 'name' => 'Raul', 'age' => 29 ), array( 'name' => 'John', 'age' => 27 ) ); ! ladybug_dump($var)
  • 65. Debugging XDebug + PHPStorm
  • 66. The Development Modern Developer Environment Toolbox Debug CLI commands with PHPStorm ! PRO TIP $ export XDEBUG_CONFIG=“idekey=PHPSTORM"
  • 68. Debugging Zend Studio + Zend Server + Z-Ray
  • 69. The Modern Developer Toolbox Profiling
  • 70. Profiling ! ! XDebug
  • 71. Profiling ! ! XHProf + XHProf.io
  • 72. Profiling ! Commercial options ! • Zend Server • SensioLabs Profiler (coming soon)
  • 73. The Modern Developer Toolbox Deployment
  • 74. Deployment • Capistrano (Ruby) / Capifony • Fabric (Python) • Idephix (PHP) • Magellanes (PHP) • Deployer (PHP) • Laravel / envoy (PHP) • Rocketeer (PHP) • Ansible (YAML)
  • 76. Deployment ! ! • Define hosts
  • 77. Deployment ! ! • Define hosts • Define tasks / actions
  • 78. Deployment ! ! • Define hosts • Define tasks / actions • Run process
  • 79. Deployment ! ! • Define hosts • Define tasks / actions • Run process • Safe operation
  • 80. Deployment ! ! • Define hosts • Define tasks / actions • Run process • Safe operation • Migrations
  • 81. Deployment ! ! • Define hosts • Define tasks / actions • Run process • Safe operation • Migrations • Rollbacks
  • 83. Deployment with Ansible ! ! Define hosts [webservers] foo.example.com bar.example.com www[01:50].example.com ! [dbservers] one.example.com two.example.com three.example.com
  • 84. Deployment with Ansible ! ! Define tasks / actions --- - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: pkg=httpd state=latest - name: write the apache config file template: src=/https/www.slideshare.net/srv/httpd.j2 dest=/etc/httpd.conf notify: - restart apache - name: ensure apache is running
  • 85. Deployment with Ansible ! ! Define tasks / actions - hosts: webservers roles: - { role: servergrove.symfony2, symfony2_project_root: /var/www/vhosts/ example.com/, symfony2_project_name: demo, symfony2_project_branch: master , symfony2_project_release: 1 }
  • 86. Deployment with Ansible ! ! Run process $ ansible-playbook -i inventories/servers playbook.yml -v
  • 87. Deployment with Ansible ! ! Run process
  • 88. Deployment Effing Package Management Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity. fpm -s dir -t rpm -n "webapp" -v 1.0 /var/www/webapp ! fpm -s dir -t deb -a all -n webapp -v 1.0 /etc/apache2/ conf.d/my.conf /var/www/webapp https://github.com/jordansissel/fpm
  • 89. The Modern Developer Toolbox Logging
  • 90. Logging tail -f /var/log/*
  • 91. Logging tail -f /var/log/* | grep “Fatal error”
  • 92. Logging Logstash + ElasticSearch + Kibana App / Logstash App / Logstash App / Logstash Redis Logstash filter/processor ElasticSearch Kibana
  • 93. Monolog Logging use MonologLogger; use MonologHandlerStreamHandler; ! // create a log channel $log = new Logger('name'); $log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); ! // add records to the log $log->addWarning('Foo'); $log->addError('Bar');
  • 94. Logging Monolog ! • Rotates logs • Syslog / AMQP • Email / Chat servers • Redis / MongoDB / ElasticSearch • NullHandler • FingersCrossedHandler
  • 95. Logstash Logging input { file { path => “/var/log/apache2/access_log” } } output { elasticsearch { host => localhost } }
  • 97. The Modern Developer Toolbox Monitoring
  • 99. Monitoring StatsD + Graphite + Grafana App App App StatsD Graphite Grafana
  • 100. Monitoring StatsD + liuggio/statsd-php-client $ composer require liuggio/statsd-php-client:dev-master
  • 101. Monitoring StatsD + liuggio/statsd-php-client $sender = new SocketSender(/*'localhost', 8126, 'udp'*/); ! $client = new StatsdClient($sender); $factory = new StatsdDataFactory('LiuggioStatsdClientEntityStatsdData'); ! // create the data with the factory $data[] = $factory->timing('usageTime', 100); $data[] = $factory->increment('visitor'); $data[] = $factory->decrement('click'); $data[] = $factory->gauge('gaugor', 333); $data[] = $factory->set('uniques', 765); ! // send the data as array or directly as object $client->send($data);
  • 102. Monitoring StatsD + liuggio/statsd-php-client $data[] = $factory->timing('usageTime', 100);! ! // send the data as array or directly as object $client->send($data);
  • 103. Monitoring StatsD + liuggio/statsd-php-client $data[] = $factory->increment('visitor');! ! // send the data as array or directly as object $client->send($data);
  • 104. Monitoring StatsD + liuggio/statsd-php-client $data[] = $factory->decrement('click');! ! // send the data as array or directly as object $client->send($data);
  • 105. Monitoring StatsD + liuggio/statsd-php-client $data[] = $factory->gauge('gaugor', 333);! ! // send the data as array or directly as object $client->send($data);
  • 109. Monitoring Apache Requests <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from .your_domain.com </Location> ! ExtendedStatus On
  • 111. Monitoring CPU / Memory / IO top
  • 113. The Modern Developer Toolbox https://www.flickr.com/photos/jaquiza
  • 114. The Modern Developer Toolbox Questions!
  • 115. The Modern Developer Toolbox ! ! ! Thank you! ! Rate me please! ! ! https://joind.in/11798 http://slideshare.net/pgodel @pgodel