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
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
47
Greenは本当にGreenか? - B/GデプロイとAPI自動テストで安心デプロイ
kaz29
1
200
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
510
開発エンジニアが実践するDevSecOps
kaz29
0
180
PHPCon福岡2024-Azureもなかなかいいですよ.pdf
kaz29
2
400
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
1.3k
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
200
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
720
バックエンドエンジニアの私がお勧めする SPAフロントエンド開発環境
kaz29
6
6.3k
Other Decks in Programming
See All in Programming
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
690
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
350
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
750
JRuby: Past, Present, and Future
headius
0
230
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
140
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
220
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.6k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
320
最近”作らせてる” ローカルAIアプリの話
akit37
0
430
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
210
ジョジョの世界をXRで再現する
mofurune
0
150
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
450
Optimizing for Happiness
mojombo
378
71k
Statistics for Hackers
jakevdp
799
230k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
610
Producing Creativity
orderedlist
PRO
348
41k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
KATA
mclloyd
PRO
35
16k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Git: the NoSQL Database
bkeepers
PRO
433
67k
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