Slide 1

Slide 1 text

ాଜཾଠ࿠(.01FQBCP *OD 'VLVPLBHP0LBZBNBHP OBOBGTIJΛ࢖ͬͯ؆୯ʹ࡞Δ '64&ͷಈతϑΝΠϧ

Slide 2

Slide 2 text

ΤϯδχΞ ాଜཾଠ࿠!@UPLJCJ ϗεςΟϯάࣄۀ෦ϗεςΟϯάάϧʔϓϚωʔδυΫϥ΢υνʔϜ

Slide 3

Slide 3 text

.PUJWBUJPO

Slide 4

Slide 4 text

ಈతʹத਎͕มΘΔ ϑΝΠϧΛ࡞Γ͍ͨ

Slide 5

Slide 5 text

Πϝʔδ

Slide 6

Slide 6 text

༻్ wϛυϧ΢ΣΞͷઃఆϑΝΠϧΛੜ੒ wൿີ伴ͷΑ͏ͳϑΝΠϧͰ͋Δ͜ͱΛཁٻ͞ΕΔೝূ৘ใΛऔಘ wϩάσʔλΛσΟεΫͰ͸ͳ͘֎෦ͷετΞʹอଘ

Slide 7

Slide 7 text

ྫCBTI@IJTUPSZ wCBTI@IJTUPSZΛ֎෦ͷετΞʹอଘ͢Δ

Slide 8

Slide 8 text

ίϚϯυ ৼΔ෣͍ Λ ϑΝΠϧʹٖଶͤ͞Δͱ৭ʑͰ͖ͦ͏

Slide 9

Slide 9 text

"QQSPBDI

Slide 10

Slide 10 text

'64& 'JMFTZTUFNJO6TFSTQBDF wϢʔβ্ۭؒͰϑΝΠϧγεςϜ Λ࡞੒͢Δ࢓૊Έ wEFWGVTFΛհͯ͠Χʔωϧۭ ؒͱϢʔβۭؒͷؒͰϑΝΠϧ΁ ͷΞΫηεཁٻΛ΍ΓऔΓ͢Δ w'64&σʔϞϯ͸ड͚औͬͨϦΫ ΤετΛॲཧͯ͠Χʔωϧۭؒʹ ฦ͢ Ҿ༻ݩIUUQTKBXJLJQFEJBPSHXJLJ'JMFTZTUFN@JO@6TFSTQBDF

Slide 11

Slide 11 text

ϥΠϒϥϦ΋͋Δ͠ ؆୯ʹͰ͖ΔͷͰ͸

Slide 12

Slide 12 text

࣮૷ wHJUIVCDPNIBOXFOHPGVTFΛ࢖༻ wTBNQMF͕๛෋Ͱཧղ͠΍͍͢ wJOPEFϕʔεͰॲཧΛఆٛ͢ΔOPEFGTͱɺϑΝΠϧύεϕʔεͰॲཧ Λఆٛ͢ΔQBUIGTͷछྨͷ࣮૷ํ๏͕͋Δ wࠓճ͸JOPEFΛ஍ಓʹ࡞੒͍ͯ͘͠OPEFGTΛબ୒

Slide 13

Slide 13 text

࣮૷Πϝʔδ

Slide 14

Slide 14 text

͑

Slide 15

Slide 15 text

શવ؆୯ ͡Όͳ͍

Slide 16

Slide 16 text

1SPCMFN

Slide 17

Slide 17 text

ෳࡶ͞ͷݪҼ wσΟϨΫτϦ΍ϑΝΠϧ΁ͷΞΫηε࣌ʹԿͷγεςϜίʔϧ͕ൃߦ ͞ΕͯɺͲͷΑ͏ͳ৘ใΛඞཁͱ͢Δͷ͔೺Ѳ͍ͯ͠ͳ͍ͱ͍͚ͳ͍ ϨΠϠ௿Ί wγεςϜίʔϧͷର৅͕JOPEFͳͷ͔ɺJOPEFΛPQFOͨ࣌͠ʹੜ੒ ͞ΕΔ'JMFߏ଄ମͳͷ͔ͰৼΔ෣͍Λม͑Δඞཁ͕͋Δ wEFOUSZ΍ϖʔδΩϟογϡͷڍಈΛ஌Βͳ͍ͱɺࢥͬͨΑ͏ʹಈ͔ ͳ͍͕࣌͋Δ ಈ͔ͳ͔ͬͨ

Slide 18

Slide 18 text

΍Γ͍ͨ͜ͱ͸

Slide 19

Slide 19 text

ϑΝΠϧʹΞΫηεͨ͠Β ͍͍ײ͡ͰίϚϯυΛ࣮ߦͯ͠΄͍͠

Slide 20

Slide 20 text

1SPQPTBM

Slide 21

Slide 21 text

HJUIVCDPNUPLJCJOBOBGTIJ

Slide 22

Slide 22 text

OBOBGTIJ w໨త w'64&͸৭ʑͰָ͖ͯͦ͠͏͚ͩͲ࣮૷͸େม w΋ͬͱΧδϡΞϧʹ'64&ͰಈతͳϑΝΠϧΛ࡞Γ͍ͨ wඞཁͱ͢Δલఏ஌ࣝ γεςϜίʔϧͳͲ ΛͰ͖Δ͚ͩগͳ͍ͨ͘͠ w΍Γ͍ͨ͜ͱ͕มΘΔ౓ʹɺίʔυΛॻ͍ͯϏϧυͯ͠όΠφϦΛ ࠶഑෍͢ΔखؒΛແ͍ͨ͘͠

Slide 23

Slide 23 text

OBOBGTIJ wZBNMͰσΟϨΫτϦͷߏ଄ͱϑΝΠϧΞΫηε࣌ͷৼΔ෣͍Λఆٛ wࢦఆͨ͠γΣϧͰఆٛ͞ΕͨίϚϯυΛ࣮ߦ͢Δ wεΫϦϓτͰ΋όΠφϦͰ΋ԿͰ΋ wϑΝΠϧΞΫηε࣌ʹϓϩηε͔Β౉͖ͬͯͨ৘ใΛίϚϯυ࣮ߦ࣌ ʹ؀ڥม਺ͱͯ͠ઃఆ͢Δ

Slide 24

Slide 24 text

ઃఆྫ shell: /bin/bash services: - name: dir files: - name: now read: command: date - name: writable write: async: true command: echo $FUSE_STDIN >> /tmp/file

Slide 25

Slide 25 text

ಈ࡞ྫ $ nanafshi -c config.yml /mnt/nanafshi $ tree /mnt/nanafshi /mnt/nanafshi └── dir ├── now └── writable $ cat /mnt/nanafshi/dir/now Tue Feb 12 14:53:56 JST 2019

Slide 26

Slide 26 text

Ґஔ෇͚

Slide 27

Slide 27 text

࣮૷ྫ func (n CommandFile) Open(flags uint32, ctx *fuse.Context) (nodefs.File, fuse.Status) { if flags&fuse.O_ANYWRITE != 0 { return nodefs.NewDevNullFile(), fuse.OK } p, err := n.ReadFile(ctx) if err != nil { return nil, fuse.EIO } return &nodefs.WithFlags{ File: nodefs.NewDataFile(p), FuseFlags: fuse.FOPEN_DIRECT_IO, }, fuse.OK } wJOPEF΁ͷૢ࡞ΛJOUFSGBDFͱͯ͠ఆٛͯ͘͠ΕͯΔͷͰͦΕΛຬͨ͢

Slide 28

Slide 28 text

࣮૷ྫ func (n CommandFile) ReadFile(ctx *fuse.Context) ([]byte, error) { cmd, err := n.ReadCommand.Command.Build(conf.Shell, n.makeEnv(ctx)) if err != nil { return nil, err } out, err := cmd.Output() if err != nil { return nil, err } return out, nil } w'JMFTZTUFNͷίΞ࣮૷

Slide 29

Slide 29 text

ۤ࿑ͨ͠ͱ͜Ζ wEFOUSZͱ͔ϖʔδΩϟογϡͷษڧ w7'4ʹର͢ΔΠϯλʔϑΣʔεͷ࣮૷ JOPEFPQFSBUJPOT ͱɺϑΝΠ ϧγεςϜͱͯ͠ԿΛ͍ͨ͠ͷ͔Λ࣮૷͢Δ෦෼Λ෼཭ͤ͞ͳ͍ͱɺ ࠞಱͱͯ͘͠Δ wࣗ෼͕JOPEFΛ࡞͍ͬͯΔͷ͔'JMFߏ଄ମΛ࡞͍ͬͯΔͷ͔Θ͔Βͳ ͘ͳͬͯ͘Δ

Slide 30

Slide 30 text

࣮૷ͷϙΠϯτ

Slide 31

Slide 31 text

·ͱΊ w'64&͸৭ʑͰ͖ͦ͏Ͱເ͕޿͕Δ w࣮૷͕େมͰ΍Δؾ͕Ͱͳ͔ͬͨํ͸OBOBGTIJͰ࣮ݧͯ͠ΈͯԼ͍͞ wOBOBGTIJ͕ཪͰίϚϯυΛ࣮ߦ ผϓϩηε͕ىಈ ͢ΔͷͰएׯͷ Φʔόʔϔου͕͋Γ·͢ w໘ന͍࢖͍ํ͕͋ͬͨΒڭ͑ͯԼ͍͞