Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura
Slide 2
Slide 2 text
ࣗݾհ • Ryo Nakamura • https://github.com/r7kamura • https://twitter.com/r7kamura • Cookpad→Increments→ϑϦʔϥϯε • Railsͷࣄͱ͔୳ͯ͠·͢
Slide 3
Slide 3 text
ࠓ͢͜ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ • ๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
Slide 4
Slide 4 text
Կͭͬͨ͘Β͍͍ͷ͔
Slide 5
Slide 5 text
Կͭͬͨ͘Β͍͍ͷ͔ (1/2) • Hello, world!! ͷ͜͏ଆʹਐΊͳ͍ • Կ͔ͭ͘Δͧͱߟ͑ͨͱ͖ʹ·ͣ͜ΕͰࠔΔ • ղ͖͘ΛઃఆͰ͖ͳ͍ͱ͍͏ • దͳΛݟ͚ͭΔͷ͕Ұ൪͍͠…
Slide 6
Slide 6 text
Կͭͬͨ͘Β͍͍ͷ͔ (2/2) • →ࠜݯతͳཉٻʹࣖΛ͚Δͱྑ͍ • ࣗͷΛղܾͰ͖Δͷ͕ྑ͍ • খ࢝͘͞ΊΒΕΔͱྑ͍ • ͘ଓ͚ΒΕΔͱྑ͍ • ์ஔͰ͖Δͷ͕ྑ͍ • ऩೖΛಘΒΕΔͱͳ͓ྑ͍
Slide 7
Slide 7 text
amakan.net ͷ߹ • ແݶʹອըಡΈ͍ͨ… • →ອըͷແݶϦετ͕ཉ͍͠… • →͕ࣗ͡ΌͿ͡ΌͿߪೖͨ͘͠ͳΔΑ͏ͳɺࣹ৺Λ ἤΓ·͘Δ৽ץϦετ͕… • →AmazonͷAPIͰΰχϣΰχϣΕ͍͚ͦ͏ • →ऩೖͰແݶʹອըಡΊΔͣ
Slide 8
Slide 8 text
https://amakan.net/ ಡॻཤྺ৽ץใΛཧ͢ΔαʔϏε
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
ͱ͍͑ • ͭ͘Γ͍ͨͷ͕ͭ͘ΕΔͱݶΒͳ͍ • ೳྗෆͰ࣮ݱͰ͖ͦ͏ʹͳ͍ͷ͕΄ͱΜͲ • ͭ͘Γ͍ͨͷͱΘΕΔͷͱͷଥڠΛ୳Δ • ඳ͖͍ͨͷͱചΕΔͷ͕ҧ͏ອըՈͷΑ͏ͳ ͷ • ͭ͘Γ͍ͨͷΛͭ͘ΔͨΊʹݚᮎ͢Δͱྑ͍
Slide 13
Slide 13 text
ਓखෆ
Slide 14
Slide 14 text
ਓखෆ (1/2) • ݸਓ։ൃͰਓతϦιʔε͕ಛʹෆ͢Δ • ٳͱ͔ʹยखؒʹΔͷͰ͕࣌ؒແ͍ • 1ਓͰશ෦Δඞཁ͕͋ΔͷͰ͕࣌ؒແ͍
Slide 15
Slide 15 text
ਓखෆ (2/2) • →పఈతʹޮԽ͢Δ͜ͱͰରॲ • ۀͰ͏ٕज़Λڞ༻͢Δ • ݸਓͰ͑Δٕज़Λ͏৫ʹॴଐ͢Δ • εέʔϧ͢Δٕज़ΛΜͰ͍ͬͯ͘ • ଞϓϩδΣΫτͱ෦Λڞ༻͢Δ
Slide 16
Slide 16 text
amakan.net ٕज़֓ཁ • JSONRubyͰɺHTMLJavaScriptͰੜ • t2.micro + db.t2.micro + cache.t2.micro • AWS ECS (Pumaίϯςφ + Sidekiqίϯςφ) • AWSϦιʔεTerraformͰཧ • σϓϩΠɾΤϥʔɾδϣϒ࣮ߦͳͲSlackͰ௨ • The 12-Factor App ʹଇͬͨઃܭ
Slide 17
Slide 17 text
No content
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
ۀͱͷؔΘΓํ
Slide 22
Slide 22 text
ۀͱͷؔΘΓํ (1/2) • ۀ৺ͷఈ͔Β͖ͰͬͯΔ༁Ͱͳ͍ • ۀରՁʹ߹͏ಇ͖Λ͢Εྑ͍ • ݸਓ։ൃࣗͰબΜͰ͖ͰͬͯΔ͜ͱ • ͖ͰͬͯΔ͜ͱ͙Β͍ຊؾͰΔ͖
Slide 23
Slide 23 text
ۀͱͷؔΘΓํ (2/2) • ݸਓ։ൃͰ৭ʑͱಥ͖٧ΊΔΑ͏ʹͳΔ • ݸਓͱۀͱͰٕज़Ϩϕϧ͕ٯసͯ͘͠Δ • ݸਓͰࢼٕͨ͠ज़Λۀʹద༻͢Δܗ • ྫ: TerraformɺECSɺReactOnRailsɺPumaͳ ͲamakanͰࢼ͔ͯ͠ΒQiitaʹಋೖ͍ͯ͠Δ
Slide 24
Slide 24 text
OSSʹ͢Δ͔Ͳ͏͔
Slide 25
Slide 25 text
OSSʹ͢Δ͔Ͳ͏͔ (1/2) • ͭͬͨ͘ΞϓϦΛOSSʹ͢Δ͔Ͳ͏͔ • ެ։/ඇެ։ʹؔΘΒͣಉ͡Α͏ʹॻ͖͘ • ऩӹϞσϧͱอଘ͞ΕΔσʔλ࣍ୈ • ྫ: ެ։ͭͭ͠༗ྉͰϗεςΟϯά • ྫ: ඇެ։ͰҰ෦ػೳΛOSSԽ
Slide 26
Slide 26 text
OSSʹ͢Δ͔Ͳ͏͔ (2/2) • amakanͰίΞػೳΛOSSԽͨ͠ • github.com/amakan/amakanize • github.com/amakan/amakankan • ͯ͘͠ΕΔਓ͕ଟͯ݁͘Ռతʹॿ͔ͬͨ • ਓखෆղফͰ͖ΔՄೳੑ͕͋Δ
Slide 27
Slide 27 text
๏
Slide 28
Slide 28 text
ར༻نͷ࡞Γํ • άάΔͱδΣωϨʔλʔ͕ग़ͯ͘Δ (ศར) • ॻ੶: ྑ͍WebαʔϏεΛࢧ͑Δʮར༻نʯͷ࡞Γํ • ࣮ࡍΈΜͳΘΓͱίϐϖ͍ͯ͠Δ • 2લʹॻ͍ͨར༻نΛौ୩ͷͰ͔͍ձࣾʹίϐϖ͞Εͨ • ແྉαʔϏε͔༗ྉαʔϏε͔Ͱগ͠ܗ͕มΘΔ • ۀଶ͕ۙͦ͏ͳͭΛ*ࢀߟ*ʹ͢Δͱྑ͍
Slide 29
Slide 29 text
ϓϥΠόγʔϙϦγʔ • ར༻نͱҰॹʹͭ͘Ζ͏ • ϒϥβ֦ுొ࣌ͳͲʹ͋Δͱศར • ࠂϓϩάϥϜར༻ਃͳͲͰ͑Δ
Slide 30
Slide 30 text
ܦཧ
Slide 31
Slide 31 text
ࢧग़ • ҰൠతͳWebΞϓϦʹඞཁͳܦඅѲ͓͖ͯ͘͠ • AWSͰ͋ΕجຊEC2, RDS, Elasticache, ELB͋ͨΓ ͕ࢧత • AWSߴ͍ɺGCPͩͱֹఔͰࡁΉɺVPSͩͱͬ ͱ͍҆ɺΈ͍ͨͳنײͷѲେࣄ • amakanສϢʔβ͙Β͍·Ͱ݄1ສԁͰࣄΓΔ
Slide 32
Slide 32 text
ऩೖ • amakan1000ϢʔβͰ݄4ສԁఔͷऩೖ • େͷΞϑΟϦΤΠτར͕2%͔Β5%ఔ • αʔϏεͷ༰ࣗମ͕Λѻ͏ͷ͕ϕετ • AdSenseͷؔ࿈ࠂͰऩӹཱͯΔͷͦͦ͜͜ΞΫ ηεͷ͋ΔαʔϏε͡Όͳ͍ͱݫ͍͠… • ͜ͷลͷࣄΛ͍ͬͯΔͱαʔϏεߟ͑Δͱ͖ʹ༗ར
Slide 33
Slide 33 text
અ੫ • ։ۀಧΛग़͓ͯ͘͠ͱ੨৭ਃࠂͰ͖Δ • ʹҰ෦ͷେਓୡ͕ᄆ͍͍ͯΔΞϨ • αʔόɺ࡞ۀεϖʔεͳͲΛܦඅʹ • ؒສ͔Βेສઅ੫Ͱ͖ΔՄೳੑ͕͋Δ
Slide 34
Slide 34 text
։ۀ ํ๏ • 1. ։ۀfreeeͰ࣭߲ΛຒΊΔ • 2. ੜ͞ΕΔPDFΛ༣ૹ͢Δͱྃ • 3. ઐ༻ͷωοτۜߦޱ࠲Λ࣋ͭͱศར • 4. ઐ༻ͷΫϨΧ͋Δͱͳ͓ྑ͍
Slide 35
Slide 35 text
ࣦഊࣄྫ
Slide 36
Slide 36 text
ࣦഊࣄྫ • amakan݄ͷऩೖ 4ສɺࢧग़1ສͩͬͨ • AmazonΞιγΤΠτʹBAN͞Εͨ • վળͯ͠࿈བྷ͕ͨ͠औΓ߹ͬͯ͘Εͣ… • ࢧग़1ສ͚͕ͩͬͨ… • ͭΒ͍
Slide 37
Slide 37 text
ࣦഊ͔Βͷֶͼ • نղऍͷՄೳੑ·Ͱߟ͑ͯΑ͘ಡ͏ • ࣦഊ͢ΔͱϞνϕʔγϣϯ͕ۃʹԼ͕Δ • ऩӹ͕ҙ֎ͱϞνϕʔγϣϯʹͳ͍ͬͯͨ • ์ஔͯͯ͠ಈ͘Α͏ʹͳͬͯͯྑ͔ͬͨ • Ұͭͷऩೖݯʹґଘ͖͢Ͱͳ͍ • Ϟνϕʔγϣϯݸਓ։ൃʹ͓͍ͯ࠷وॏͳࢿݯ
Slide 38
Slide 38 text
ΤλΒͳ͍ͨΊʹ
Slide 39
Slide 39 text
ΤλΔ • ΤλʔφϧʢӬԕͷɺՌͯ͠ͳ͍ʣΛಈࢺԽ ͤͨ͞ޠɻπΫϥʔʢRPGπΫʔϧͷϢʔ βʔʣͷؒͰੜ·Εͨɻ࡞ऀ͕ॾൠͷࣄʹ ΑΓ࡞Λ్தͰ์غ͢Δ͜ͱɺ·ͨͦͷ ঢ়ଶΛද͢ɻ
Slide 40
Slide 40 text
ΤλΒͳ͍ͨΊʹ • ͭ͘ΔҙຯΛࣦ͢ΔͱඞͣΤλͬͯ͠·͏ • ͭ͘ΔҙຯೋͭҎ্͓࣋ͬͯ͘ͷ͕ྑ͍ • ྫ: ࠷৽ͷRailsͷػೳΛࢼ͢ͱͯ͠͏ • ྫ: స৬׆ಈͷͱ͖ʹ໊ΘΓʹ͏ • ྫ: Podcastͷωλͮ͘Γͱͯ͠͏ • ྫ: രྲྀߦΓΛເݟͯ։ൃΛଓ͚Δ • ์ஔͯ͠ಈ͘Α͏ʹ͓ͯ͘͜͠ͱॏཁ
Slide 41
Slide 41 text
ࠓͨ͜͠ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ • ๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
Slide 42
Slide 42 text
͓ΘΓ ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura