Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Chatops, AWS, And Ansible
Search
nnao45
December 06, 2018
2
980
Chatops, AWS, And Ansible
nnao45
December 06, 2018
Tweet
Share
More Decks by nnao45
See All by nnao45
MPI Performance Evaluation of Raspberry Pi4 Cluster with Android OS
nnao45
2
160
datalake-party-for-aws-20201118
nnao45
0
220
はじめてのNetwork Service Mesh
nnao45
4
2.1k
EKS for EFS
nnao45
4
1.4k
まだ大きくない僕たちに必要なCLoud Nativeを求めて
nnao45
8
1.1k
Firebase, Firestore Find mBaaS
nnao45
3
1k
what happens when k8s journy
nnao45
16
9k
Make App, Using with Study Group
nnao45
3
590
Ansible container in the kubernetes
nnao45
5
1.5k
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.2k
Designing Experiences People Love
moore
138
23k
Building an army of robots
kneath
302
43k
Gamification - CAS2011
davidbonilla
80
5k
Rails Girls Zürich Keynote
gr2m
94
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Ace a Technical Interview
jacobian
276
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Side Projects
sachag
452
42k
What's new in Ruby 2.0
geeforr
343
31k
Transcript
CHATOPS,AWS, AND ANSBLE CyberAgent, inc. @nnao45 with cndjp
ˏnnao45 ✓ 27ࡀ(ฏ3ੜ·Ε) ✓ ࠓओʹΫϥυ ✓ ཱڭେֶཧֶ෦ԽֶՊଔۀ ✓ ςχεྺ10 ✓
ITྺ4 ✓ Go࠷ߴ!!zsh࠷ߴ!! ✓cndjpษڧձӡӦ ✓גࣜձࣾαΠόʔΤʔδΣϯτॴଐ ✓ ݩISPͷNWϝΠϯ $ WHOIS NNAO45
JAPAN CONTAINER DAYS!! ͓ർΕ༷Ͱͨ͠ʢɾ˜ɾʣ
JAPAN CONTAINER DAYS!! ͓ർΕ༷Ͱͨ͠ʢɾ˜ɾʣ https://speakerdeck.com/cndjp/jkd-v18-dot-12-2w3
JAPAN CONTAINER DAYS!! ͓ർΕ༷Ͱͨ͠ʢɾ˜ɾʣ https://speakerdeck.com/cndjp/jkd-v18-dot-12-2w3
SHOW CNDJP INFRASTRUCTURE ଟ͘ͷΠϯϑϥͷ՝ͱཁٻɾɾɾʂ ࣗಈతʹΫϥυ(AWS)Λબ ʮશίʔυཧxࣗಈCD͕ඞਢʯ વશίϯϙʔωϯτΛίʔυԽ कඋൣғͷ͞ͱ׳ΕͯΔͱ͍͏ ཧ༝ʹΑΓɺAnsibleΛ࠾༻ Զ͡Όͳͯ͘σϓϩΠͰ͖ΔΑ͏
SlackʹΑΔChatOpsͷ࣮ ։ൃ࣌ʮͷΈʯશΠϯϑϥΛ୭ͰσϓϩΠ ·ɺϚωʔ ͕ɾɾɾɾɻ
SHOW CNDJP INFRASTRUCTURE ଟ͘ͷΠϯϑϥͷ՝ͱཁٻɾɾɾʂ એݴతઃఆ͕ՄೳͳK8SΛ࠾༻ શίϯϙʔωϯτΛCloudformation AnsibleʹΑΓႈੑΛ֬อʂ ͞ΒʹύΠϓϥΠϯʹSpinnakerɺ όοΫΞοϓπʔϧʹHeptio/ArkΛ Λ༻ͯ͠ঢ়ଶΛ҆Ձʹอ࣋Ͱ͖Δ
ύΠϓϥΠϯΛߏங ͍ऴΘͬͨΒɺʮঢ়ଶΛอ࣋ͯ͠ʯશ෦Լ͛Δ
SHOW CNDJP INFRASTRUCTURE
SHOW CNDJP INFRASTRUCTURE ϩάऩू ࢹ τϨʔγϯά ίϯςφ ϥϯλΠϜ ίϯςφ Φʔέετϥ
ՄࢹԽ αʔϏε σΟεΧόϦ ߏཧ ΠϯϑϥCD RDS Ωϟογϡ όοΫΞοϓ ϑϩϯτ ίʔυཧ CICD ύΠϓϥΠϯ ΧφϦΞϦϦʔε+GitOps+CNΛ࣮ݱ͢ΔϛυϧΣΞ
SHOW CNDJP INFRASTRUCTURE deploy!!
SHOW CNDJP INFRASTRUCTURE destroy!!
SHOW CNDJP INFRASTRUCTURE destroy!!
THIS IS “COOL” INFRASTRUCTUREʁ
SO…BUT, AND “TURAMI”ʂ
WHAT IS THE “TURAMI” ίϯςφωΠςΟϒͳίϯςϯπσϦόϦ͕ͭΒΈ Kubernetes্ͰύΠϓϥΠϯΛ ݁ͤ͞ΔͨΊͷ੍͕ਏ͍ɻ ̍γΣϧڬΈ͍ͨͷʹɺ ֎෦ύΠϓϥΠϯʮWebhookʯ ͚ͩͩͱɾɾɾɾʂʁ
VMͰAnsibleΛ༻ҙ͕ͨ͠ɺ ૬͑ͨײ͕͋ΔʢŬŧŒŗ ύΠϓϥΠϯͷΩοΫʹγΣϧ͕ແ͍ɾɾɾʁ
WHAT IS THE “TURAMI” EKSͷAWSϦιʔεͱͷ࿈ಈͱ͔ɾɾɾɻ ϙΠϙΠ্͛Լ͛ͯͯ͠ؾ͍ͨΒɺ ELB͕200ݸҐ͋ͬͯੜ͑ͳ͍ ͦͯ͠ඥ͍ͮͯग़དྷͨϦιʔεɺ ґଘઌ͕ফ͑ͯͳ͍ͱফ͑ͳ͍ ํͳ͍͔ΒEKSͰࣗಈͰ࡞Δ
ϦιʔεΛফ͢ΈΛ࡞Δͱ͍͏ ͳΜ͔͜͏ΞϨͳؾ࣋ͪɻ EKSͷ࿈ಈσϓϩΠ͞ΕͨϦιʔε͕ফ͑ແ͍
WHAT IS THE “TURAMI” AWSωΠςΟϒͳίʔυཧʹ MySQLͱ͔RedisΛRoute53ͷ໊લ ʹඥ͚ͮͯཧ͠Α͏ͱ͢Δͱɺ ͏Cloudformationແ͍ͱେมɻ ͦ͏ͯ͠ɺ΄ͱΜͲͷAWSϦιʔε ͕CloudformationͰཧ͢Δࣄʹɻ
ΠϛϡʔλϒϧͳK8SΛ࠾༻ͨ͠ ҙຯ͕ബΕ͍ͯ͘ɾɾɾʁ ͲΜͲΜCloudformation͋Γ͖ͳߏʹɻ
TOO “TURAMI”…
BUT!! I FIND THE “YABAMI” !!
WHAT IS THE “YABAMI” ChatOpsͰʮΦϖϛεݮʯxʮѪணʯ Python3.7ͷasyncioύοέʔδͰ ඇಉظ͔ͭλεΫεέδϡʔϦϯά γϯϓϧͳChatOpsͷbotΛৗற ͢Δ͜ͱͰɺΞϓϦ։ൃऀ͕ɺ ͍ͭͰ؆୯ʹσϓϩΠՄೳ
BOTΛΩϟϥԽ͢Δ͜ͱͰɺ Ѫண͕Θ͖ɺϝϯς͞ΕΔΑ͏ʹʂ ΩοΫͤ͞ΔεΫϦϓτΛPython3Ͱߋʹॊೈʹ
WHAT IS THE “YABAMI” • • • GCPͷVMΠϯελϯεΛৗ্ཱ͓͖࣌ͪ͛ͯɺ ʮ্͛ͯʯͳͲͷૢ࡞Λ࣮ࢪ •
WHAT IS THE “YABAMI” KubernetesͷόοΫΞοϓʹʮHeptio/Arkʯ ͓͖ͳΫϥυϕϯμʹ etcdʹ֨ೲ͞ΕͨAPIίʔυΛ όοΫΞοϓ͓ͯ͘͠ͱ͍͏ͷ ඇৗʹߴͰɺಉϦʔδϣϯͳΒ ̎ඵҎͰόοΫΞοϓ/ϦετΞʂ
PVͱίϯςφAPI͕ඥ͚ͭͰ͖ͯɺ ͜ΕͰΑΓڧྗʹόοΫΞοϓɻ ʮએݴʯͷόοΫΞοϓͱ͍͏Ξϓϩʔν
WHAT IS THE “YABAMI” ͪΖΜΞʔϯγϘʔ׆༂ͨͧ͠ʂ Ͳ͏ͯ͠ϚΠΫϩαʔϏε࿈ܞ πʔϧ܈ଟ͘ͳΔ͕ɺͦͷཧʹ ႈੑΛɻ K8SΛׂඃΔʁ͍ɺׂඃΔ ͔ΒίϯςφΦʔέετϨʔγϣϯ
ʹΈࠐΈ͍͢ʂ γΣϧୟؚ͖ΊখճΓ͕ར͘ͷͰɺ ແବͳπʔϧΛ૿ͣ͞ʹࡁΉɻ कඋൣғͷ͞ɺখճΓͷྑ͞ɺK8Sͱ૬ੑ˕
$SHUTDOWN +10 ΫϥυωΠςΟϒͳπʔϧɺ ·ͩ·ͩൃల్্ͳ෦ཱ͕ͭɻ ͦͷൃల్্ͳ෦ΛͦͬͱຒΊͯ͘ΕΔɺ ͦΕ͕AnsibleͳΜͩΑͳ͊ɾɾɾɾΈͭ˔ɻ