Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RancherOS - for containers, by containers

RancherOS - for containers, by containers

Rancher Meetup Fukuoka(福岡) #1 での発表資料。
RancherOSの概要、利用方法、内部動作(主に起動関連)、最近の開発状況について扱っています。

Kazumichi Yamamoto

August 07, 2017
Tweet

More Decks by Kazumichi Yamamoto

Other Decks in Technology

Transcript

  1. 1SPEVDUTGPS͘͞ΒͷΫϥ΢υ ͘͞ΒͷΫϥ΢υ ެೝ$-*ʮVTBDMPVEʯ 5FSSBGPSNGPS ͘͞ΒͷΫϥ΢υ 1BDLFSGPS ͘͞ΒͷΫϥ΢υ %PDLFS.BDIJOF *OGSB,JU 8PSE1SFTT

     ΦϒδΣΫτετϨʔδ 8PSE1SFTT  ΢ΣϒΞΫηϥϨʔλ .BDLFSF౷߹πʔϧ ʮ4BDLFSFMʯ LVCFTBDMPVE $PNJOH4PPO
  2. ؅ཧίϚϯυ SPT $ sudo ros [global options] command [command options]

    [arguments...] ίϚϯυ આ໌ DPOGJH ઃఆͷมߋ DPOTPMF ίϯιʔϧͷ੾Γସ͑ FOHJOF 6TFS%PDLFSͷόʔδϣϯ੾Γସ͑ TFSWJDF αʔϏε ίϯςφ ͷ؅ཧ PT 3BODIFS04ࣗମͷόʔδϣϯΞοϓ JOTUBMM 3BODIFS04ΛσΟεΫ΁ͷΠϯετʔϧ SPTίϚϯυͷओͳػೳ ίϚϯυ
  3. SPT DPOGJHίϚϯυ $ sudo ros config command [arguments...] ίϚϯυ આ໌

    HFU ࢦఆΩʔͷݱࡏͷઃఆ஋Λऔಘ TFU ࢦఆΩʔͷ஋Λઃఆ FYQPSU ݱࡏͷઃఆΛZBNMܗࣜͰදࣔ WBMJEBUF ࢦఆͷϑΝΠϧͷݕূ SPT DPOGJHίϚϯυ ઃఆؔ࿈ͷૢ࡞
  4. SPT DPOTPMFίϚϯυ $ sudo ros console command [arguments...] ίϚϯυ આ໌

    TXJUDI ίϯιʔϧͷ੾Γସ͑ ଈ੾ସ FOBCMF ίϯιʔϧͷ੾Γସ͑ ࣍ճ࠶ىಈ࣌ʹ੾ସ MJTU ར༻ՄೳͳίϯιʔϧͷҰཡදࣔ SPT DPOTPMFίϚϯυ ίϯιʔϧؔ࿈ͷૢ࡞ • EFGBVMU • BMQJOF • DFOUPT • EFCJBO • GFEPSB • VCVOUV ˞W࣌఺
  5. 3BODIFS04ͰͷDPOTPMF -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF EPDLFS

    • 3BODIFS04ʹ͓͚ΔγΣϧɺHFUUZ΍TTIEΛఏڙ • σϑΥϧτ͸#VTZ#PYϕʔε • ίϯςφ͔ͩΒ੾ସ͸ΠϝʔδΛࠩ͠ସ͑Δ͚ͩ
  6. SPT FOHJOFίϚϯυ $ sudo ros engine command [arguments...] ίϚϯυ આ໌

    TXJUDI %PDLFSͷ੾Γସ͑ ଈ੾ସ FOBCMF %PDLFSͷ੾Γସ͑ ࣍ճ࠶ىಈ࣌ʹ੾ସ MJTU ར༻Մೳͳ%PDLFSΤϯδϯͷҰཡදࣔ SPT FOHJOFίϚϯυ FOHJOF %PDLFS ؔ࿈ͷૢ࡞
  7. 3BODIFS04ͰͷFOHJOF EPDLFS -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF

    EPDLFS • VTFSEPDLFS͸TZTUFNEPDLFS্ͷίϯςφ • ίϯςφ͔ͩΒ ҎԼུ
  8. TFSWJDFͱ͸ -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF EPDLFS

    • ओཁͳσʔϞϯྨ͸TFSWJDFͱͯ͠ఏڙ͞Ε͍ͯΔ • VTFSEPDLFS্ͰՔಇ͢ΔTFSWJDF΋͋Δ SBODIFSTFSWFSαʔϏεͳͲ
  9. SPT TFSWJDFίϚϯυ $ sudo ros service command [arguments...] SPT TFSWJDFίϚϯυ

    αʔϏεؔ࿈ͷૢ࡞ ίϚϯυ આ໌ MJTU αʔϏε ఆٛ ͷҰཡදࣔ FOBCMFEJTBCMFEFMFUF αʔϏε ఆٛ ͷ༗ޮແޮԽ࡟আ QVMMCVJME αʔϏεͰར༻͢ΔΠϝʔδͷऔಘϏϧυ VQTUBSUSFTUBSUTUPQ αʔϏεͷىಈఀࢭ QT ىಈ͍ͯ͠ΔαʔϏε ίϯςφ ͷҰཡදࣔ MPHT αʔϏεͷϩάදࣔ ˞Ұ෦ͷίϚϯυͷΈൈਮ
  10. αʔϏεͷఆٛ $ sudo ros service enable [docker-compose.yaml] # ϑΝΠϧύεΛࢦఆ $

    sudo ros service enable /var/lib/rancher/conf/example.yml # 63-Λࢦఆ $ sudo ros service enable https://example.com/example.yml ࣮ߦྫ ˞SPTίϚϯυͷ୅ΘΓʹDMPVEDPOGJHZNMΛ༻͍ͯఆٛ͢Δ͜ͱ΋Մೳ
  11. αʔϏεͷར༻ $ sudo ros service up <service name>... αʔϏεͷىಈ $

    sudo ros service logs <service name>... αʔϏεͷϩάදࣔ $ sudo ros service ps ىಈ͍ͯ͠ΔαʔϏεͷҰཡ
  12. ࢀߟಠࣗϦϙδτϦ͔ΒͷαʔϏε௥Ճ [repo root] ├── index.yml ├── n │ └── nginx.yml

    ├── o │ └── open-vm-tools.yml └── r └── rancher-server.yml ϦϙδτϦͷϑΝΠϧߏ੒ ΠϯσοΫεϑΝΠϧ services: - nginx - open-vm-tools - rancher-server
  13. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    ࣮ମ͸SPTόΠφϦ HP੡ͷಠࣗόΠφϦ VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS 1*% %JTL 3". 3".%JTL γεςϜίϯςφىಈ ࣮ମ͸SPTόΠφϦ NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF 3BODIFS04ಠࣗͷ΋ͷ ˞ओͳॲཧͷΈൈਮ
  14. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
  15. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ిݯ౤ೖʙϒʔτϩʔμ ˞σϑΥϧτ͸TZTMJOVYɺ17(36#΋બ΂Δ ˞ओͳॲཧͷΈൈਮ
  16. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF -;." DQJP JOJUSBNGT ˞ओͳॲཧͷΈൈਮ
  17. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ΧʔωϧΠϝʔδJOJUSEల։ɺJOJU࣮ߦ -;." DQJP JOJUSBNGT ˞ओͳॲཧͷΈൈਮ
  18. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
  19. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF Ϛ΢ϯτ EFWUNQGT΍QSPDɺTZT ΧʔωϧϞδϡʔϧϩʔυͳͲ ˞ओͳॲཧͷΈൈਮ
  20. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
  21. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF TUBUFʹσΟεΫΛϚ΢ϯτ DISPPU ˞Χʔωϧύϥϝʔλ SBODIFSTUBUFEFW͕༩͑ΒΕ͍ͯͨ৔߹ ˞ओͳॲཧͷΈൈਮ
  22. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
  23. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF γεςϜίϯςφͷىಈ ࣮ମ͸SPTίϚϯυ ˞ओͳॲཧͷΈൈਮ
  24. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
  25. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF TZTUFNEPDLFSΛFYFD 1*% 1*% ˞ओͳॲཧͷΈൈਮ
  26. ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE

    ࣮ମ͸SPTόΠφϦ HP੡ͷಠࣗόΠφϦ VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS 1*% %JTL 3". 3".%JTL γεςϜίϯςφىಈ ࣮ମ͸SPTόΠφϦ NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF 3BODIFS04ಠࣗͷ΋ͷ ˞ओͳॲཧͷΈൈਮ