FileMaker Server管理者のためのServerspec入門(2017年版)

0.9K Views

May 22, 17

スライド概要

2017/05/21 Frontiers' Conference 2017発表資料

profile-image

Claris FileMaker 認定デベロッパ、kintone認定 アプリデザインスペシャリスト(2020年2月)、kintone認定 カスタマイズスペシャリスト(2020年3月)。

シェア

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

FileMaker Server؅ཧऀͷͨΊͷ Serverspecೖ໳ʢ2017೥൛ʣ 2017/05/21 Frontiers' Conference 2017ൃදࢿྉ দඌ ಞʢ‫ࣜג‬ձࣾΤϛοΫʣ

2.

ࣗ‫঺ݾ‬հ • দඌɹಞʢ·͓ͭɹ͋ͭ͠ʣ ‣ ‫ࣜג‬ձࣾΤϛοΫɹ୅දऔక໾ ‣ FileMaker ServerରԠWebϑϨʔϜϫʔΫ ʮINTER-Mediatorʯίϛολʔ ‣ Blog: http://www.famlog.jp/ ‣ Twitter: @matsuo_atsushi

3.

ࠓճͷ࿩୊ • FileMaker Cloudͷొ৔ • Infrastructure as Codeͱ͍͏ํ๏࿦ • αʔόʔςετπʔϧʮServerspecʯͷ ঺հ

5.

ࠓ΍Ϋϥ΢υશ੝ͷ࣌୅ • ͍ͭʹFileMaker͔ࣾΒ΋७ਖ਼Ϋϥ΢υ αʔϏε͕ొ৔

6.

FileMaker Cloud • FileMaker, Inc.ͷ७ਖ਼Ϋϥ΢υαʔϏε • AWSʢAmazon Web Servicesʣ্Ͱಈ࡞ • ࡢ೥9݄ʹൃද • 2017೥5݄‫ࡏݱ‬ɺ೔ຊͰ͸ར༻ෆՄ

7.

OS͸CentOS Linux • ΦϯϓϨϛε޲͚ͷFileMaker ServerͰ ͸ରԠOS͸Windows ServerͱmacOS • ҰํɺFileMaker CloudͷOS͸LinuxͷΈ

8.

Ϋϥ΢υʹର͢Δෆ҆ • αʔόʔ؅ཧख๏ͷҧ͍ • ΦϖϨʔςΟϯάγεςϜͷҧ͍ • ྉۚମ‫ܥ‬ͷҧ͍ʢAWS͸ैྔ੍ྉۚʣ etc.

9.

Infrastructure as Code

10.

Infrastructure as Code • ιϑτ΢ΣΞ։ൃͰ༗ޮͰ͋Δͱ෼͔ͬ ͍ͯΔϓϥΫςΟεΛγεςϜ؅ཧʹ Ԡ༻͢ΔͨΊͷํ๏࿦ • ͜Εͳ͠Ͱ͸Ϋϥ΢υͷαʔόʔ؅ཧ ͸೉͍͠

11.

ιϑτ΢ΣΞ։ൃͷ ϓϥΫςΟε • όʔδϣϯ؅ཧ • ςετ • ࣗಈԽ • ‫ܧ‬ଓతΠϯςάϨʔγϣϯʢCIʣ etc.

12.

Infrastructure as CodeͰ͸ • όʔδϣϯ؅ཧ • ‫܁‬Γฦ͠ՄೳͳϏϧυ • ςετ • ‫ܧ‬ଓతΠϯςάϨʔγϣϯʢCIʣ • ‫ܧ‬ଓతσϓϩΠ

13.

Infrastructure as Code • ͞·͟·ͳπʔϧ΍αʔϏε͕ଘࡏ • ΦϯϓϨϛεͷ෺ཧαʔόʔ؅ཧʹ΋ ໾ཱͭ • ࠓճ͸αʔόʔςετπʔϧΛ঺հ • ΤϛοΫͰ͸ServerspecΛར༻

14.

Serverspec

15.

2010೥10݄ • FM-TokyoͷϥΠτχϯάτʔΫൃද ʮςεςΟϯάϑϨʔϜϫʔΫͱαʔ όʔӡ༻ʯ

16.

ςεςΟϯάϑϨʔϜϫʔΫ͸ αʔόʔͷӡ༻ʹ΋࢖͑Δ

17.

αʔόʔͷӡ༻؅ཧͰ ඞཁʹͳΔ͜ͱ • ҆ఆͨ͠‫ܧ‬ଓతͳαʔόʔӡ༻ • มԽ΁ͷରԠ • ηΩϡϦςΟΞοϓσʔτ • γεςϜͷߋ৽΍อक؅ཧ౳ʢιϑτ ΢ΣΞͷόʔδϣϯΞοϓ΁ͷରԠʣ

18.

҆ఆͨ͠ӡ༻ͷͨΊʹ • ਖ਼ৗͳঢ়‫ͱگ‬͸Կ͔Λ஌Δ • ճආ͍ͨ͠ঢ়‫ͱگ‬͸Կ͔Λ஌Δ • ͦͷ্Ͱ‫ݱ‬ঢ়ͷঢ়ଶΛ஌Δ

