Slide 1

Slide 1 text

.Z3FENJOF(FOΛ ࢧ͑ΔΠϯϑϥετϥΫνϟʔ 'BS&OE5FDIOPMPHJFT$PSQPSBUJPO

Slide 2

Slide 2 text

ࣗݾ঺հɾձࣾ঺հ αʔϏε঺հ

Slide 3

Slide 3 text

٢Ԭོߦ 5BLBZVLJ:PTIJPLB ॴଐ ϑΝʔΤϯυςΫϊϩδʔʢגʣ ίϛϡχςΟʔ .BUTVFSC +"846(4IJNBOF ޷͖ͳαʔϏε "84"NQMJGZ

Slide 4

Slide 4 text

ϑΝʔΤϯυςΫϊϩδʔגࣜձࣾ ॴࡏ஍ ίΞϏδωε 044ؔ࿈ ౡࠜݝদߐࢢʢ೥݄ઃཱʣ 4BB4ఏڙ 3FENJOFվળ׆ಈɺ3FENJOF+1ͷӡӦ

Slide 5

Slide 5 text

w೥݄αʔϏε։࢝ wࠃ಺໿༷ࣾʹ͝ఏڙ w3FENJOFͷίϛολʔ͕ࡏ੶ w࠾༻ύονͷ൒਺Ҏ্͕ฐࣾ։ൃ

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

֓ཁ w ೥݄͔Β.Z3FENJOFͷΠϯϑϥ؀ڥΛ࠶ߏங͠ ͖ͯ·ͨ͠ɻͦͯ͠೥݄ʹ.Z3FENJOF(FOͱ ͯ͠ϦϦʔε͞Εͯ൒೥͕ܦա͠·ͨ͠ɻ w ࠓճ͸Πϯϑϥʹ࢖༻͞Ε͍ͯΔٕज़ͱαʔϏεʢओʹ "84ʣͷ͍͔ͭ͘ΛϐοΫΞοϓ͠ɺօ༷ʹ͝঺հͰ͖ Ε͹ͱࢥ͍·͢ɻ w ஫ҙʣίϯςφʢ%PDLFSʣؔ࿈ͷ࿩͕ଟ͘ͳΔ͔ͱࢥ͍ ·͕͢͝ཧղ͍ͩ͘͞ɻ

Slide 8

Slide 8 text

ΞδΣϯμ શମߏ੒ ར༻αʔϏε ߏஙͷϙΠϯτ 3FENJOF 3BJMT ͷίϯςφԽ Ϛϧνςφϯτʹ͍ͭͯ

Slide 9

Slide 9 text

શମߏ੒

Slide 10

Slide 10 text

SBJMTDPOTPMF SBLFUBTLʜ

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

ར༻αʔϏε

Slide 13

Slide 13 text

.BOBHFE4FSWJDF "84ͷ੹೚ൣғͷͳΔ΂͘޿͍αʔϏεΛબ୒ αʔόʢ෺ཧʣ ωοτϫʔΫʢ෺ཧʣ 04ͷ؅ཧ ϛυϧ΢ΣΞ ৑௕ԽɾόοΫΞοϓ ΞϓϦέʔγϣϯ ར༻ʢ"1*ʣ &$ 'BSHBUF -BNCEB FUDʜ 3%4 3PVUF 4 FUDʜ ͳΔ΂͘͜ͷลΓͷαʔϏεΛ࢖͏

Slide 14

Slide 14 text

ίϯςφʢ%PDLFSʣͷ ΦʔέετϨʔγϣϯαʔϏεͷબ୒

Slide 15

Slide 15 text

"84&$4ʢ"NB[PO&MBTUJD$POUBJOFS4FSWJDFʣ $MVTUFS 'BSHBUFͷ৔߹͸ωʔϜεϖʔεͷΑ͏ͳ΋ͷ 4FSWJDF λεΫͷ؅ཧɺεέδϡʔϧϯάͳͲ 5BTL σϓϩΠͷ࠷খ୯Ґʢෳ਺ͷίϯςφΛ؅ཧʣ 'BSHBUF

Slide 16

Slide 16 text

'BSHBUFͷಛ௃ w αʔόʔϨεͳͷͰϗετ04ͷ؅ཧෆཁɻ ʢηΩϡϦςΟͷύον౰ͯͳͲʣ w εέʔϧ࣌ͷΩϟύγςΟʔΛ༨෼ʹ࣋ͨͳͯ͘΋ྑ͍ɻ w 44)ͰϩάΠϯͰ͖ͳ͍ɻ

Slide 17

Slide 17 text

ͦͷଞɺओཁαʔϏε Step Functions EC2 Lambda Aurora CodeBuild CodeCommit CodePipeline CloudFormation S3 S3 Glacier CloudWatch SNS SQS 3FENJOF पลγεςϜ Athena Kinesis Data Firehose AppSync Elastic Container Registry Application Auto Scaling CloudTrail Systems Manager API Gateway Amplify Secrets Manager AWS WAF Fargate ECS ELB Route53 DynamoDB RDS σϓϩΠɾ$*$% αʔϏεΞΧ΢ϯτ؅ཧ

Slide 18

Slide 18 text

ߏஙͷϙΠϯτ 3FENJOFʢ3BJMTʣͷίϯςφԽ ϚϧνςφϯτͷΞʔΩςΫνϟ

Slide 19

Slide 19 text

ߏஙͷϙΠϯτ 3FENJOFʢ3BJMTʣͷίϯςφԽ ϚϧνςφϯτͷΞʔΩςΫνϟ

Slide 20

Slide 20 text

ίϯςφʹ͍ͭͯ

Slide 21

Slide 21 text

3FENJOFΛಈ͔ͨ͢Ίʹ ඞཁͳ΋ͷ w 3VCZϥϯλΠϜʢ3VCZʣ w ґଘϛυϧ΢ΣΞʢ*NBHF.BHJD 1PTUHSF42-ʣ w ґଘϥΠϒϥϦʢSBJMT SNBHJDL QHʣ ґଘؔ܎ΛؚΊ࣮ͨߦ؀ڥΛҰͭͷΠϝʔδʹ·ͱΊͯ͠·͏ɻ Πϝʔδ͝ͱσϓϩΠͰ͖Δʂ

Slide 22

Slide 22 text

ग़యɿIUUQTXXXEPDLFSDPNSFTPVSDFTXIBUDPOUBJOFS ίϯςφͱԾ૝Ϛγϯͷൺֱ

Slide 23

Slide 23 text

ίϯςφͷϝϦοτ ։ൃ؀ڥͱຊ൪؀ڥͷҧ͍͕ͳ͘ͳΔ *OGSBTUSVDUVSFBT$PEFʹ޲͍͍ͯΔ $*$%ͱ૬ੑ͕ྑ͍ʢ%FW0QTʹ޲͍͍ͯΔʣ

Slide 24

Slide 24 text

ίϯςφͷར༻ͷ஫ҙ఺ ΠϝʔδΛCVJME͢Δ࡞ۀ΍؅ཧର৅͕૿͑Δ ঢ়ଶΛ࣋ͨͤΔߏ੒͸೉͍͠ʢσʔλͷӬଓԽʣ

Slide 25

Slide 25 text

3FENJOFίϯςφԽ

Slide 26

Slide 26 text

3FENJOFͰߟྀ͕ඞཁͳ͜ͱ ʢӬଓԽ͕ඞཁͳσʔλʣ w%#ʢσʔλϕʔεʣ wϩά wఴ෇ϑΝΠϧ

Slide 27

Slide 27 text

%#ʢσʔλϕʔεʣʹ͍ͭͯ 3%4"VSPSB1PTUHSF42-ޓ׵ΤσΟγϣϯ

Slide 28

Slide 28 text

-PHͷѻ͍ 4JEFDBS1BUUFSOʢίϯςφΛೋͭ࢖༻ʣͰ ϩάऩू༻ίϯςφʢqVFOUEʣΛ࢖༻ͯ͠ϩάͷऩू

Slide 29

Slide 29 text

ఴ෇ϑΝΠϧ "NB[PO4 "NB[PO&'4 ΞϓϦέʔγϣϯͷมߋ͕ෆཁ ΞϓϦέʔγϣϯͷมߋ͕ඞཁ ʢϓϥάΠϯͳͲʣ ϥϯχϯάίετ͕͍҆ ϥϯχϯάίετ͕ߴΊ ͦ΋ͦ΋։ൃ౰࣌'BSHBUFͰ͸&'4࿈ܞ͕Ͱ͖ͳ͔ͬͨɻ ީิͷൺֱ

Slide 30

Slide 30 text

ఴ෇ϑΝΠϧ ఴ෇ϑΝΠϧͷอଘઌΛ4ʹͰ͖Δ 1MVHJOΛ։ൃʢSFENJDB@Tʣ

Slide 31

Slide 31 text

։ൃཪ࿩ʢۤ࿑࿩ʣ pMFT ఴ෇ϑΝΠϧ͕อଘ UNQUIVNCOBJMT ఴ෇ϑΝΠϧͷαϜωΠϧ͕อଘɻ UNQJNQPSUT $47Πϯϙʔτ࣌ʹҰ࣌ϑΝΠϧ͕อଘɻ ᵓᴷᴷBQQ ᴹᵓᴷᴷDPOUSPMMFST ᴹᵓᴷᴷIFMQFST ᴹᵓᴷᴷNPEFMT ᴹᵋᴷᴷWJFXT ᵓᴷᴷpMFT ᴹᵓᴷᴷYYYYYYY ᴹᵓᴷᴷYYYYYYY ᴹᵋᴷᴷYYYYYYY ᵋᴷᴷUNQ ᵓᴷᴷDBDIF ᵓᴷᴷJNQPSUT ᵋᴷᴷUIVNCOBJMT

Slide 32

Slide 32 text

https://github.com/redmica/redmica_s3

Slide 33

Slide 33 text

ߏஙͷϙΠϯτ 3FENJOFʢ3BJMTʣͷίϯςφԽ ϚϧνςφϯτͷΞʔΩςΫνϟ

Slide 34

Slide 34 text

ϗεςΟϯάαʔϏε ʢ4BB4ʣ ϏδωεϞσϧͷ࿩ γϯάϧςφϯτΑΓϚϧνςφϯτͰ୯ՁΛ཈͍͑ͨ ʢސ٬αʔό͸ݫ͍͠ɻෳ਺ͷސ٬ͰαʔόΛڞ༗͢Δʣ

Slide 35

Slide 35 text

࣮૷ํ๏ "QBDIF1BTTFOHFSΛબ୒ ϓϩηε͝ͱʹ؀ڥม਺Λ੾ସ͑Δʂ

Slide 36

Slide 36 text

Ϛϧνςφϯτ 3FENJOFΛεςʔτϨεʹઃܭ %#αʔόΛར༻ɻϩάͱఴ෇ϑΝΠϧΛ4΁อଘ ઃఆ৘ใʢEBUBCBTFZNM TZNMʣʹ஋͸؀ڥม਺Λར༻͢Δɻ "QBDIFͷࢠϓϩηε͝ͱʢυϝΠϯ͝ͱʣʹઃఆ৘ใʢ؀ڥม਺ʣ͕มΘΔɻ ʢ઀ଓ͢Δ%#ɺఴ෇ϑΝΠϧͷอଘઌ͕มΘΔʣ ιʔείʔυͷڞ༗Խ͕࣮ݱ

Slide 37

Slide 37 text

ߏ੒ਤ

Slide 38

Slide 38 text

ߏ੒ਤ %PDLFSىಈ࣌ʹ4͔Β ؀ڥม਺౳ͷ৘ใΛऔಘ

Slide 39

Slide 39 text

db: name: [db_name] user: [user_name] password: [password] s3: bucket: [user_bucket] folder: [user_folder] property: sub_domain: [sub_domain] limit_ips: - ‘192.168.xx.xx' - '192.168.xx.xx' ઃఆ৘ใ͸4ʹอଘ ˞αϯϓϧΠϝʔδ

Slide 40

Slide 40 text

ߏ੒ਤ %PDLFSىಈ࣌ʹ4͔Β ؀ڥม਺౳ͷ৘ใΛऔಘ

Slide 41

Slide 41 text

$POGϑΝΠϧΛੜ੒ ˞αϯϓϧΠϝʔδ ServerName siteA.example.jp DocumentRoot /var/lib/siteA/public RailsEnv production PassengerEnabled on SetEnv RAILS_DB db001 SetEnv RAILS_DB_USERNAME dbuser001 SetEnv RAILS_DB_PASSWORD xxxxxxxx SetEnv S3_FOLDER_NAME user001 ...

Slide 42

Slide 42 text

ߏ੒ਤ %PDLFSىಈ࣌ʹ4͔Β ؀ڥม਺౳ͷ৘ใΛऔಘ 4JUF"΁ΞΫηε

Slide 43

Slide 43 text

3FENJOFͷઃఆϑΝΠϧͷมߋ # database.yml production: adapter: postgresql database: <%= ENV['RAILS_DB'] %> username: <%= ENV['RAILS_DB_USERNAME'] %> password: <%= ENV['RAILS_DB_PASSWORD'] %> host: <%= ENV['RAILS_DB_HOST'] %> # s3.yml production: bucket: <%= ENV['S3_BUCKET_NAME'] %> folder: <%= ENV['S3_FOLDER_NAME'] %> ˞αϯϓϧΠϝʔδ

Slide 44

Slide 44 text

ߏ੒ਤ %PDLFSىಈ࣌ʹ4͔Β ؀ڥม਺౳ͷ৘ใΛऔಘ 4JUF"΁ΞΫηε

Slide 45

Slide 45 text

༨ஊ

Slide 46

Slide 46 text

ӡ༻ฤ w ΞϓϦέʔγϣϯͷσϓϩΠํ๏ʢখن໛ͳมߋʣ w ΞϓϦέʔγϣϯͷσϓϩΠํ๏ʢ.JHSBUJPO͋Γͷେن໛ͳมߋʣ w αʔϏεΞΧ΢ϯτʢ͓٬༷ʣͷ৽نొ࿥ɾมߋɾఀࢭɾσʔλ࡟আ

Slide 47

Slide 47 text

·ͱΊ ར༻αʔϏε ˠαʔόϨεɺϑϧϚωʔδυαʔϏεΛબ୒ɻ 3FENJOF 3BJMT ͷίϯςφԽ ˠఴ෇ϑΝΠϧͷѻ͍͸4ϓϥάΠϯͰղܾɻ Ϛϧνςφϯτʹ͍ͭͯ ˠݻ༗ͷσʔλͷഉআͱιʔείʔυͷڞ༗Խɻ

Slide 48

Slide 48 text

w೥݄αʔϏε։࢝ wࠃ಺໿༷ࣾʹ͝ఏڙ w3FENJOFͷίϛολʔ͕ࡏ੶ w࠾༻ύονͷ൒਺Ҏ্͕ฐࣾ։ൃ

Slide 49

Slide 49 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