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
650
オリジナリティのある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
90
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
C++26 エラー性動作
faithandbrave
2
690
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
31k
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
kargoの魅力について伝える
magisystem0408
0
200
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
180
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
470
podman_update_2024-12
orimanabu
1
260
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.3k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Become a Pro
speakerdeck
PRO
26
5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
RailsConf 2023
tenderlove
29
940
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Docker and Python
trallard
42
3.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
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