SlideShare a Scribd company logo
1 of 57
In the Desert
Without a Camel
A devops journey, with very little Perl
Steve Scaffidi
stephen@scaffidi.net
irc nick: hercynium
YAPC::NA
June 8, 2015
Salt Lake City, Utah
The person who approved
this talk has been sacked.
"It's not got much Perl in it!"
☺
"Senior Software Engineer"
Data Warehouse Team
at TripAdvisor
My job title...
What people think I do:
What I actually spend most of my time doing:
The Best Tool for the Job
The Best Tool for the Job
Not Always
The Best Tool for the Job
Not Always
...but sometimes it is.
Get on with it!
Y U NO PERL?
redhat/centos
Solutions?
perlbrew
http://perlbrew.pl
curl -L http://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew install perl-5.22.0
perlbrew use perl-5.22.0
Insanely Simple:
perlbrew install-cpanm
For your convenience:
perlbrew install perl-5.12.5
perlbrew use perl-5.12.5
Go ahead, have another!
perlbrew use 5.22
cpan Moose # wait a little bit
perlbrew use 5.12.5
cpan Moose # wait a bit longer
cpan Dist::Zilla # go out for lunch
Share with others:
export PERLBREW_ROOT=/opt/perlbrew
export PERLBREW_HOME=/tmp/.perlbrew
# put perlbrew perls under /opt to
# share with multiple users
curl -L http://install.perlbrew.pl | bash
cpanm
fu-redhat
curl -L https://cpanmin.us |
perl - App::cpanminus
WARNING
local::lib + perlbrew = pain
cpanminus++
carton
# On your development environment
> cat cpanfile
requires 'Plack', '0.9980';
requires 'Starman', '0.2000';
> carton install
> git add cpanfile cpanfile.snapshot
> git commit -m "add Plack and Starman"
# Other developer's machine,
# or on a deployment box
> carton install
> carton exec starman -p 8080 myapp.psgi
(blatantly copied from carton's perldoc)
Chicken & Egg?
cpanm to the rescue!
miyagawa++
x 1,000,000
"Please sir, I want
some more"
fatpack
# "myscript" is using cpan deps that need to
# be installed by the user first...
fatpack pack myscript.pl > myscript.packed.pl
# "myscript.packed" can just be run by anybody
chmod +x myscript.packed.pl
./myscript.packed.pl
use the cpan to develop,
but don't make your users
have to
Caveat: Pure-perl code
*only*
mst++
PAR
Caveat: complex, but
very powerful.
But can pack XS modules and even perl
itself into a single-file executable!!!!!!
audreyt++
Generating OS
Packages
opt-perl.spec
https://gist.github.com/hercynium/7865220
what about modules?
fpm
https://github.com/jordansissel/fpm/wiki
https://github.com/jordansissel/fpm/wiki/Perl-Packaging-With-FPM
fpm -t rpm -s cpan 
--cpan-perl-lib-path 
/opt/perl-5.16.1/site_perl/5.16.1 
Some::Module
Works with lots of
languages!
Segue
NoPerl
Bow to the JVM
Snakes and Jewels
But... Systems
Administration!
Y U NO PERL?
No Habla Perl
"DevOps"
"DevOps"
Systems Administration
unless ( Ops::Engineer->can("write_code") ) {
warn "Keep your filthy hands off my servers";
}
OutOfMemoryError
Thank You!

More Related Content

What's hot

No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No LearningOlaf Alders
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)Olaf Alders
 
How did puppet change our system's life?
How did puppet change our system's life?How did puppet change our system's life?
How did puppet change our system's life?Hung Phung Dac
 
LCA2014 - Introduction to Go
LCA2014 - Introduction to GoLCA2014 - Introduction to Go
LCA2014 - Introduction to Godreamwidth
 
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP ModeEmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP ModeMatt Ray
 
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Puppet
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging PipelineMaciej Pasternacki
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Puppet
 
Docker security configuration
Docker security configurationDocker security configuration
Docker security configurationJohn Kinsella
 
Testando JavaScript com Spock
Testando JavaScript com SpockTestando JavaScript com Spock
Testando JavaScript com SpockIsmael
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Vincenzo Barone
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsTomislav Raseta
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPhil Zimmerman
 
Cake Php 101 Brownbag
Cake Php 101 BrownbagCake Php 101 Brownbag
Cake Php 101 BrownbagFinster
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year laterChristian Ortner
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Mavenjuvenxu
 
