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
オリジナリティのあるGitLabを標準に近づける
Search
xorphitus
December 20, 2018
Technology
1
640
オリジナリティのあるGitLabを標準に近づける
2018-12-20 Gitlab Meetup Tokyo #12
多量に独自パッチを当てたGitLabをOmnibus Packageに移行した話。
xorphitus
December 20, 2018
Tweet
Share
More Decks by xorphitus
See All by xorphitus
マイクロサービスを作ろう
xorphitus
0
140
コンテナ起動への道
xorphitus
0
140
型システムを学ぼうとした結果
xorphitus
0
55
M-x doctor
xorphitus
0
120
型で数を表そう
xorphitus
0
89
AOT と direct linking
xorphitus
0
72
CFS入門
xorphitus
0
71
HyperLogLog
xorphitus
0
85
immutable database
xorphitus
0
250
Other Decks in Technology
See All in Technology
TypeScript、上達の瞬間
sadnessojisan
46
13k
Application Development WG Intro at AppDeveloperCon
salaboy
0
180
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
強いチームと開発生産性
onk
PRO
33
11k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
297
20k
How GitHub (no longer) Works
holman
310
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Statistics for Hackers
jakevdp
796
220k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
KATA
mclloyd
29
14k
Being A Developer After 40
akosma
86
590k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Why Our Code Smells
bkeepers
PRO
334
57k
Transcript
ΦϦδφϦςΟͷ͋Δ (JU-BCΛඪ४ʹ͚ۙͮΔ 2018-12-20 GITLAB MEETUP TOKYO #12
͡Ίʹ about_me.edn {:name "@xorphitus" :role ["server side engineer", "SRE"] :language
[{:name "Clojure", :desc "ॳ৺ऀ"} {:name "Haskell", :desc "ೖத"} {:name "Rust", :desc "ͦΖͦΖ࢝ΊΔ"}] :keyboard "Nyquist (ࣗ࡞)" :favoite ["xmonad", "single malt whisky"]}
ࠓ͓͑͢Δ͜ͱ ಠࣗύον͔Βͷ։์ ▸ ಠࣗύονΛ30͘Β͍ͯͯΑ͘ҭͬͨGitLabΛOmnibus PackageʹҠߦͨ͠ ▸ ࠓαϚϦ͚ͩհ ▸ ৽نੑͷ͋ΔτϐοΫͳ͍Ͱ͢
Ҡߦͷͷલʹ ͳͥଟྔͷಠࣗύον͍͔ͨͬͯͨ ▸ ϓϩμΫτͱͯ͠ະख़ͩͬͨGitLabΛར༻͍ͯͨͨ͠Ί ▸ গͳ͘ͱ4ܥ͔Βར༻ɺGitHub༧ࢉతʹNG ▸ ݁ՌɺΞοϓάϨʔυ͕ਏ͍ ▸ 100ϑΝΠϧҎ্ͷconflict!
w/o ճؼςετ ▸ ৬ਓʹΑΔmerge͕ඞཁ ▸ ͦͯ͠τϥϒϧγϡʔςΟϯά͕ਏ͍ ▸ ެࣜͷͳͷ͔ɺಠࣗύονͷͳͷ͔ͷΓ͚͕ൃੜ
ಠࣗύονͷଛӹذ ಠࣗύονͷӡ༻ίετ ಠࣗύονʹΑΔϦλʔϯ ࣌ͷྲྀΕ ↑͍·͜͜ ެࣜଆͷػೳڧԽ ʹΑΔϦλʔϯͷ ݮগ ύονͷ૿ՃʹΑ Δίετͷ૿େ
ެࣜGITLABͷਐԽͱಠࣗύονͷՁԼ PROFIT and LOSS
ͦΜͳΘ͚Ͱ Ҡߦ͠·ͨ͠
ಠࣗύονͷͱରࡦ Ҏલͷঢ়گ ରԠํ ιʔεΠϯετʔϧ Omnibus Package RPM MySQLରԠνϡʔχϯά PostgreSQLԽͰఫഇ ݟͨΛ͑Δύον
GitLabͷਐԽΛ৴͡શഇࢭ ػೳՃɾมߋύον ɾGitLabʹಉͷ৽ػೳ ɹ͕͋ΕҠߦ ɾAPIΛར༻͢Δόον࡞ ɾGitLab Pluginͷ׆༻ ɾͲΕແཧͳΒύον ɹͱͯ͢͠
·ͬઌʹݕূͨ͜͠ͱ MySQL͔ΒPostgreSQL ▸ ҎલMySQLͰ͘ͳΔΫΤϦΛಠࣗύονͰղফ͍ͯͨ͠ ▸ MySQLར༻ʹ͖ͭzero downtime upgradeෆՄ ▸ pgloaderͰMySQL͔ΒPostgreSQLσʔλҠߦͨ͠
▸ GitLabͷެࣜυΩϡϝϯτʹར༻ํ๏͕ॻ͍ͯ͋Δ ▸ ύοέʔδ൛ΛͬͨΒώʔϓϝϞϦ͕ෆͨ͠ͷͰɺࣗ લͰϏϧυ
Ͱ͖Δ͚ͩअຐ͠ͳ͍ಠࣗύον ସखஈ͕ͳ͍͕ඞཁͳͷಠࣗύον ▸ ݱࡏͰίϝϯτؚΊ60ߦఔͷRubyϑΝΠϧΛ1ͭઃஔ ͢Δ͚ͩʹͱͲ·͍ͬͯΔ ▸ config/initializers/zzzz_my_patches.rb ▸ GitLabͷRailsͷઃఆͷ্ॻ͖ ▸
ϞϯΩʔύονʹΑΔϥΠϒϥϦͷڍಈมߋ ▸ CapistranoͰGitLab Pluginͱ·ͱΊͯઃஔ
Ռൃද Ҡߦͯ͠ΞοϓάϨʔυָ͕ʹͳͬͨʂ ▸ Before ▸ ४උʹ ▸ ຊ൪ద༻μϯΛ͏ͷͰٳग़ۈ࣮ͯ͠ࢪ ▸ After
▸ ४උɺຊ൪ద༻߹Θͤͯ1࣌ؒ͘Β͍ ▸ ຊ൪ద༻Ͱμϯ͠ͳ͍ͷͰӦۀ࣌ؒதʹ࣮ࢪ ▸ ΞοϓάϨʔυͰτϥϒϧղফͨ͠έʔε݅
͜Ε͔ΒΔ͜ͱ ՝Կ͔ ▸ GitLab Runnerͷ৽ ▸ GitLabຊମ৽Ͱ͖͕ͨɺRunner·ͩख͔ͣ ▸ ver 9.5.0͕AWSͱΦϯϓϨʹෳཱ͍ͬͯΔ…
▸ GKE্ͷߏஙΛݕ౼த
͝ਗ਼ௌ͋Γ͕ͱ ͏͍͟͝·ͨ͠
ఆू
ఆू ಠࣗύονͰ͍ͬͯͨ͜ͱͷସԽͷத ▸ ৽ػೳҠߦͤͨ͞ͷ ▸ GitHubϛϥʔϦϯάػೳ ▸ APIPluginΛ׆༻ͯ͠Γͬͨͷ ▸ LDAP͔Βফ͑ͨϢʔβΛblock͢Δ
▸ WebhookԽͨ͠ͷ ▸ ChatWork௨ઃఆ ▸ ύονͰͳ͍͕ɺMySQLͷఆظόοΫΞοϓʢɾϦετΞʣεΫϦϓτ Omnibus PackageͷػೳΛར༻͢ΔΑ͏ʹมߋ
ఆू ͨ͠ಠࣗύονͷதԿ͔ ▸ ᶃ Markdown rendererͷมߋ ▸ GitLabͰ௨ৗͷվߦΛ<br>ʹͳ͍͕ɺզʑͱͯ͠<br>ʹ ͳͬͯཉ͍͠ ▸
ᶄ ֎෦ͯʹϝʔϧΛૹΒͳ͍Α͏ʹ͢Δ ▸ υϝΠϯ͕ࣾͰͳ͚ΕૹΒͳ͍ɺ҆શஔ ▸ ᶅ ݹ͍ΠϕϯτใΛআ͢Δworkerͷఀࢭ ▸ աڈͷܦҢ͕ࣦΘΕͳ͍Α͏ʹ͢Δରࡦ
ఆू ਏ͔ͬͨ͜ͱ ▸ Ҡߦʹ͍όʔδϣϯΞοϓΛ͕ͨ͠ɺͦ͜ͰΤϥʔ͕ൃੜͨ͠ ▸ ಠࣗύονͷସػೳ࡞ʹGitLab Plugin System͕ඞཁͩͬͨ ▸ ͕ɺόʔδϣϯΛ্͛ͳ͍ͱ͑ͳ͔ͬͨ
▸ όʔδϣϯΛ্͛Δ࣌ʹΔDB migrationͰɺաڈͷෆશͳσʔ λ͕ࠞࡏͯ͠Τϥʔʹͳͬͨ ▸ طଘσʔλ͔Βؾ߹Ͱαϧϕʔδͯ͠ɺΒ͍͠σʔλΛಥͬ ࠐΉεΫϦϓτΛॻ͍ͯԿͱ͔ͨ͠
ఆू Ͳͷ͘Β͍͕͔͔͔࣌ؒͬͨ ▸ 1ਓͰͬͯɺ4ϲ݄͘Β͍ ▸ ݁ߏΔ͜ͱ͕ଟ͔ͬͨ ▸ ଟྔʹ͋Δಠࣗύονͷഎܠཧղ ▸ DBҠߦͷݕূ࡞ۀ
▸ Webhook༻ΤϯυϙΠϯτͷ࡞ΛServerlessͰ͢Δ ▸ Etc