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
vuls
Search
Yusuke Hasegawa
September 26, 2016
Technology
0
990
vuls
本番サーバの実運用 on GCP
RPM以外も取り込む実運用での工夫について
Yusuke Hasegawa
September 26, 2016
Tweet
Share
More Decks by Yusuke Hasegawa
See All by Yusuke Hasegawa
ゲームインフラとGoogle Cloud Platformと酒!
yusukeh
0
87
Other Decks in Technology
See All in Technology
Observability — Extending Into Incident Response
nari_ex
1
510
SRE × マネジメントレイヤーが挑戦した組織・会社のオブザーバビリティ改革 ― ビジネス価値と信頼性を両立するリアルな挑戦
coconala_engineer
0
270
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
1
850
Behind Postgres 18: The People, the Code, & the Invisible Work | Claire Giordano | PGConfEU 2025
clairegiordano
0
140
abema-trace-sampling-observability-cost-optimization
tetsuya28
0
110
Linux カーネルが支えるコンテナの仕組み / LF Japan Community Days 2025 Osaka
tenforward
1
130
OCIjp_Oracle AI World_Recap
shinpy
1
180
[re:Inent2025事前勉強会(有志で開催)] re:Inventで見つけた人生をちょっと変えるコツ
sh_fk2
1
460
dbtとAIエージェントを組み合わせて見えたデータ調査の新しい形
10xinc
3
900
Kubernetes self-healing of your workload
hwchiu
0
560
SQLAlchemy の select(User).where(User.id =="123") を理解してみる/sqlalchemy deep dive
3l4l5
3
530
Amazon Athena で JSON・Parquet・Iceberg のデータを検索し、性能を比較してみた
shigeruoda
1
130
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Building Adaptive Systems
keathley
44
2.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Faster Mobile Websites
deanohume
310
31k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Transcript
ຊ൪αʔόͷ࣮ӡ༻PO($1 RPMҎ֎औΓࠐΉ࣮ӡ༻Ͱͷʹ͍ͭͯ
ϚογϡΞοϓͰ͢ʂ ؾָʹฉ͍ͯԼ͍͞ʂ
ࣗݾհ facebook: yusuke.exzm ࢯ໊ ୩ ༞հ ܦྺ GMO, Yahoo Japan,
Squere Enix etc… 2010ʹgms(gloopsͷલ)ೖࣾ גࣜձࣾgrasysͷදΛΓͳ͕ΒΤϯδχΞͬͯ·͢ɻ ৬छ ΠϯϑϥΤϯδχΞ Google Developer Expert, GCPUG Admin publish Fusion-IOΛ2011ʹຊ൪ಋೖ͠Fusion-IOࣾʹऔΓ্͛ΒΕΔ SoftwareDesign2012.03هࣄ 2012DellͷCMग़ԋʢςϨϏ౦ژ ϫʔϧυϏδωεαςϥΠτʣ IcingaʢnagiosͷforkʣͷϢʔβʔίϛϡχςΟʹܝࡌ ຊॻ͖࢝Ί·ͨ͠
ձࣾհ ໊ࣾ גࣜձࣾgrasys ઃཱ 201411݄13 ද ୩༞հ ࣄۀ༰ Cloud Facilitator
ςΫχΧϧ/ϦηϦϯάύʔτφʔ ਓ 8໊
γεςϜߏʢͬ͘͟Γʣ ࠓͷओvulsͳͷͰ ΄Μͱʹͬ͘͟Γ
جຊతͳߏ ops product servers monitor Google Cloud Platform Compute Engine
Firewall QPSU ssh opsͱ͍͏Πϯελϯε͕த৺ SSH౿Έ ΦʔέετϨʔγϣϯ vulsͷ࣮ߦ͜͜Ͱ
ࢹ ΦʔέετϨʔγϣϯ ίʔσΟωʔλʔ ݴޠ XXenv ཁ݅ͰVersionࢦఆͳͲʹରԠ͢ΔͨΊ ϛυϧΣΞ ιʔε͔ΒίϯύΠϧٴͼBinary൛Λར༻ ཁ݅ͰVersionࢦఆͳͲʹରԠ͢ΔͨΊ ϥΠϒϥϦ
ඞཁ͋Ειʔε͔ΒίϯύΠϧ ཁ݅ͰVersionࢦఆͳͲʹରԠ͢ΔͨΊ Πϯελϯε෦ consulͬͯΔΑʂίϯύΠϧ͚ͬ͜͏ͯ͠ΔΑʂ
twemproxy supervisord vuls ͍Ζ͍Ζͳݴޠ ͍Ζ͍ΖͳϛυϧΣΞ ͍Ζ͍ΖͳతͷγεςϜ
γεςϜʹ͍Ζ͍Ζ͋Δɾɾɾ ɾzݹ͍ͷzΒɾɾɾ ɾzྺ࢙zΒɾɾɾ ɾzഎܠzΒɾɾɾ ɾzࣄzΒɾɾɾ 31.͚ͩͰߏ͢Δ͜ͱ΄΅ͳ͍ɾɾɾ ৽نͷઃܭɾߏஙग़དྷΔݶΓ࠷৽൛Ͱ
લஔ͖͜͜·Ͱʂ
ຊ 31.ʹؔͳ͍ͷ Ͳ͏ͬͯTDBOͨ͠Β͍͍͔ɾɾɾ
WVMTDPOpHUPNM [servers.HOSTNAME] host = "HOSTNAME" cpeNames = [ "cpe:/a:djangoproject:django:1.6", ]
↑ ඥ͚ͳ͍ͱ͍͚ͳ͍ ͋͞Ͳ͏ͬͯ͜ͷใΛɾɾɾ cpeNamesͰ ֦ுͰ͖Δ͕ɾɾɾ ↓
DWFTRMJUFDQFTUBCMF CREATE TABLE "cpes" ( "id" integer primary key autoincrement,
"created_at" datetime, "updated_at" datetime, "deleted_at" datetime, "jvn_id" integer, "nvd_id" integer, "cpe_name" varchar(255), "part" varchar(255), "vendor" varchar(255), "product" varchar(255), "version" varchar(255), "update" varchar(255), "edition" varchar(255), "language" varchar(255) ); ←͜ΕͰselect͢Εʂ
31.Ҏ֎ͷऩू kv vuls/[hostname] /usr/local, /optԼͷঢ়ଶΛऩू cronͰconsulͷkey value storeʹJSONͷܗͰอଘ
KTPOGPSNBU { "middleware": [ { "name":"[middleware name]", "version":"[version]", "update":"[patch version]"
} ], "update_time": "YYYY-MM-DD HH:MM:MM", "host": { "Πϯελϯεใ͍Ζ͍Ζ", "node_name": "yusuke" } } ඞཁͳใΛϦετͰ
8FC"QQMJDBUJPO'SBNFXPSLͱ͔ʁ middleware: - name: [product name] version: [version num] update:
[patch version] ↑ औಘͰ͖ͳ͍ͷʹ͍ͭͯYAMLͰҙʹ֦ு ͱ͍ͬͯϑϨʔϜϫʔΫ͕ΆΜΆΜมΘΔ͜ͱͳ͍ͷͰɾɾɾ ͕͢͞ʹ͍Ζ͍Ζ͋ͬͯࣗಈऩूϜϦͩͬͨ͆
࣮ࡍͷσʔλ͜Μͳײ͡ /opt/envutils/utils.pl middleware
WVMTͷUPNMੜ 1. consul HTTP API /v1/catalog/nodes 2. consul KV vuls/[hostname]
JSONऔಘ 3. HostใͷTagΛར༻֦ͯ͠ுͷYAMLऔಘ 4. cve sqliteʹJSONͷproduct, version, updateͰselect 5. Template EngineͰvulsͷtomlΛग़ྗ consul kv vuls/[instance name] cve.sqlite3 script vuls config.toml extend YAML Instance Tagʹඥͮ͘:".- 100͘Β͍Ͱ 10ඵͰྃʂ
͋ͱTDBOΛճ͚ͩ͢ʂ ࣮ࡍcronͰճͯͨ͠Γ͢Δʂ
ΊͰͨ͠ΊͰͨ͠
QIQΒɺOHJOYΒɺSFEJTΒ ख์͠Ͱ͍Ζ͍Ζ੬ऑੑใΛݕ͠ ରࡦ͢Δ͜ͱ͕Մೳʹʂ ͋Δݹ͍γεςϜΛTDBOͨ͠Β ͻͱͭͷαʔόͰ݅Ҏ্ͰͯϏϏͬͨʂ
*OJU4DSJQUʹΑΔӡ༻ͷ؆қԽ /etc/init.d/vuls /etc/init.d/vuls: vuls init script help: example: /etc/init.d/vuls [sub
command] sub command: start: start server stop: stop server restart restart server status server status 1st_setup setup, update_week, reconfig, prepare, start full_setup setup, update_full, reconfig, prepare, start reconfig: make config setup: setup cve/nve database prepare: prepare instance scan: scan history: scan history report: for consul service report tui: Terminal User Interface update cve database update_entire: dictionary entire update update_month: dictionary month update update_week: dictionary week update update_full: dictionary full update go-cve-dictionaly/vulsͷ ىಈͱαϙʔτεΫϦϓτͱͯ͠ configੜͳͲͷϥούʔͱ͔ σΟϨΫτϦπϦʔͷੜͱ͔ ΖΖɾɾɾ ·ΔͬͱͬͯΔͷͰ ࣾͷΤϯδχΞʹઆ໌ཁΒͣ
ൃදҎ্ʂ
ΑΖ͓͘͠ئ͍͠·͢ʂ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ ࣭͋͝Γ·ͨ͠Β͓ؾܰʹʂ ୩ ༞հ facebook: yusuke.exzm