The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014Triquanta
 

What's hot (20)

No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No Learning
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)
 
How did puppet change our system's life?
How did puppet change our system's life?How did puppet change our system's life?
How did puppet change our system's life?
 
LCA2014 - Introduction to Go
LCA2014 - Introduction to GoLCA2014 - Introduction to Go
LCA2014 - Introduction to Go
 
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP ModeEmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging Pipeline
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013
 
Docker security configuration
Docker security configurationDocker security configuration
Docker security configuration
 
Testando JavaScript com Spock
Testando JavaScript com SpockTestando JavaScript com Spock
Testando JavaScript com Spock
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
 
Build & test Apache Hawq
Build & test Apache Hawq Build & test Apache Hawq
Build & test Apache Hawq
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With Notes
 
Cake Php 101 Brownbag
Cake Php 101 BrownbagCake Php 101 Brownbag
Cake Php 101 Brownbag
 
Etsy chef-workflow
Etsy chef-workflowEtsy chef-workflow
Etsy chef-workflow
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014
 

Similar to In the desert, without a camel

Docker for data science
Docker for data scienceDocker for data science
Docker for data scienceCalvin Giles
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to productionSean Hess
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionJoshua Thijssen
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerJan Collijs
 
Ruby v cpp_preso
Ruby v cpp_presoRuby v cpp_preso
Ruby v cpp_presojessicard
 
Puppet at janrain
Puppet at janrainPuppet at janrain
Puppet at janrainPuppet
 
Virtualenv
VirtualenvVirtualenv
VirtualenvWEBdeBS
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012Walter Heck
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItPuppet
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as codeJulian Simpson
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPANJeen Lee
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreJulien Pivotto
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Walter Heck
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012OlinData
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in DjangoKevin Harvey
 

Similar to In the desert, without a camel (20)

Docker for data science
Docker for data scienceDocker for data science
Docker for data science
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to production
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
 
Ruby v cpp_preso
Ruby v cpp_presoRuby v cpp_preso
Ruby v cpp_preso
 
Puppet at janrain
Puppet at janrainPuppet at janrain
Puppet at janrain
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymore
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
 

Recently uploaded

Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...ppkakm
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsmeharikiros2
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 

Recently uploaded (20)

Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 

In the desert, without a camel

