Upgrade to Pro — share decks privately, control downloads, hide ads and more …

オリジナリティのあるGitLabを標準に近づける

xorphitus
December 20, 2018

 オリジナリティのあるGitLabを標準に近づける

2018-12-20 Gitlab Meetup Tokyo #12

多量に独自パッチを当てたGitLabをOmnibus Packageに移行した話。

xorphitus

December 20, 2018
Tweet

More Decks by xorphitus

Other Decks in Technology

Transcript

  1. ͸͡Ίʹ 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"]}
  2. Ҡߦͷ࿩ͷલʹ ͳͥଟྔͷಠࣗύον͸౰͍͔ͨͬͯͨ ▸ ϓϩμΫτͱͯ͠ະ੒ख़ͩͬͨGitLabΛར༻͍ͯͨͨ͠Ί ▸ গͳ͘ͱ΋4ܥ͔Βར༻ɺGitHub͸༧ࢉతʹNG ▸ ݁ՌɺΞοϓάϨʔυ͕ਏ͍ ▸ 100ϑΝΠϧҎ্ͷconflict!

    w/o ճؼςετ ▸ ৬ਓʹΑΔmerge͕ඞཁ ▸ ͦͯ͠τϥϒϧγϡʔςΟϯά͕ਏ͍ ▸ ެࣜͷ໰୊ͳͷ͔ɺಠࣗύονͷ໰୊ͳͷ͔ͷ੾Γ෼͚͕ൃੜ
  3. ಠࣗύον౳ͷ܏޲ͱରࡦ Ҏલͷঢ়گ ରԠํ਑ ιʔεΠϯετʔϧ Omnibus Package RPM΁ MySQLରԠνϡʔχϯά PostgreSQLԽͰఫഇ ݟͨ໨Λ੔͑Δύον

    GitLabͷਐԽΛ৴͡શഇࢭ ػೳ௥Ճɾมߋύον ɾGitLabʹಉ౳ͷ৽ػೳ ɹ͕͋Ε͹Ҡߦ ɾAPIΛར༻͢Δόον࡞੒
 ɾGitLab Pluginͷ׆༻
 ɾͲΕ΋ແཧͳΒύον
 ɹͱͯ͠࢒͢
  4. ੒Ռൃද Ҡߦͯ͠ΞοϓάϨʔυָ͕ʹͳͬͨʂ ▸ Before ▸ ४උʹ਺೔ ▸ ຊ൪ద༻͸μ΢ϯΛ൐͏ͷͰٳ೔ग़ۈ࣮ͯ͠ࢪ ▸ After

    ▸ ४උɺຊ൪ద༻߹Θͤͯ1࣌ؒ͘Β͍ ▸ ຊ൪ద༻Ͱ΋μ΢ϯ͠ͳ͍ͷͰӦۀ࣌ؒதʹ࣮ࢪ ▸ ΞοϓάϨʔυͰτϥϒϧղফͨ͠έʔε΋਺݅
  5. ૝ఆ໰౴ू ಠࣗύονͰ΍͍ͬͯͨ͜ͱͷ୅ସԽͷத਎ ▸ ৽ػೳ΁Ҡߦͤͨ͞΋ͷ ▸ GitHubϛϥʔϦϯάػೳ౳ ▸ API΍PluginΛ׆༻ͯ͠৐Γ੾ͬͨ΋ͷ ▸ LDAP͔Βফ͑ͨϢʔβΛblock͢Δ౳

    ▸ WebhookԽͨ͠΋ͷ ▸ ChatWork௨஌ઃఆ ▸ ύονͰ͸ͳ͍͕ɺMySQLͷఆظόοΫΞοϓʢɾϦετΞʣεΫϦϓτ͸ Omnibus PackageͷػೳΛར༻͢ΔΑ͏ʹมߋ
  6. ૝ఆ໰౴ू ࢒ͨ͠ಠࣗύονͷத਎͸Կ͔ ▸ ᶃ Markdown rendererͷมߋ ▸ GitLabͰ͸௨ৗͷվߦΛ<br>ʹͳ͍͕ɺզʑͱͯ͠͸<br>ʹ ͳͬͯཉ͍͠ ▸

    ᶄ ֎෦౰ͯʹϝʔϧΛૹΒͳ͍Α͏ʹ͢Δ ▸ υϝΠϯ͕ࣾ಺Ͱͳ͚Ε͹ૹΒͳ͍ɺ҆શ૷ஔ ▸ ᶅ ݹ͍Πϕϯτ৘ใΛ࡟আ͢Δworkerͷఀࢭ ▸ աڈͷܦҢ͕ࣦΘΕͳ͍Α͏ʹ͢Δରࡦ
  7. ૝ఆ໰౴ू ਏ͔ͬͨ͜ͱ͸ ▸ Ҡߦʹ൐͍όʔδϣϯΞοϓΛ͕ͨ͠ɺͦ͜ͰΤϥʔ͕ൃੜͨ͠ ▸ ಠࣗύονͷ୅ସػೳ࡞੒ʹGitLab Plugin System͕ඞཁͩͬͨ ▸ ͕ɺόʔδϣϯΛ্͛ͳ͍ͱ࢖͑ͳ͔ͬͨ

    ▸ όʔδϣϯΛ্͛Δ࣌ʹ૸ΔDB migrationͰɺաڈͷෆ׬શͳσʔ λ͕ࠞࡏͯ͠Τϥʔʹͳͬͨ ▸ طଘσʔλ͔Βؾ߹Ͱαϧϕʔδͯ͠ɺ໬΋Β͍͠σʔλΛಥͬ ࠐΉεΫϦϓτΛॻ͍ͯԿͱ͔ͨ͠