19.

ࣗಈԽͷඞཁੑ • खಈͰ͞·͟·ͳ߲໨ΛνΣοΫ͢Δ ͷ͸࣌ؒͱख͕͔͔ؒͬͯ͠·͏ • νΣοΫ߲໨΍ର৅αʔόʔ͕૿Ճɺ ର৅όʔδϣϯ͕޿͕͍ͬͯ͘ͱ……

20.

RSpec • ςεςΟϯάϑϨʔϜϫʔΫ RSpec is testing tool for the Ruby programming language.

21.

RSpecͰαʔόʔͷςετ • ΤϛοΫͰ͸2008೥͔ΒRSpecΛ‫༻׆‬ • ͨͩ͠ɺॏෳ͓Αͼ৑௕ͳՕॴ͕ग़ͯ ͘Δ͜ͱ͕গ͠‫͍ͨͯͬͳʹؾ‬ • ΑΓ؆ܿʹαʔόʔͷςετΛ‫ه‬ड़Ͱ ͖ͳ͍ͩΖ͏͔ʁ

22.

2013೥3݄ Serverspec͕ެ։

23.

Serverspec “With serverspec, you can write RSpec tests for checking your servers are configured correctly.” http://serverspec.org/

24.

Serverspec “Serverspec tests your servers' actual state by executing command locally, via SSH, via WinRM, via Docker API and so on. So you don't need to install any agent softwares on your servers and can use any configuration management tools, Puppet, Ansible, CFEngine, Itamae and so on.” http://serverspec.org/

25.

Serverspec • ‫ٶ‬Լ߶ีࢯ͕2013೥3݄ʹެ։ • ߏஙࡁΈͷαʔόʔ͕ҙਤ௨Γઃఆ͞ Ε͍ͯΔ͔֬ೝ͢Δπʔϧ • RSpecΛ࢖ͬͯςετΛ؆ܿʹॻ͚Δ • MIT License

26.

Serverspecͱ͸ “γεςϜͷ͋Δ΂͖ঢ়ଶΛ؆ܿʹ‫ه‬ड़͠ ‫ܧ‬ଓతʹςετ͢ΔͨΊͷ΋ͷ” http://www.slideshare.net/mizzy/serverspec-hbstudy45

27.

Supported OS AIX, Arch Linux, Darwin (macOS), Debian, Fedora/Red Hat/CentOS, FreeBSD, Gentoo Linux, NixOS, OpenBSD, openSUSE, Plamo Linux, SmartOS, Solaris, SUSE, Ubuntu, Windows

28.

Serverspecͷ࢝Ίํ $ gem install serverspec rake (sudo gem install serverspec rake) $ serverspec-init $ rake spec

29.
[beta]
ServerspecͰͷ‫ه‬ड़ྫ
require 'spec_helper'
describe service('fmserverd') do
it { should be_running }
end
describe service('httpd'), :if => os[:family] == 'darwin' do
it { should be_running }
end
describe file('/Library/FileMaker Server/HTTPServer/conf/extra/httpd-ssl.conf') do
its(:content) { should match /SSLProtocol TLSv1.2/ }
end
describe cron do
it { should have_entry '2 4 * * * /usr/local/bin/fmsadmin restart -y adminserver' }
end

30.

Serverspecͷ֓ཁ • γΣϧίϚϯυ࣮ߦʹΑΔαʔόʔͷ ςετΛεϚʔτʹ࣮‫ݱ‬ • ςετର৅ͷαʔόʔʹSSHͰ઀ଓ͠ ͯίϚϯυΛ࣮ߦ • ϩʔΧϧͰ΋࣮ߦՄ

31.

Serverspec͸RSpecϕʔε • RSpecͷςετͱซ༻Մೳ • ΤϛοΫͰ͸‫ط‬ଘͷRSpecʹΑΔςε τΛঃʑʹServerspecϕʔεʹมߋ͠ ͍ͯͬͨ

32.

σϞ

33.

Serverspecͷ‫ྫࣄ༻׆‬ • INTER-Mediator-Server VM • όʔδϣϯ5.6Ͱ͸ϕʔεOSΛUbuntu Server 14.04͔ΒAlpine Linux 3.5ʹมߋ ༧ఆ • ϦϑΝΫλϦϯάʹServerspecΛ‫༻׆‬

34.

Serverspec “But the true aim of Serverspec is to help refactoring infrastructure code.” http://serverspec.org/

35.

·ͱΊ • Infrastructure as Codeͷํ๏࿦Λֶͼ FileMaker Cloudʹඋ͑·͠ΐ͏ • αʔόʔςετπʔϧ͔Β࢖͍࢝Ίͯ ΈΔͱணख͠΍͍͢ͷͰ͸

36.

ؔ࿈URL • http://serverspec.org/ • https://github.com/mizzy/serverspec • http://www.slideshare.net/mizzy/ serverspec-hbstudy45 • http://www.slideshare.net/mizzy/ serverspec-at-testing-framework-meeting

37.

ࢀߟॻ੶ • ServerspecʢΦϥΠϦʔɾδϟύϯʣ • Infrastructure as CodeʢΦϥΠϦʔɾ δϟύϯʣ