Editor's Notes

  1. Good morning, and thanks for coming! So, since this is a Perl conference, and you're all presumably here to learn about Perl, and I'll bet some of you actually use Perl at work, I want to be right up-front with you: This talk is going to be rather light on Perl. I know, I know... it's shocking!
  2. I apologize in advance for any disappointment and lay the blame firmly on the conference organizers for approving my talk in the first place. But in all seriousness, this talk is going to be light on Perl and a bit heavier on ops/devops, big data, and how I decide what the right tool for the job is in various situations.
  3. But despite that, I'm gonna talk about how I've managed to work some Perl into a place where almost nobody else knows any Perl, and everybody's opinion of it is based on what they've read on HackerNews.
  4. So, allow myself to introduce... myself. Blah Blah, tripadvisor, ops/sysadmin/etc...
  5. I've been working for TripAdvisor for the last three years on the "Data Warehouse" team. We manage a Hadoop-based infrastructure for a variety of business-critical functions, and keeping up with the company's needs and the ever-growing volume of data is really a lot like...
  6. ...herding elephants. And because Hadoop is ridiculously big and complicated, it turns out that pulling this off requires a whole lot of discipline, knowledge and...
  7. Well, some days are a lot more difficult than others...
  8. But, in my day-to-day work, I'm a systems administrator, and I build a whole lot of tools to automate things, collect info, and help other people use the complex systems my team manages. And guess what?
  9. Perl is not always the best tool for the job.
  10. But sometimes it is, and really, it's a judgement call.
  11. But we'll talk about that later. Let's get to the perl.
  12. There are lots of perfectly valid reasons people avoid using Perl, but they're all things that can be resolved. Just off the top of my head - no C compiler available for XS-based CPAN modules, worry about breakages in CPAN dependencies, not wanting to require users to have to even use CPAN or not having access to the public CPAN over the internet.
  13. And finally, running on a redhat-based system with all the issues that comes with. You know - ancient versions of perl, missing core modules from the base install, and other kinds of fuckery that causes all sorts of stupid problems.
  14. But every one of these issues can be resolved! Let's start with the simplest fixes.
  15. Perlbrew is made of rainbows and awesome-sauce. It contains ninja monkeys that fly out your screen and make you a superhero in mere minutes. What is it? It's a tool that can download and compile whatever version of perl you want on your local system, and you can switch between multiple builds of perl with a simple command. It's insanely easy to use, and insanely useful.
  16. So, once this is done, what you've got is a brand-spanking new Perl 5.22, installed under your home directory, with it's bin dir added to your $PATH. Furthermore, if you now run the cpan command, the modules you install will be installed using and in that installation of perl.
  17. One extra step I heartily recommend: install the "special" perlbrew cpanminus which makes it available for all perlbrew-installed perls, without having to first install it with the standard cpan client. I'll talk a little bit more about cpanminus later.
  18. With these commands, you've just downloaded, compiled, installed and "activated" a fresh build of Perl 5.12.5... It's got its own lib dirs and whatnot, and so if you use the cpan command to install some modules after running the "perlbrew use" command, they will be build and installed with and in that perl's lib dirs.
  19. So, wanna make sure the latest version of Moose still works on multiple versions of Perl? Simple!
  20. Of course, it's not always the right solution to have each user install their own builds of perl in their home directories. If you want to put brewed perls in a place where multiple users can get to them, you can do that! And by the way, putting builds of perl under /opt is something I'll say more about shortly.
  21. So, you can learn a whole lot more about perlbrew on its site, and on IRC, and in it's docs on the CPAN. Let's talk about cpanminus. Cpanminus is an alternative to perl's longtime-default cpan command, and it brings some *really* nice things to the table.
  22. First of all, on a minimal redhat install, if you're using a version that even *has* perl installed any more, guess what's missing from the system perl? The CPAN command. *facepalm* But, not all is lost.
  23. If, for some reason, you can't use perlbrew, or get your sysadmin to install a newer, unfucked version of perl somewhere like under /opt or /usr/local, You can install cpanminus into your home directory with a one-liner, just like perlbrew. What cpanminus does is it bootstraps itself using local::lib, and that's important to know for this reason.
  24. This is one of the reasons that perlbrew has its own special cpanm install. cpanminus uses local::lib internally to be able to install stuff under your home dir. And perlbrew uses it, too. And they can end up messing on each other because the default local::lib that cpanm creates is for whichever perl you're running at the moment, while perlbrew uses one for each version of perl. What can happen is you end up mixing libs intended for different versions of perl into the same lib dir and if that happens, you're gonna have a bad time.
  25. But despite that gotcha, local::lib is really useful stuff and has been a part of my standard toolkit, both with and without cpanminus. The bottom line is that cpanminus has a lot of advantages over the standard cpan client that make it worthwhile. Being able to do a one-liner install, and being contained in a single file, you can take run it from anywhere and with a little care use it in conjunction with perlbrew, local::lib, and lots of other things, like...
  26. carton! If perlbrew is ninja-powered awesome sauce, then carton is rainbow unicorns delivering magically delicious vegan bacon directly into your mouth on-demand. Think about that for a moment. Mmmmmmm....
  27. Carton allows you to specify your exact module dependencies in a plain text file, including the versions you need. It can then bundle all the dist tarballs into a directory with your project, then you can send it all to your users who no longer need to have to install the deps from the cpan, and risk getting the wrong versions or having no internet access or whatever else could go wrong, like running redhat and not having a cpan client...
  28. But, wait! Doesn't the end user need carton installed in order to install and run your carton-powered code?
  29. Not at all! Turns out, cpanminus recently gained the ability to work with carton-packaged code! Before, you'd have to instruct the users to first install carton into a local lib, and run it from there, but now you can just drop a copy of cpanm into your project's source tree and tell them to run that.
  30. Seriously, this is awesome, and the author of both cpanminus and carton is the freakin' man. Tatsuhiko Miyagawa is just an incredible hacker and ironically, as I wrote this slide during the lightning talks, somebody asked the room to give him props because he's just that good.
  31. So, ready to move on? Good. Let's talk about one more amazing powertool, which is used by cpanm and I use it all the time...
  32. If you positively, absolutely, must kill ever mother-loving dependency in the room, accept no substitutes. What is does is simple to describe - it figures out all the pure-perl dependencies in your program, and packs them and your program into a single file that your users can just execute.
  33. And it's also simple to use. Really. just. like. that. If you look at cpanminus' source code on github, you'll see that is uses quite a few cpan dependencies. But if you take a look at the cpanm script that you run on your system, it's all in one file, thanks to fatpack.
  34. In short it lets you do this.
  35. There's this one caveat, though, and it's something that can be a deal-breaker for some things, but it's just a decision you have to make. Fatpack is dead simple to use, and the value it delivers keeps it right at the top of my toolbox.
  36. By the way, more props must be given, as the original author of both local::lib and App::fatpacker is Matt S. Trout, who you may also know for countless other pieces of awesome code out there. He's here at YAPC, and if you meet him, make sure to buy him a beer or four.
  37. Since I mentioned fatpack, I think I have to mention par. I have to say, I didn't make any other slides on using it because I wrote them this morning with no wifi, and I have to look at the docs every time I use it, but it can do things fatpack simply can't. By the way, if you look for this on the CPAN, you want PAR in all caps. I'm not sure what the other ones are.
  38. The most basic usage isn't difficult at all, but since it's capable of packing compiled binary modules and even perl itself, there's a lot of complexity under the hood, and some of that leaks out into the docs and options, but when you need a single executable and fatpacker won't do, par is there to save the day. Also, it can do some absolutely amazing things, like packing compiled code for multiple platforms into the same binary...
  39. And IIRC, this was originally written by audrey tang, who is one of the most amazing hackers ever, and one of the nicest people you'll ever meet. If I might gush for a moment, to be that brilliant and that nice, and write such amazing code, she's one of my heroes.
  40. So, there's a bunch of different ways to run different versions of perl on a given system, and allow users to consistently build your programs with the same dependencies that you developed with, and even eliminate the need for any installation whatsoever, but sometimes, what you really want is to create RPMs or .deb packages. First, let me tell you how I create rpms to install newer versions of perl on the system that won't interfere with the system's default perl.
  41. Talk about HQT a little, about how some users were on CentOS 5 with ancient perl that Mojolicious didn't run on, and that they can get this from github, along with instructions on how to use it.
  42. For cpan modules, or even perl modules you've writen in-house there are a bunch of ways you can build OS packages, but the one I've fallen in love with is called "fpm"
  43. FPM stands for "Fine" package management if you're being polite, but officially it's "Effing" And it supports building packages of perl modules really, really well.
  44. And like magic, you will have an RPM of that module dist that will install to the perl that is installed under /opt/perl-5.16.1
  45. And it works with more than perl. It does ruby, python and can ever make an RPM from the contents of a directory.
  46. So if there's time, let me talk about systems admin for a bit.
  47. Over my career, in order to work effectively with others, I have become a "NoPerl" hacker - Not Only Perl. I use lots of languages from day to day, everything - shell, awk, SQL, ruby, java, python... and I choose what I'm working with based on several different factors.
  48. TripAdvisor is almost entirely a Java shop. The site itself runs on on Java and Scala, and almost every piece of software in the Hadoop ecosystem is written in Java or some other language that runs on the JVM.
  49. Now, Perl is a fantastic tool for systems administration, but over the years, python, and ruby have both gotten better and gained a whole lot of popularity, and fewer and fewer people I work with know any perl, so I don't use it very much these days.
  50. But that's the site, right? What about actual systems administration? Java kinda sucks for that, right? And it does. Scripting is what sysadmins want and need, and instead of Perl, we usually use python, ruby, and of course shell scripts.
  51. So, why no Perl? It's a great glue language! It's pre-installed on every system out there! It's fast, flexible, dynamic, it's got the CPAN! Everybody knows at least a little perl, right? There's almost 400 people right in this building who all know Perl! Extrapolate that out and that that's like 17 billion people in the world who know perl!
  52. But we all know that's both not true, and not entirely relevant. Over the last 5-6 years, I've discovered fewer and fewer people who know Perl well enough to use it effectively, and more and more who can do Python and Ruby. In the last couple years, I've met people who are otherwise great programmers, but they don't know any perl whatsoever, and have never even written a one-liner.
  53. So, I want to know - what does "DevOps" mean to you? Anybody?
  54. Personally, I think it's just a buzzword, and it's simply got too many different meanings to different people. It's kind of mess. But personally, I prefer the one where it means making ops part of the development process, and treating ops work as development work.
  55. So here's my not-so-humble opinion. If you work as a sysadmin and you can't write basic scripts, use version control, and at least partially decipher the code the software you use is written in, you need to hit the books, because a competent ops engineer *has* to be able to do these things to manage anything more complicated than a LAMP stack.
  56. So, I ran out of time to make more slides, but I can talk for hours...