Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vagrant と Chef でつくるはてなブックマークの開発環境
Search
aereal
November 25, 2013
Programming
20
59k
Vagrant と Chef でつくるはてなブックマークの開発環境
aereal
November 25, 2013
Tweet
Share
More Decks by aereal
See All by aereal
How to send distibuted traces to Datadog using build own OpenTelemetry-Lambda distribution
aereal
3
210
好きな技術《コト》で、 生きていく技術 / life with what you like
aereal
5
2.4k
qron: Cloud Native Cron Alternativeの今
aereal
2
2.1k
自動作曲入門 / introduction to programatic music composition
aereal
1
530k
はてなブログ タグとCDK / The epic of AWS CDK and Hatena Blog Tag
aereal
3
200k
はてなブログ タグの技術選択 / The technical details of Hatena Blog Tag
aereal
3
200k
ブログサービスのHTTPS化を支えたAWSで作るピタゴラスイッチ / The construction of large scale TLS certificates management system with AWS
aereal
3
400k
AWSではてなブログの常時HTTPS配信をバーンとやる話 / The Epic of migration from HTTP to HTTPS on Hatena Blog with AWS
aereal
14
17k
ScalaとPerlでMicroservices in production / Building microservices with Perl and Scala in production
aereal
0
5.4k
Other Decks in Programming
See All in Programming
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Security_for_introducing_eBPF
kentatada
0
110
命名をリントする
chiroruxx
1
410
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
330
42 best practices for Symfony, a decade later
tucksaun
1
180
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
php-conference-japan-2024
tasuku43
0
270
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6.1k
A Philosophy of Restraint
colly
203
16k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Docker and Python
trallard
42
3.1k
Making Projects Easy
brettharned
116
5.9k
Documentation Writing (for coders)
carmenintech
66
4.5k
Facilitating Awesome Meetings
lara
50
6.1k
Transcript
Vagrant ͱ Chef Ͱͭ͘Δ ͯͳϒοΫϚʔΫͷ! ։ൃڥ id:aereal
ΞδΣϯμ •ͯͳϒοΫϚʔΫ։ൃڥͷ͜Ε·Ͱ •Vagrant + Chef ʹΑΔ࣮ࡍͷӡ༻ͱ՝
ࠓ͠ͳ͍ •Vagrant ͱ? •Chef ͱ? •(Carton ͱ?)
aereal aereal aereal.org
• αʔόαΠυ (Perl) • ΫϥΠΞϯταΠυ (JavaScript) ! ! • αʔόαΠυ
(Perl) • ϒϥβ֦ு (JavaScript) • ։ൃج൫ͷඋ • Jenkins, Plack, etc.
ͯͳϒοΫϚʔΫ • αʔϏε։࢝ (20052݄ʙ) • ϦχϡʔΞϧ (200811݄)
ͯͳϒοΫϚʔΫ (2) • Ridge (ࣗࣾWAF) • DBIx::MoCo (ࣗࣾO/R mapper) •
mod_perl2 • nginx + Apache
ͯͳϒοΫϚʔΫ (3) • >= 30000 commits • >= 7000 files
• >= 50 contributors 20082݄ʙ
ͯͳϒοΫϚʔΫ! ։ൃڥͷ͜Ε·Ͱ
ෳࡶͳґଘؔ
→ґଘͷղܾ
ߏཧ
ຊ൪ •Chef •RPM ։ൃ •cpanm •Homebrew •apt •yum
OS
ຊ൪ •CentOS ։ൃ •OS X •Windows •Linux (Debian)
ͱΓ͋͑ͣ cpanm --installdeps .
ͳΜ͔ࣦഊ͢Δ
cpanm --installdeps .
ͳΜ͔ࣦഊ͢Δ
cpanm \ --installdeps .
ͳΜ͔ࣦഊ͢Δ
͏ͩ
ͳΜͱ͔͢Δ
A. จॻΛ͢
• ίʔυίϛοτʹ දΕͳ͍ͷ • ܦҢ • จ຺ ! ! •
ʮ݁ہͲ͏͢Ε͍͍ ͔ʯԕ͍ • Ϟνϕʔγϣϯͷফඅ • Ϟνϕʔγϣϯ༗ ݶ • ʮͱʹ͔͘ؤுΔʯ
A. ϓϩάϥϚϒϧͳ ηοτΞοϓํ๏
• ୯७࡞ۀͷੵΈॏͶ • ΦϓγϣϯҾͷ ࢼߦࡨޡͱ͔ • ϩά͕Δ • յΕͨΒ͙͢ʹΘ͔Δ !
• ෳࡶ͞Λ࣋ͪࠐΉ • ֶशίετ • ϝϯςφϯείετ
http://vagrantup.com/
•VM Λ্ཱͪ͛Δ •(Ҏલʹ͍ͬͯͨ) •ϋʔυΣΞਐԽ͕ͨ͠……
http://www.opscode.com/chef/
୮ਫ਼͜Ίͯ࡞ͬͨ VM Πϝʔδ
୮ਫ਼͜Ίͯ࡞ͬͨ VM Πϝʔδ R.I.P.
Vagrant! ʢόουʣϊϋ
•NFS ͰήετͱϦϙδτϦΛڞ༗͢Δ •Virtualbox ͷ shared folder ͍ •࠷େ20ഒ͍…… • http://docs-v1.vagrantup.com/v1/docs/nfs.html
•perl-build Ͱ Perl 5.8.8 ΛೖΕΔ •tokuhirom/perl-build •CPAN Ϟδϡʔϧ Cookbook ʹهड़
•όʔδϣϯΛࢦఆͯ͠Πϯετʔϧ͢Δ LWRP •ผʹ Carton ԽਐΊ͍ͯΔ
• ./bin/server • vagrant up • vagrant ssh-config --host vagrant
> .ssh_config • ssh "cd /repos; perl server.up $@"
•VM Λ্ཱͪ͛ͯ •ssh_config Λͭͬͯ͘ •SSH Ͱήετ OS ্ͰεΫϦϓτΛ࣮ߦ •Proclet
͙͢ʹ։ൃ͍ͨ͠!!!
•provisioning ·Ͱࡁ·ͤͨ box ΛΔ •ࣾϑΝΠϧαʔό •FTP ΞΫηεՄ
՝
•ೋॏཧͳͷͦͷ·· •→ຊ൪ʹద༻͞ΕΔChefϨγϐͱ࿈ܞ •ϝϯς͍ͯ͠Δͷ͚ࣗͩ •→ݟΛΊ͍͖͍ͯͨ
ͳʹͱ͋Ε
Vagrant + Chef ࠷ߴ!
Vagrant + Chef ࠷ߴ?
NOT ۜͷؙ
Why use?
•όʔδϣϯ੍͕ڧ͍ •CPAN Ϟδϡʔϧ •ϛυϧΣΞ •৽ͨʹ։ൃʹࢀՃ͢Δਓ͕Ұఆ͍Δ •Πϯλʔϯ •ҟಈ
Θͣʹ͢Ήͷ͕ཧ
•Carton •plenv / perlbrew •(Chef Solo)
ෳࡶ͞ͷঈΛ͔Δ
Fin.