SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
OpsTools
with Perl
 Hokkaido.pm #7
   2012/05/12
      riywo
Self Introduction

Ryosuke IWANAGA

a.k.a. riywo(りーお)

DeNA(2009∼)

 Mobage Server-side

 Ops-Engi / DBA / Manager
Acknowledgement

Thanks for JPA and Hokkaido.pm :)

 地域PM向け講師派遣支援プログラム

   http://japan.perlassociation.org/
   services/send-a-monger
But...
Am I a Perl Monger?
I’m not a Programer
  Mobage uses Perl heavily but I have
  never written the business logic...
But, I read Perl heavily
  Because I should cope with all system
  trouble including application bugs ;P
I wrote some operation tools with Perl
  And I also use some Perl tools
But...
Am I a Perl Monger?

So...
I’ll try to talk about my knowledge, thought,
and tools as much as possible
しょぼくてごめんなさい><
Perl Ops-Tools
 Introduction
kazeburo-ware
http://blog.nomadscafe.jp/
        @kazeburo
st
              ca
            re
     Fo
    d
    u
lo
C




        http://www.slideshare.net/kazeburo/introduction-to-cloudforecast-yapcasia-2010-tokyo
CloudForecast
Server Resource Collecting/Monitoring
Easy install
  git clone & cpanm --installdeps .
  SNMP / RRDs is needed
