Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RancherOS - for containers, by containers
Search
Kazumichi Yamamoto
August 07, 2017
Technology
5
810
RancherOS - for containers, by containers
Rancher Meetup Fukuoka(福岡) #1 での発表資料。
RancherOSの概要、利用方法、内部動作(主に起動関連)、最近の開発状況について扱っています。
Kazumichi Yamamoto
August 07, 2017
Tweet
Share
More Decks by Kazumichi Yamamoto
See All by Kazumichi Yamamoto
オートスケールにおけるオブザーバビリティへの取り組み / Observability with autoscale
yamamotofebc
1
360
からあげの町からお届けするフルリモートSREの日常 / 2023-06-21 tech lunch
yamamotofebc
0
200
「合意のない期待」を防ぐためのドラッカー風エクササイズ
yamamotofebc
3
1k
さくらのクラウド向けオートスケーラー / autoscaler for SAKURA cloud
yamamotofebc
1
1.8k
sacloud tools
yamamotofebc
1
88
Rioでコンテナを楽しくする / Rio − Make Containers Fun!
yamamotofebc
2
670
Rancher 2.0 HA with Terraform
yamamotofebc
3
3.5k
Rancher Meetup Hiroshima #1 LT - カタログを使ってみよう // Rancher Meetup Hiroshima 2018-05-11
yamamotofebc
2
610
Rancher Meetup KYOTO #1 LT - 外からコンテナに繋ぐには? // Rancher Meetup Kyoto 2018-04-27
yamamotofebc
4
420
Other Decks in Technology
See All in Technology
The Rise of LLMOps
asei
7
1.4k
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
620
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
フルカイテン株式会社 採用資料
fullkaiten
0
40k
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Lexical Analysis
shigashiyama
1
150
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Six Lessons from altMBA
skipperchong
27
3.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Why Our Code Smells
bkeepers
PRO
334
57k
GraphQLとの向き合い方2022年版
quramy
43
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Being A Developer After 40
akosma
86
590k
Code Review Best Practice
trishagee
64
17k
Designing Experiences People Love
moore
138
23k
Designing for Performance
lara
604
68k
Bash Introduction
62gerente
608
210k
Transcript
3BODIFS.FFUVQ'6,60," !ZBNBNPUP@GFCD GPSDPOUBJOFST CZDPOUBJOFST
ࢁຊ ಓ !ZBNBNPUP@GFCD üେݝࡏॅɺϐΞϊ ҆৺ӃϫΠϯ -PWFS ü͘͞ΒͷΫϥυؔ࿈ͷΦʔϓϯιʔε։ൃ 8IP
1SPEVDUTGPS͘͞ΒͷΫϥυ ͘͞ΒͷΫϥυ ެೝ$-*ʮVTBDMPVEʯ 5FSSBGPSNGPS ͘͞ΒͷΫϥυ 1BDLFSGPS ͘͞ΒͷΫϥυ %PDLFS.BDIJOF *OGSB,JU 8PSE1SFTT
ΦϒδΣΫτετϨʔδ 8PSE1SFTT ΣϒΞΫηϥϨʔλ .BDLFSF౷߹πʔϧ ʮ4BDLFSFMʯ LVCFTBDMPVE $PNJOH4PPO
ࡢ ɺ3BODIFS04ͷ ίϯτϦϏϡʔλʹͳΓ·ͨ͠ʂʂ
3BODIFS
None
։ൃݩ
ίϯςφཧϓϥοτϑΥʔϜ
ίϯςφ͚ܰྔ04
ࢄϒϩοΫετϨʔδ
0WFSWJFX
Α͋͘Δצҧ͍ 3BODIFS04 3BODIFSΛಈ͔ͨ͢Ίͷ04
Α͋͘Δצҧ͍ 3BODIFS04 3BODIFSΛಈ͔ͨ͢Ίͷ04
0WFSWJFX ü ίϯςφʹΑΔ ü ίϯςφͷͨΊͷ ü γϯϓϧܰྔͳ04
• %PDLFSʹಛԽ͍ͯ͠Δ • αΠζ͕খ͘͞ىಈ͕ૣ͍ • 4ZTUFN6TFSͷͭͷ%PDLFSΠϯελϯε • JOJUγεςϜʹ%PDLFSΛར༻ 0WFSWJFX
ྨɿίϯςφϗετ͚04
%PDLFSʹಛԽͨ͠04
αΠζ͕খ͍͞ .# ˞ W࣌ͰͷWNMJOV[ JOJUSEͷαΠζ
-JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF EPDLFS VTFSEPDLFS
͕ͯ͢%PDLFS
4ZTUFNͱ6TFSɺͭͷ%PDLFS
1*% 1*% JOJUγεςϜ%PDLFS
• %PDLFSʹಛԽ͍ͯ͠Δ • αΠζ͕খ͘͞ىಈ͕ૣ͍ • 4ZTUFN6TFSͷͭͷ%PDLFSΠϯελϯε • JOJUγεςϜʹ%PDLFSΛར༻ 0WFSWJFX
0WFSWJFX ü ίϯςφʹΑΔ ü ίϯςφͷͨΊͷ ü γϯϓϧܰྔͳ04
GPSDPOUBJOFST CZDPOUBJOFST
*OTUBMMBUJPO
• *40Πϝʔδ $%30. ͔Βىಈ • σΟεΫʹΠϯετʔϧͯ͠ىಈ • ֤छΫϥυϓϩόΠμ͕ఏڙ͢ΔΠϝʔδΛར༻ ࣮ߦΠϯετʔϧํ๏ ˞0QFO4UBDL19&ʹରԠ͍ͯ͠·͢
ϓϩϏδϣχϯά DMPVEDPOGJHZNM Χʔωϧύϥϝʔλ ϝλσʔλαʔϏε $POGJH %SJWF config-2
"ENJOJTUSBUJPO
ཧίϚϯυ SPT $ sudo ros [global options] command [command options]
[arguments...] ίϚϯυ આ໌ DPOGJH ઃఆͷมߋ DPOTPMF ίϯιʔϧͷΓସ͑ FOHJOF 6TFS%PDLFSͷόʔδϣϯΓସ͑ TFSWJDF αʔϏε ίϯςφ ͷཧ PT 3BODIFS04ࣗମͷόʔδϣϯΞοϓ JOTUBMM 3BODIFS04ΛσΟεΫͷΠϯετʔϧ SPTίϚϯυͷओͳػೳ ίϚϯυ
SPT DPOGJHίϚϯυ $ sudo ros config command [arguments...] ίϚϯυ આ໌
HFU ࢦఆΩʔͷݱࡏͷઃఆΛऔಘ TFU ࢦఆΩʔͷΛઃఆ FYQPSU ݱࡏͷઃఆΛZBNMܗࣜͰදࣔ WBMJEBUF ࢦఆͷϑΝΠϧͷݕূ SPT DPOGJHίϚϯυ ઃఆؔ࿈ͷૢ࡞
SPT DPOTPMFίϚϯυ $ sudo ros console command [arguments...] ίϚϯυ આ໌
TXJUDI ίϯιʔϧͷΓସ͑ ଈସ FOBCMF ίϯιʔϧͷΓସ͑ ࣍ճ࠶ىಈ࣌ʹସ MJTU ར༻ՄೳͳίϯιʔϧͷҰཡදࣔ SPT DPOTPMFίϚϯυ ίϯιʔϧؔ࿈ͷૢ࡞ • EFGBVMU • BMQJOF • DFOUPT • EFCJBO • GFEPSB • VCVOUV ˞W࣌
3BODIFS04ͰͷDPOTPMF -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF EPDLFS
• 3BODIFS04ʹ͓͚ΔγΣϧɺHFUUZTTIEΛఏڙ • σϑΥϧτ#VTZ#PYϕʔε • ίϯςφ͔ͩΒସΠϝʔδΛࠩ͠ସ͑Δ͚ͩ
SPT FOHJOFίϚϯυ $ sudo ros engine command [arguments...] ίϚϯυ આ໌
TXJUDI %PDLFSͷΓସ͑ ଈସ FOBCMF %PDLFSͷΓସ͑ ࣍ճ࠶ىಈ࣌ʹସ MJTU ར༻Մೳͳ%PDLFSΤϯδϯͷҰཡදࣔ SPT FOHJOFίϚϯυ FOHJOF %PDLFS ؔ࿈ͷૢ࡞
3BODIFS04ͰͷFOHJOF EPDLFS -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF
EPDLFS • VTFSEPDLFSTZTUFNEPDLFS্ͷίϯςφ • ίϯςφ͔ͩΒ ҎԼུ
%&.0
6TBHF
TFSWJDFͱ 㲈 service • EPDLFSDPNQPTFܗࣜͰఆٛ͞Εͨίϯςφ ৗறΞϓϦ 8FCαʔόͳͲ ϘϦϡʔϜͷఏڙ ίϚϯυͷఏڙ command
TFSWJDFͷׂ
TFSWJDFͱ -JOVY,FSOFM 4ZTUFN%PDLFS OUQ OFUXPSL VEFW BDQJE TZTMPH DPOTPMF EPDLFS
• ओཁͳσʔϞϯྨTFSWJDFͱͯ͠ఏڙ͞Ε͍ͯΔ • VTFSEPDLFS্ͰՔಇ͢ΔTFSWJDF͋Δ SBODIFSTFSWFSαʔϏεͳͲ
SPT TFSWJDFίϚϯυ $ sudo ros service command [arguments...] SPT TFSWJDFίϚϯυ
αʔϏεؔ࿈ͷૢ࡞ ίϚϯυ આ໌ MJTU αʔϏε ఆٛ ͷҰཡදࣔ FOBCMFEJTBCMFEFMFUF αʔϏε ఆٛ ͷ༗ޮແޮԽআ QVMMCVJME αʔϏεͰར༻͢ΔΠϝʔδͷऔಘϏϧυ VQTUBSUSFTUBSUTUPQ αʔϏεͷىಈఀࢭ QT ىಈ͍ͯ͠ΔαʔϏε ίϯςφ ͷҰཡදࣔ MPHT αʔϏεͷϩάදࣔ ˞Ұ෦ͷίϚϯυͷΈൈਮ
αʔϏεͷఆٛ $ 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Λ༻͍ͯఆٛ͢Δ͜ͱՄೳ
αʔϏεͷར༻ $ sudo ros service up <service name>... αʔϏεͷىಈ $
sudo ros service logs <service name>... αʔϏεͷϩάදࣔ $ sudo ros service ps ىಈ͍ͯ͠ΔαʔϏεͷҰཡ
%&.0
ಠࣗϦϙδτϦ͔ΒͷαʔϏεՃ 8FC্ͷϦϙδτϦ͔ΒαʔϏεఆٛΛऔಘ͢Δ͜ͱ͕Մೳ ྫɿ 3BODIFS04ࠐαʔϏεɿ https://github.com/rancher/os-services ಠࣗϦϙδτϦͷαϯϓϧɿ https://roastlink.github.io
ࢀߟಠࣗϦϙδτϦ͔ΒͷαʔϏεՃ [repo root] ├── index.yml ├── n │ └── nginx.yml
├── o │ └── open-vm-tools.yml └── r └── rancher-server.yml ϦϙδτϦͷϑΝΠϧߏ ΠϯσοΫεϑΝΠϧ services: - nginx - open-vm-tools - rancher-server
ࢀߟಠࣗϦϙδτϦ͔ΒͷαʔϏεՃ 8FCϦϙδτϦΛ͏ͨΊͷઃఆ SPTίϚϯυͷ߹ $ sudo ros config set rancher.repositories.<name>.url <repo-url>
DMPVEDPOGJHZNMͰઃఆ͢Δ߹ #cloud-config.yml rancher: repositories: <name>: url: <repo-url>
"EWBODFEUPQJD
ىಈͷΈ 2 TZTUFNEPDLFS 1*% ͬͯ Ͳ͏ͬͯىಈͯ͠Δͷʁ
ىಈͷΈ " HPͰॻ͔ΕͨಠࣗͷJOJUͰॲཧ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
࣮ମSPTόΠφϦ HPͷಠࣗόΠφϦ VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS 1*% %JTL 3". 3".%JTL γεςϜίϯςφىಈ ࣮ମSPTόΠφϦ NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF 3BODIFS04ಠࣗͷͷ ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ిݯೖʙϒʔτϩʔμ ˞σϑΥϧτTZTMJOVYɺ17(36#બΔ ˞ओͳॲཧͷΈൈਮ
ϒʔτϩʔμ CPPU ˞ಡΈ͘͢͢ΔͨΊ*/$-6%&Λల։͍ͯ͠·͢
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF -;." DQJP JOJUSBNGT ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ΧʔωϧΠϝʔδJOJUSEల։ɺJOJU࣮ߦ -;." DQJP JOJUSBNGT ˞ओͳॲཧͷΈൈਮ
JOJUSEͷ༰ SPT • SPTίϚϯυHPͰॻ͔Εͨ3BODIFS04ͷίΞ • ࣮ߦϑΝΠϧ໊ BSHW<> Ͱಈ࡞Λସ •
JOJUVTSCJOTZTUFNEPDLFSͷ࣮ମSPTίϚϯυ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF Ϛϯτ EFWUNQGTQSPDɺTZT ΧʔωϧϞδϡʔϧϩʔυͳͲ ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF TUBUFʹσΟεΫΛϚϯτ DISPPU ˞Χʔωϧύϥϝʔλ SBODIFSTUBUFEFW͕༩͑ΒΕ͍ͯͨ߹ ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF γεςϜίϯςφͷىಈ ࣮ମSPTίϚϯυ ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS %JTL 3". 3".%JTL NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF TZTUFNEPDLFSΛFYFD 1*% 1*% ˞ओͳॲཧͷΈൈਮ
ىಈͷྲྀΕ #*046&'* .#3 ϒʔτϩʔμ TZTMJOVY WNMJOV[ JOJUSE JOJU WNMJOV[ JOJUSE
࣮ମSPTόΠφϦ HPͷಠࣗόΠφϦ VTSCJOSPTTZTJOJU FYFD TZTUFNEPDLFS 1*% %JTL 3". 3".%JTL γεςϜίϯςφىಈ ࣮ମSPTόΠφϦ NPVOU DISPPU TUBSU ଈϦλʔϯ TUBUF 3BODIFS04ಠࣗͷͷ ˞ओͳॲཧͷΈൈਮ
ىಈͷΈͷϙΠϯτ • SPTίϚϯυΛJOJUͱ࣮ͯ͠ߦ • JOJUͷ࠷ޙͰTZTUFNEPDLFSΛFYFD SPT ͷίΞ
࠷ۙͷঢ়گ
W͚ͯ 8JUIXFXJMMTIJGUUIFGPDVTGSPN %PDLFSUPDPOUBJOFSE 0$* BOE-JOVY,JU Ҿ༻ݩIUUQTOFXTZDPNCJOBUPSDPNJUFN JE
W͚ͯ &YQFSJNFOUBM
W͚ͯ ΄΅ຖίϛοτɺ ׆ൃʹ։ൃத
&OKPZ IUUQTHJUIVCDPNSBODIFSPT GPSDPOUBJOFST CZDPOUBJOFST