Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CIハンズオン@PHPカンファレンス福岡-環境構築
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kaz Watanabe
June 27, 2015
Programming
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CIハンズオン@PHPカンファレンス福岡-環境構築
Kaz Watanabe
June 27, 2015
More Decks by Kaz Watanabe
See All by Kaz Watanabe
開発エンジニアが取り組む DevSecOps ~ GitHub Enterprise × Azure での実践~
kaz29
0
55
Greenは本当にGreenか? - B/GデプロイとAPI自動テストで安心デプロイ
kaz29
1
210
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
510
開発エンジニアが実践するDevSecOps
kaz29
0
180
PHPCon福岡2024-Azureもなかなかいいですよ.pdf
kaz29
2
420
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
1.4k
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
200
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
730
バックエンドエンジニアの私がお勧めする SPAフロントエンド開発環境
kaz29
6
6.3k
Other Decks in Programming
See All in Programming
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
440
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.8k
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
280
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
14
8.3k
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
260
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.7k
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
270
ActionController meets Protocol Buffers
sorah
1
770
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
500
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
340
LLM 101
dalinaum
0
450
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Speed Design
sergeychernyshev
33
2.2k
Code Review Best Practice
trishagee
74
20k
GitHub's CSS Performance
jonrohan
1033
470k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Between Models and Reality
mayunak
4
550
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Transcript
$",&1)1ͰֶͿ ܧଓతΠϯςάϨʔγϣϯϋϯζΦϯ ڥߏஙฤ @PHPΧϯϑΝϨϯεԬ 2015/6/27
WHO? • Θͨͳ͔ͣͻΖ(@kaz_29) • ߹ಉձࣾ decr (decr.jp) • PHP(CakePHP)ͰWebΞϓϦ։ൃ •
Πϯϑϥߏஙɾӡ༻ • iOSΞϓϦ։ൃ #beer #iosdev #cakephp #cat #camp #golf #chef #vagrant
WHO?
QUESTION?
QUESTION? VagrantΛͬͨࣄ͕͋Δਓ
QUESTION? chefΛͬͨࣄ͕͋Δਓ
ಈ࡞ڥ • VirtualBox • Vagrant • chef-solo(+knife-solo) • berkshelf
ಈ࡞ڥ ։ൃڥ EFWFMPQ $*ڥ DJ ຊ൪ڥ EFQMPZ ڥઃఆ TIBSFEGPMEFS ͖ͳΤσΟλ*%&Ͱ։ൃ
QVTI QVMM ·ͣ͜͜ͷ
http://bit.ly/1IBecmb ͜͜ͰςΩετΛڞ༗͠·͢
ඞཁͳͷ • VitrtualBox - https://www.virtualbox.org/ • Vagrant - https://www.vagrantup.com/ •
(ChefDK - https://downloads.getchef.com/chef-dk/) ग़དྷΔ͚ͩ࠷৽Λ͏
BOXFILEՃ $ vagrant box add handson_develop ~/Desktop/develop.box $ vagrant box
add handson_ci ~/Desktop/ci.box $ vagrant box add handson_deploy ~/Desktop/deploy.box ͖ͬ͞USB͔Βίϐʔͨ͠ͷΛ͍ͬͯͩ͘͞ʂ
Vagrant PluginͷΠϯετʔϧ $ vagrant plugin install vagrant-omnibus $ vagrant plugin
install vagrant-cachier
ڥઃఆϦϙδτϦΛऔಘ $ git clone https://github.com/kaz29/php_ci_env phpci_handson $ git checkout -b
handson origin/handson $ cd phpci_handson $ mkdir application $ mkdir -p application/app/webroot $ echo "<?php phpinfo();" > application/app/webroot/index.php
։ൃ༻αʔόͷىಈ $ vagrant up develop
Vagrantfileͷղઆ … config.vm.define :develop do |develop| develop.omnibus.chef_version = :latest develop.vm.hostname
= "develop" develop.vm.box = "opscode-ubuntu-14.04" develop.vm.box_url = "handson_develop.box" develop.vm.network :private_network, ip: "192.168.33.10" develop.vm.synced_folder "application", "/var/www/application/ current", id: "vagrant-root", :nfs => false, :owner => "vagrant", :group => "www-data", :mount_options => ["dmode=775,fmode=775"] …
Vagrantfileͷղઆ … develop.vm.provision :chef_solo do |chef| chef.log_level = "debug" chef.cookbooks_path
= "./cookbooks" chef.json = { nginx: { docroot: { owner: "vagrant", group: "vagrant", path: "/var/www/application/current/app/webroot", force_create: true }, default: { fastcgi_params: { CAKE_ENV: "development" } }, test: { available: true, fastcgi_params: { CAKE_ENV: "test" } } } } chef.run_list = %w[ recipe[apt] recipe[phpenv::default] recipe[phpenv::composer] recipe[phpenv::develop] recipe[capistrano] ] end …
http://192.168.33.10/
CIαʔόͷىಈ $ vagrant up ci
http://192.168.33.100:8080/
DEPLOYαʔόͷىಈ $ vagrant up deploy
http://192.168.33.200/
αϯϓϧΞϓϦڥͷߏங
։ൃڥ EFWFMPQ ಈ࡞ڥ $*ڥ DJ ຊ൪ڥ EFQMPZ ڥઃఆ TIBSFEGPMEFS ͖ͳΤσΟλ*%&Ͱ։ൃ
QVTI QVMM
ಈ࡞ڥ
BLOGAPPΛFORK͢Δ https://github.com/kaz29/blogapp
伴Λ࡞ͬͯొ $ vagrant ssh develop $ ssh-keygen Generating public/private rsa
key pair. Enter file in which to save the key (/home/vagrant/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: … $ cat ~/.ssh/id_rsa.pub ެ։伴Λίϐʔ
伴Λ࡞ͬͯొ setting -> SSH Keys ͜͜ʹެ։伴ΛೖΕΔ
GITͷઃఆ $ git config --global user.name "Your Name" $ git
config --global user.email
[email protected]
ΞϓϦέʔγϣϯΛॳظԽ $ vagrant ssh develop $ cd /var/www/application/current $ rm
-rf * $ git clone git://github.com/decr/blogapp.git . (<=υοτ) $ cd /var/www/application/current/app $ composer install --dev
None
JenkinsʹJobΛొ
JenkinsʹJobΛొ
JenkinsʹJobΛొ https://github.com/kaz29/blogapp.git
JenkinsʹJobΛొ 4$.ΛϙʔϦϯάΛνΣοΫ ) ઃఆྃͨ͠Βอଘ
JenkinsʹJobΛొ ϏϧυΛ࣮ߦ
JenkinsʹJobΛొ
JenkinsʹJobΛొ
ڥઃఆྃʂ $ vagrant halt deploy ͠Β͘Θͳ͍ͷͰམͱ͓͖ͯ͠·͢
ڥߏஙฤ Fin @kaz_29