LightWeight - about 5,000 lines (*.pm)
WAF: Shirahata.pm
See also
  リソースモニタリングツール「CloudForecast」入門 - As a Futurist...
  ( http://blog.riywo.com/2011/02/27/043646 )
s   t
               ca
            re
        Fo
     th
    w
ro
G




        http://blog.nomadscafe.jp/2011/12/growthforecast.html
        http://blog.nomadscafe.jp/2012/02/growthforecast1json.html
        http://d.hatena.ne.jp/tagomoris/20120218/1329558305
GrowthForecast
API and Graph Render of RRDTool
Easy install
  git clone & cpanm --installdeps .
  RRDs is needed
LightWeight - about 1,800 lines (*.pm)
WAF: Kossy.pm
See also
  GrowthForecastというグラフ表示ツールで る話 - blog.nomadscafe.jp
  ( http://blog.nomadscafe.jp/2011/12/growthforecast.html )
**Alien::RRDtool**
RRDs is not CPAN module...
Alien::RRDtool Install rrdtool as CPAN module
  extlib/lib/perl5/{archname}/RRDs.pm
  extlib/lib/perl5/auto/share/dist/Alien-RRDtool/
Especially useful for perlbrew
* Developed by gfx
See also
  Alien::RRDtool - RRDtoolをCPANから入れる - Perl Advent Calendar
  Japan 2011 Hacker Track( http://perl-users.jp/articles/advent-
  calendar/2011/hacker/2 )
chase-tail
chase-tail
$ tail -f error_log | chase-tail -
l 10 -t various_error
One sheet perl script
  Highlight some keywords
  Detect fast flooding of log
See also                               @hirose31
  垂れ流されるログのおしりを追いかける - (ひ)メモ( http://
  d.hatena.ne.jp/hirose31/20120120/1327025989 )
App::Ikachan
App::Ikachan
$ curl -F channel=#yappo -F
message=oppai http://hoge.com/
notice
HTTP API of IRC posting
  use it from any languages
Easy install (git clone & cpanm)      @Yappo
See also
  YappoLogs: App::Ikachan - 様々なサーバのバッチ処理の結果等を
  IRC のチャンネルに通知するサーバ( http://blog.yappo.jp/yappo/
  archives/000760.html )
Percona Toolkit
Percona Toolkit
Mixed tools - Maartkit and Aspersa
 Almost all tools are written in Perl
System utility / MySQL Ops                    @Percona
 “pt-query-digest” is quite efficient for
 performance tuning of MySQL server
See also
 Percona Toolkit - Percona Software( http://www.percona.com/
 software/percona-toolkit/ )
Touryo
“Touryo” is configuration
   management tool
 I needed a Configuration Management Tool
   Chef is good but difficult to customize
 So, I started to think a plan of Touryo
   Simple and Lightweight
   Testable
   able to write DSL in Perl freely
How to write DSL in
       Perl?

I didn’t know it X(

I asked gfx(@__gfx__) who is a great Perl
Monger and works at DeNA
use strict;     [dsl.pl]
use warnings;
                 test {
Hoge->do_test;       my $hoge = shift;
                     print "Hello $hoge!n";
                 };
#---------------------
package Hoge;

my $func;
sub Hoge::test(&) {
    my $block = shift;
    $func = $block;
}

sub do_test {
    package Hoge;
    do "dsl.pl";
    $func->("DSL");
}
What can Touryo do?
                                 $ touryo test web01
            web01
      crontab        apache                      FAIL?
                                  $ touryo run web01
       sysctl        fastcgi                                     admin:
                                                                 touryo
       rpms            app
game1:web
                                  - “touryo test host”
                                    - check the state of the host
       db01             db02        - correctly installed?
      crontab          crontab      - correctly configured?
       sysctl           sysctl
       rpms             rpms      - “touryo run host”
       mysql                        - setup to the “correct” state
                        mysql
 game1:
db:master
                       backup     -> Then, what is the “correct” state?
                 game1:
                db:backup
How to define the “correct” state? (1)
                                  Touryo config
            web01                  role: game1
                                     blueprint:
      crontab        apache
                                       - crontab
       sysctl        fastcgi           - sysctl
                                       - rpms
       rpms            app
                                   role: game1:web     role: game1:db
game1:web
                                     blueprint:          blueprint:
                                       - apache            - mysql

       db01                            - fastcgi       role: game1:db:backup
                        db02           - app             blueprint:
      crontab          crontab                             - backup
       sysctl           sysctl
                                 admin:
       rpms             rpms     touryo   - Touryo use “blueprint” config
       mysql            mysql               - means what should be installed
 game1:                                   - The config defined by “role”
                       backup
db:master
                 game1:
                                            - should be defined the role of hosts
                db:backup                   - inherited searching
                                              - separated by comma
What is the “blueprint”?
                                       crontab blueprint
                                      blueprint/crontab/root.tx
             web01                    0 <: $cron_hour :> * * * /path/to/command
       crontab       apache           blueprint/crontab/blueprint.pl
                                                                                  admin:
                                                                                  touryo
        sysctl       fastcgi          bootstrap {
                                         my $c = shift;
        rpms           app               $c->add_attribute({
                                           cron_hour => 5,
 game1:web
                                           cron      => 'root.tx',
                                         });
- blueprint locate the directory      };
          db01blueprint name
  - named the
                           db02
         crontab                      test {
- contain “blueprint.pl”crontab          my $c = shift;
           sysctl
  - Perl DSL for Touryo sysctl           is_diff $c->sudo_ssh->crontab,
  - able to use templaterpms engine              $c->template('cron')->content;
           rpms                          done_testing;
    - Text::Xslate::Syntax::Kolon     };
           mysql            mysql
    - using “attribute” valuables
    game1:
  -db:master               backup
    have other useful functions       run {
                    game1:               my $c = shift;
    - sudo_ssh, template, crontab
                   db:backup             $c->sudo_ssh->crontab($c->template('cron'));
    - etc...                          };
What is the “attribute”?
                                      blueprint/crontab/root.tx
             web01                    0 <: $cron_hour :> * * * /path/to/command
                                                                                  admin:
       crontab       apache           blueprint/crontab/blueprint.pl              touryo
                                      bootstrap {
        sysctl       fastcgi             my $c = shift;
                                         $c->add_attribute({
        rpms           app                 cron_hour => 5,
 game1:web                                 cron      => 'root.tx',
                                         });
                                      };
- “attribute” can be used to
          db01            db02
change the behavior of test/run
                                      default rendering
         crontab         crontab      0 5 * * * /path/to/command
  - changing logic, template, etc..
           sysctl          sysctl
- overwriting of “attribute”          If defined attribute on
  - bootstrap
           rpms            rpms       the Touryo Config ...
  - role config                        Touryo Config
           mysql           mysql      role: game1:web
    - defined for the role
    game1:                backup        attribute:
  -db:masterconfig
    node                                  cron_hour: 9
                   game1:
    - defined for the node(host)
                  db:backup           0 9 * * * /path/to/command
How to define the “correct” state? (2)
                                  Touryo config
            web01
                                   role: game1
     crontab       apache
                                     blueprint:       attribute:
      sysctl       fastcgi             - crontab        somaxconn: 1024
                                       - sysctl
      rpms           app
                                       - rpms
game1:web   cron_hour: 9
            somaxconn: 10240       role: game1:web
            fcgi_proc: 100           blueprint:       attribute:
                                       - apache         cron_hour: 9
                                       - fastcgi        somaxconn: 10240
            web02                      - app            fcgi_proc: 100
      crontab      apache
       sysctl      fastcgi        node: web02
       rpms          app              blueprint:      attribute:
                               admin:   - git           fcgi_proc: 10
game1:web             git      touryo
            cron_hour: 9            - You can vary correct “blueprint” and
            somaxconn: 10240        “attribute” by Touryo config
            fcgi_proc: 10
                                      - role config and node config
Lightweight
/Testable/Freedom
find lib/ -name "*.pm" | xargs cat | wc -l

  about 1500 (including html templates)

Like test scripts of Perl Software, you can
test the servers’ configuration

you can write anything on blueprint.pl

  Conversely you have to write anything
Other Features
in terms of Programming
 use Amon2
   easy to develop Web Interface and CLI
 use TAP::Parser to get the test result
   test function uses Test::More
 use IPC::Cmd and “ssh” / “sudo ssh”
   easy to configure with .ssh/config or others
 blueprint dependance resolving
   easy to cascade the config
What language
should I use?
There are many
    languages
script / compile
  Perl,Ruby,Python,PHP / C,C++,Java
procedural / OO / functional
  Perl,C / Java,Ruby / Scala,Haskell
popular / minority
  ???(religious problem...)
My Thought
You can use any languages you like
  Engineer have to treat multi languages
Development speed / Maintenance cost
  They are usually trade-off
  Popular LLs are often suited for both
    Simple / Light / Thin / Useful Modules
    Everyone can understand it easily
      Perl/Ruby/Python are similar
I ♡ Perl

Fastest to develop for me
 I am used to Perl because DeNA use Perl
 There are many Perl Mongers around :)
   colleague and friends
CPAN has many useful modules
 long history and super hackers
Finally...
DeNA ♡ Engineers
We need more powerful engineers
We use Perl and other languages
  Ruby/JavaScript/C/C++/Java/Objective-C
  SocialGame/Platform/SDK/Data mining
Or let’s make very useful tools with me :)
  Server Ops/Database Admin/Network
If you are interested in us, pleeeeeeeeease
contact me or DeNA staffs!
  hirose31, gfx, hidek, zigorou, nekokak...
Thanks!
           http://blog.riywo.com
          http://twitter.com/riywo

Thanks for JPA, @kazeburo, @hirose31, @Yappo, @Percona,
                 and All Perl Mongers!

Weitere ähnliche Inhalte

Was ist angesagt?

Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REXSaewoong Lee
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
Puppet at janrain
Puppet at janrainPuppet at janrain
Puppet at janrainPuppet
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricksbcoca
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of MakefileNakCheon Jung
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabricandymccurdy
 
Ansible fest Presentation slides
Ansible fest Presentation slidesAnsible fest Presentation slides
Ansible fest Presentation slidesAaron Carey
 
Ember background basics
Ember background basicsEmber background basics
Ember background basicsPhilipp Fehre
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmMasahiro Nagano
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With RpmMartin Jackson
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menujtimberman
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebookguoqing75
 
Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 

Was ist angesagt? (20)

Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Puppet at janrain
Puppet at janrainPuppet at janrain
Puppet at janrain
 
What is nodejs
What is nodejsWhat is nodejs
What is nodejs
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricks
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
 
Ansible fest Presentation slides
Ansible fest Presentation slidesAnsible fest Presentation slides
Ansible fest Presentation slides
 
DevOps with Fabric
DevOps with FabricDevOps with Fabric
DevOps with Fabric
 
Ember background basics
Ember background basicsEmber background basics
Ember background basics
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapm
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With Rpm
 
Puppet Camp 2012
Puppet Camp 2012Puppet Camp 2012
Puppet Camp 2012
 
Jmx capture
Jmx captureJmx capture
Jmx capture
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menu
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 

Andere mochten auch

Plack::Request with Encoding
Plack::Request with EncodingPlack::Request with Encoding
Plack::Request with Encodingmoznion
 
Google trends to_irc
Google trends to_ircGoogle trends to_irc
Google trends to_ircrarere
 
PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416Yoshihiro Sasaki
 
理解したつもりになるGit入門
理解したつもりになるGit入門理解したつもりになるGit入門
理解したつもりになるGit入門Yoshihiro Sasaki
 
Takao.mt 2013
Takao.mt 2013Takao.mt 2013
Takao.mt 2013moznion
 
テーマ「最適化」
テーマ「最適化」テーマ「最適化」
テーマ「最適化」technocat
 
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うYAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うmoznion
 
YAPCレポートの舞台裏
YAPCレポートの舞台裏YAPCレポートの舞台裏
YAPCレポートの舞台裏Masahiro Honma
 
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopmGames::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopm鉄次 尾形
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 
テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」technocat
 
CPAN/便利モジュール
CPAN/便利モジュールCPAN/便利モジュール
CPAN/便利モジュールYoshihiro Sasaki
 
変数、リファレンス
変数、リファレンス変数、リファレンス
変数、リファレンスcharsbar
 
Perl 非同期プログラミング
Perl 非同期プログラミングPerl 非同期プログラミング
Perl 非同期プログラミングlestrrat
 

Andere mochten auch (20)

Plack::Request with Encoding
Plack::Request with EncodingPlack::Request with Encoding
Plack::Request with Encoding
 
Google trends to_irc
Google trends to_ircGoogle trends to_irc
Google trends to_irc
 
Asset Pipeline for Perl
Asset Pipeline for PerlAsset Pipeline for Perl
Asset Pipeline for Perl
 
PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416
 
理解したつもりになるGit入門
理解したつもりになるGit入門理解したつもりになるGit入門
理解したつもりになるGit入門
 
YAPC::AsiaとHokkaido.pm
YAPC::AsiaとHokkaido.pmYAPC::AsiaとHokkaido.pm
YAPC::AsiaとHokkaido.pm
 
Takao.mt 2013
Takao.mt 2013Takao.mt 2013
Takao.mt 2013
 
Currying in perl
Currying in perlCurrying in perl
Currying in perl
 
テーマ「最適化」
テーマ「最適化」テーマ「最適化」
テーマ「最適化」
 
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うYAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
 
YAPCレポートの舞台裏
YAPCレポートの舞台裏YAPCレポートの舞台裏
YAPCレポートの舞台裏
 
Using Dancer
Using DancerUsing Dancer
Using Dancer
 
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopmGames::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Use Carton
Use CartonUse Carton
Use Carton
 
テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」
 
CPAN/便利モジュール
CPAN/便利モジュールCPAN/便利モジュール
CPAN/便利モジュール
 
変数、リファレンス
変数、リファレンス変数、リファレンス
変数、リファレンス
 
Perl 非同期プログラミング
Perl 非同期プログラミングPerl 非同期プログラミング
Perl 非同期プログラミング
 
cpanfile
cpanfilecpanfile
cpanfile
 

Ähnlich wie "Ops Tools with Perl" 2012/05/12 Hokkaido.pm

Introduction to cloudforecast
Introduction to cloudforecastIntroduction to cloudforecast
Introduction to cloudforecastMasahiro Nagano
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationAndrew Hutchings
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in RustInfluxData
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Halil Kaya
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2While42
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
Practical Operation Automation with StackStorm
Practical Operation Automation with StackStormPractical Operation Automation with StackStorm
Practical Operation Automation with StackStormShu Sugimoto
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsMichael Zhang
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugginglibfetion
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newYiwei Ma
 

Ähnlich wie "Ops Tools with Perl" 2012/05/12 Hokkaido.pm (20)

Introduction to cloudforecast
Introduction to cloudforecastIntroduction to cloudforecast
Introduction to cloudforecast
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free Migration
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
glance replicator
glance replicatorglance replicator
glance replicator
 
Practical Operation Automation with StackStorm
Practical Operation Automation with StackStormPractical Operation Automation with StackStorm
Practical Operation Automation with StackStorm
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 

Mehr von Ryosuke IWANAGA

"I want to use Fluentd" Fluentd Casual Talks LT
"I want to use Fluentd" Fluentd Casual Talks LT"I want to use Fluentd" Fluentd Casual Talks LT
"I want to use Fluentd" Fluentd Casual Talks LTRyosuke IWANAGA
 
English Casual 2012/05/10
English Casual 2012/05/10English Casual 2012/05/10
English Casual 2012/05/10Ryosuke IWANAGA
 
#bphbqpstudy2012 LT riywo
#bphbqpstudy2012 LT riywo#bphbqpstudy2012 LT riywo
#bphbqpstudy2012 LT riywoRyosuke IWANAGA
 
qpstudy#5 懇親会LT riywo
qpstudy#5 懇親会LT riywoqpstudy#5 懇親会LT riywo
qpstudy#5 懇親会LT riywoRyosuke IWANAGA
 
tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1Ryosuke IWANAGA
 

Mehr von Ryosuke IWANAGA (7)

"I want to use Fluentd" Fluentd Casual Talks LT
"I want to use Fluentd" Fluentd Casual Talks LT"I want to use Fluentd" Fluentd Casual Talks LT
"I want to use Fluentd" Fluentd Casual Talks LT
 
English Casual 2012/05/10
English Casual 2012/05/10English Casual 2012/05/10
English Casual 2012/05/10
 
20120127 LDeNA LT riywo
20120127 LDeNA LT riywo20120127 LDeNA LT riywo
20120127 LDeNA LT riywo
 
#bphbqpstudy2012 LT riywo
#bphbqpstudy2012 LT riywo#bphbqpstudy2012 LT riywo
#bphbqpstudy2012 LT riywo
 
qpstudy#5 懇親会LT riywo
qpstudy#5 懇親会LT riywoqpstudy#5 懇親会LT riywo
qpstudy#5 懇親会LT riywo
 
tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1
 
Tsukuba.R#4
Tsukuba.R#4Tsukuba.R#4
Tsukuba.R#4
 

Kürzlich hochgeladen

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Kürzlich hochgeladen (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

"Ops Tools with Perl" 2012/05/12 Hokkaido.pm

  • 1. OpsTools with Perl Hokkaido.pm #7 2012/05/12 riywo
  • 2. Self Introduction Ryosuke IWANAGA a.k.a. riywo(りーお) DeNA(2009∼) Mobage Server-side Ops-Engi / DBA / Manager
  • 3. Acknowledgement Thanks for JPA and Hokkaido.pm :) 地域PM向け講師派遣支援プログラム http://japan.perlassociation.org/ services/send-a-monger
  • 4. But... Am I a Perl Monger? I’m not a Programer Mobage uses Perl heavily but I have never written the business logic... But, I read Perl heavily Because I should cope with all system trouble including application bugs ;P I wrote some operation tools with Perl And I also use some Perl tools
  • 5. But... Am I a Perl Monger? So... I’ll try to talk about my knowledge, thought, and tools as much as possible しょぼくてごめんなさい><
  • 9. st ca re Fo d u lo C http://www.slideshare.net/kazeburo/introduction-to-cloudforecast-yapcasia-2010-tokyo
  • 10. CloudForecast Server Resource Collecting/Monitoring Easy install git clone & cpanm --installdeps . SNMP / RRDs is needed LightWeight - about 5,000 lines (*.pm) WAF: Shirahata.pm See also リソースモニタリングツール「CloudForecast」入門 - As a Futurist... ( http://blog.riywo.com/2011/02/27/043646 )
  • 11. s t ca re Fo th w ro G http://blog.nomadscafe.jp/2011/12/growthforecast.html http://blog.nomadscafe.jp/2012/02/growthforecast1json.html http://d.hatena.ne.jp/tagomoris/20120218/1329558305
  • 12. GrowthForecast API and Graph Render of RRDTool Easy install git clone & cpanm --installdeps . RRDs is needed LightWeight - about 1,800 lines (*.pm) WAF: Kossy.pm See also GrowthForecastというグラフ表示ツールで る話 - blog.nomadscafe.jp ( http://blog.nomadscafe.jp/2011/12/growthforecast.html )
  • 13. **Alien::RRDtool** RRDs is not CPAN module... Alien::RRDtool Install rrdtool as CPAN module extlib/lib/perl5/{archname}/RRDs.pm extlib/lib/perl5/auto/share/dist/Alien-RRDtool/ Especially useful for perlbrew * Developed by gfx See also Alien::RRDtool - RRDtoolをCPANから入れる - Perl Advent Calendar Japan 2011 Hacker Track( http://perl-users.jp/articles/advent- calendar/2011/hacker/2 )
  • 15. chase-tail $ tail -f error_log | chase-tail - l 10 -t various_error One sheet perl script Highlight some keywords Detect fast flooding of log See also @hirose31 垂れ流されるログのおしりを追いかける - (ひ)メモ( http:// d.hatena.ne.jp/hirose31/20120120/1327025989 )
  • 17. App::Ikachan $ curl -F channel=#yappo -F message=oppai http://hoge.com/ notice HTTP API of IRC posting use it from any languages Easy install (git clone & cpanm) @Yappo See also YappoLogs: App::Ikachan - 様々なサーバのバッチ処理の結果等を IRC のチャンネルに通知するサーバ( http://blog.yappo.jp/yappo/ archives/000760.html )
  • 19. Percona Toolkit Mixed tools - Maartkit and Aspersa Almost all tools are written in Perl System utility / MySQL Ops @Percona “pt-query-digest” is quite efficient for performance tuning of MySQL server See also Percona Toolkit - Percona Software( http://www.percona.com/ software/percona-toolkit/ )
  • 21. “Touryo” is configuration management tool I needed a Configuration Management Tool Chef is good but difficult to customize So, I started to think a plan of Touryo Simple and Lightweight Testable able to write DSL in Perl freely
  • 22. How to write DSL in Perl? I didn’t know it X( I asked gfx(@__gfx__) who is a great Perl Monger and works at DeNA
  • 23. use strict; [dsl.pl] use warnings; test { Hoge->do_test; my $hoge = shift; print "Hello $hoge!n"; }; #--------------------- package Hoge; my $func; sub Hoge::test(&) { my $block = shift; $func = $block; } sub do_test { package Hoge; do "dsl.pl"; $func->("DSL"); }
  • 24.
  • 25. What can Touryo do? $ touryo test web01 web01 crontab apache FAIL? $ touryo run web01 sysctl fastcgi admin: touryo rpms app game1:web - “touryo test host” - check the state of the host db01 db02 - correctly installed? crontab crontab - correctly configured? sysctl sysctl rpms rpms - “touryo run host” mysql - setup to the “correct” state mysql game1: db:master backup -> Then, what is the “correct” state? game1: db:backup
  • 26. How to define the “correct” state? (1) Touryo config web01 role: game1 blueprint: crontab apache - crontab sysctl fastcgi - sysctl - rpms rpms app role: game1:web role: game1:db game1:web blueprint: blueprint: - apache - mysql db01 - fastcgi role: game1:db:backup db02 - app blueprint: crontab crontab - backup sysctl sysctl admin: rpms rpms touryo - Touryo use “blueprint” config mysql mysql - means what should be installed game1: - The config defined by “role” backup db:master game1: - should be defined the role of hosts db:backup - inherited searching - separated by comma
  • 27. What is the “blueprint”? crontab blueprint blueprint/crontab/root.tx web01 0 <: $cron_hour :> * * * /path/to/command crontab apache blueprint/crontab/blueprint.pl admin: touryo sysctl fastcgi bootstrap { my $c = shift; rpms app $c->add_attribute({ cron_hour => 5, game1:web cron => 'root.tx', }); - blueprint locate the directory }; db01blueprint name - named the db02 crontab test { - contain “blueprint.pl”crontab my $c = shift; sysctl - Perl DSL for Touryo sysctl is_diff $c->sudo_ssh->crontab, - able to use templaterpms engine $c->template('cron')->content; rpms done_testing; - Text::Xslate::Syntax::Kolon }; mysql mysql - using “attribute” valuables game1: -db:master backup have other useful functions run { game1: my $c = shift; - sudo_ssh, template, crontab db:backup $c->sudo_ssh->crontab($c->template('cron')); - etc... };
  • 28. What is the “attribute”? blueprint/crontab/root.tx web01 0 <: $cron_hour :> * * * /path/to/command admin: crontab apache blueprint/crontab/blueprint.pl touryo bootstrap { sysctl fastcgi my $c = shift; $c->add_attribute({ rpms app cron_hour => 5, game1:web cron => 'root.tx', }); }; - “attribute” can be used to db01 db02 change the behavior of test/run default rendering crontab crontab 0 5 * * * /path/to/command - changing logic, template, etc.. sysctl sysctl - overwriting of “attribute” If defined attribute on - bootstrap rpms rpms the Touryo Config ... - role config Touryo Config mysql mysql role: game1:web - defined for the role game1: backup attribute: -db:masterconfig node cron_hour: 9 game1: - defined for the node(host) db:backup 0 9 * * * /path/to/command
  • 29. How to define the “correct” state? (2) Touryo config web01 role: game1 crontab apache blueprint: attribute: sysctl fastcgi - crontab somaxconn: 1024 - sysctl rpms app - rpms game1:web cron_hour: 9 somaxconn: 10240 role: game1:web fcgi_proc: 100 blueprint: attribute: - apache cron_hour: 9 - fastcgi somaxconn: 10240 web02 - app fcgi_proc: 100 crontab apache sysctl fastcgi node: web02 rpms app blueprint: attribute: admin: - git fcgi_proc: 10 game1:web git touryo cron_hour: 9 - You can vary correct “blueprint” and somaxconn: 10240 “attribute” by Touryo config fcgi_proc: 10 - role config and node config
  • 30. Lightweight /Testable/Freedom find lib/ -name "*.pm" | xargs cat | wc -l about 1500 (including html templates) Like test scripts of Perl Software, you can test the servers’ configuration you can write anything on blueprint.pl Conversely you have to write anything
  • 31. Other Features in terms of Programming use Amon2 easy to develop Web Interface and CLI use TAP::Parser to get the test result test function uses Test::More use IPC::Cmd and “ssh” / “sudo ssh” easy to configure with .ssh/config or others blueprint dependance resolving easy to cascade the config
  • 33. There are many languages script / compile Perl,Ruby,Python,PHP / C,C++,Java procedural / OO / functional Perl,C / Java,Ruby / Scala,Haskell popular / minority ???(religious problem...)
  • 34. My Thought You can use any languages you like Engineer have to treat multi languages Development speed / Maintenance cost They are usually trade-off Popular LLs are often suited for both Simple / Light / Thin / Useful Modules Everyone can understand it easily Perl/Ruby/Python are similar
  • 35. I ♡ Perl Fastest to develop for me I am used to Perl because DeNA use Perl There are many Perl Mongers around :) colleague and friends CPAN has many useful modules long history and super hackers
  • 37. DeNA ♡ Engineers We need more powerful engineers We use Perl and other languages Ruby/JavaScript/C/C++/Java/Objective-C SocialGame/Platform/SDK/Data mining Or let’s make very useful tools with me :) Server Ops/Database Admin/Network If you are interested in us, pleeeeeeeeease contact me or DeNA staffs! hirose31, gfx, hidek, zigorou, nekokak...
  • 38. Thanks! http://blog.riywo.com http://twitter.com/riywo Thanks for JPA, @kazeburo, @hirose31, @Yappo, @Percona, and All Perl Mongers!