Slide 1

Slide 1 text

.BDɾ8JOEPXTڞ௨ͷ
 1)1։ൃ؀ڥ ۨܗਅ޾@߹ಉձࣾϑΟϤϧυ
 Twitter: @komagata
 blog: http://docs.komagata.org

Slide 2

Slide 2 text

ϨΨγʔ1)1ͱ೔ʑઓ͍ͬͯ·͢ http://docs.komagata.org/5241

Slide 3

Slide 3 text

• Ϩϯλϧαʔόʔ • Windowsɹ • Subversionɹ • ڞ௨։ൃαʔόʔ • खಈσϓϩΠ • खಈςετ ϨΨγʔ1)1։ൃ؀ڥ

Slide 4

Slide 4 text

• ϨϯλϧαʔόʔɹˠɹΫϥ΢υ • WindowsɹˠɹMac or Linux • SubversionɹˠɹGithub • ڞ௨։ൃαʔόʔɹˠɹݸਓ։ൃ؀ڥ • खಈσϓϩΠɹˠɹܧଓతσϓϩΠ • खಈςετɹˠɹࣗಈςετ ϨΨγʔ1)1։ൃ؀ڥ ͜Μͳײ͡ʹม͍͖͍͑ͯͨΑͶ

Slide 5

Slide 5 text

Կ͔ΒखΛ͚ͭΔʁ

Slide 6

Slide 6 text

ݸਓ։ൃ؀ڥ͔ΒखΛ෇͚ͨ wڞ௨։ൃαʔόʔ͸༧૝Ҏ্ʹ΍͔͍ͬ w ίϯϑϦΫτ
 ʮ͜Ε͔Βࢲ͕৮ΔͷͰΈͳ͞Μ"""αΠτ৮Βͳ͍ͳ͍Ͱ͍ͩ͘͞ʯ w HJUʹͯ̍͠ਓ͕CSBODIมߋ͢ΔͱશһCSBODI͕มΘΔ w ωοτϫʔΫӽ͠ͷTWOPOTBNCB͍͢͝஗͍ w ࣾ಺͔Β͔͠ݟ͑ͳ͍ w %#ͷ಺༰͕ൿ఻ͷλϨԽ w ͍Βͳ͍ϑΝΠϧͨ͘͞Μ

Slide 7

Slide 7 text

WBHSBOUBOTJCMFͰ ααͬͱ࡞Γ·ͨ͠

Slide 8

Slide 8 text

ӕͰ͢ windowsϚγϯങ͍·ͨ͠ɻ

Slide 9

Slide 9 text

ͦΜͳαΫοͱͰ͖ͯͳ͍ windowsϚγϯങ͍·ͨ͠ɻ ΤΠεʔε

Slide 10

Slide 10 text

TIJOYCMPH͸ਆ vagrant΍ansibleʹ͍ͭͯ͸@shin1x1͞Μͷϒϩάݟͨ΄͏͕ྑ͍Ͱ͢

Slide 11

Slide 11 text

XJONBDBOTJCMFͰͷ 1)1։ൃ؀ڥͷίπ ʢ˺ϋϚΓͲ͜Ζʣ

Slide 12

Slide 12 text

WBHSBOU Vagrant.configure(2) do |config| config.vm.box = "chef/centos-6.6" config.vm.network "private_network", ip: "192.168.33.10" config.vm.provision "shell", inline: <<-SHELL yum -y install epel-release yum -y install ansible ansible-playbook /vagrant/vagrant.yml --connection=local SHELL end ௚઀ansibleΛ࢖ΘͣɺshellͰansibleΛΠϯετʔϧͯ͠ ࣗ෼ࣗ਎Λprovisionɻ ʢwindows൛ansibleແ͍ͷͰʣ

Slide 13

Slide 13 text

BOTJCMF VagrantfileͱplaybookΛಉ͡reposͰ؅ཧ

Slide 14

Slide 14 text

େྔαΠτ໰୊ ؅ཧ͍ͯ͠ΔαΠτ͕਺े͋ΔͷͰɺ؀ڥΛ࡞Δͷ͕ େมɻ ྫʣ 1.VirtualHostͷઃఆΛ௥Ճ͢Δ 2.HostsʹυϝΠϯɾIPΛઃఆ͢Δ αΠτ͕૿͑Δͨͼʹશһ͕͜ΕͷઃఆΛ͢Δ

Slide 15

Slide 15 text

7JSUVBM%PDVNFOU3PPU NameVirtualHost *:80 VirtualDocumentRoot /srv/%0 Order allow,deny Allow from all foo.jpͰΞΫηε͞ΕͨΒ/srv/foo.jpΛDocumentRootͱ͢Δ ศརػೳɻ
 ʢapacheͷ࿩ɻnginxͰ͸΋ͬͱී௨ʹͰ͖Δʣ

Slide 16

Slide 16 text

EPDSPPUIBDL NameVirtualHost *:80 VirtualDocumentRoot /srv/%0 php_admin_value auto_prepend_file /srv/set_docroot_hack.php VirtualDocumentRoot࢖͏ͱPHPͷDOCUMENT_ROOT͕ ਖ਼͘͠ઃఆ͞Εͳ͍໰୊ͷճආɻ
 ʢnginxͰ͸ུ

Slide 17

Slide 17 text

YJQJPͰWJSUVBMIPTU

Slide 18

Slide 18 text

YJQJPͰWJSUVBMIPTU DNSઃఆ͍ΒͣͰࣗ༝ʹsubdomain࢖͑Δɻ subdomainʹipΛೖΕΔͱͦΕΛฦ͢ɻ ipͷsubdomainʹԿ͔ೖΕͯ΋ແࢹͯ͘͠ΕΔɻ ͜ΕΛ࢖͑͹virtualboxͷprivate network಺ͷhostʹର ͯ͠΋ઃఆແ͠ʹsubdomainΛউखʹ࡞ΕΔɻ 192.168.33.10.xip.io -> 192.168.33.10 foo.192.168.33.10.xip.io -> 192.168.33.10 bar.192.168.33.10.xip.io -> 192.168.33.10

Slide 19

Slide 19 text

XJOEPXTͷ ύοέʔδϚωʔδϟʔ homebrewΈ͍ͨͳ΋ͷɻΫοιศརɻ

Slide 20

Slide 20 text

DIPDPMBUFZ ඞཁͳ෺͕ҰൃͰͦΖ͏ɻΫοιศརʢೋ౓໨ʣ > @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/ install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ίϚϯυϓϩϯϓτ͔ΒΠϯετʔϧ > choco install googlechrome firefox curl git virtualbox vagrant -y PowerShellͱ͔NuGetͱ͔windowsͷྲّྀʹैͬͯ ΔͷͰ҆৺ʂ

Slide 21

Slide 21 text

.BD8JOڞ௨ͷ 1)1։ൃ؀ڥ͕Ͱ͖ͨ $ git clone [email protected]:komagata/php-development.git $ cd php-development $ vagrant up

Slide 22

Slide 22 text

ϨΨγʔ1)1վળͷ͝༻໋͸ ฐࣾ·Ͱ

Slide 23

Slide 23 text

Ҏ্Ͱ͢ɻ ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