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
Starting MOGOK - やさしい MOGOK の始めかた -
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tomokazu Kiyohara
February 16, 2013
Technology
180
1
Share
Starting MOGOK - やさしい MOGOK の始めかた -
IIJ の Ruby on Rails 向け PaaS である MOGOK の使い方。
Kanazawa.rb #6 (2013/02/16) の発表資料。
Tomokazu Kiyohara
February 16, 2013
More Decks by Tomokazu Kiyohara
See All by Tomokazu Kiyohara
読めるかな?ちょっとレアなRubyの記法
kiyohara
0
100
Lightning Talk イベント運営を いいがにやりたい
kiyohara
0
130
首負担皆無!ゼログラビティ プログラミングスタイル
kiyohara
0
420
北陸で Ruby なお仕事に携わるための3つの戦略
kiyohara
1
1.8k
Algolia in CAMPFIRE
kiyohara
0
4k
地方エンジニアの日常 - 業務からコミュニティ活動まで
kiyohara
0
340
Web to macOS native app
kiyohara
0
450
金沢アプリ開発塾セミナー資料「テストについて」
kiyohara
1
310
Git インフラ選定事例 - 株式会社クルウィットが GitHub を選んだ理由
kiyohara
0
540
Other Decks in Technology
See All in Technology
ブロックチェーン / Blockchain
ks91
PRO
0
100
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
770
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
290
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
340
Chart.js が簡単に使えるようになっていたので OGP 画像生成に使った話
kamekyame
0
150
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
230
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
620
Databricks 月刊サービスアップデート 2026年05月号
tyosi1212
0
200
「コーディング」しない人のための Claude Code 入門 ChatGPT の次の一歩 — 業務に組み込む 育成・共有・自動化
rfdnxbro
2
1.2k
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
180
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.9k
はじめてのDatadog
kairim0
0
270
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
First, design no harm
axbom
PRO
2
1.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
It's Worth the Effort
3n
188
29k
Un-Boring Meetings
codingconduct
0
310
Making Projects Easy
brettharned
120
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Ruling the World: When Life Gets Gamed
codingconduct
0
240
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
140
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Transcript
2013/02/16 Kanazawa.rb Meetup #6 Starting MOGOK ʙ ͍͞͠ MOGOK ͷ࢝Ί͔ͨ
ʙ
What is
MOGOK ✤ IIJ (Internet Initiative Japan) ͕ఏڙ͢Δ ✤ Ruby on
Rails ΞϓϦέʔγϣϯͷ ✤ ։ൃࢧԉڥͱ࣮ߦڥΛ ✤ ఏڙ͢ΔαʔϏε PaaS (Platform as a Service)
MOGOK ✤ IIJ (Internet Initiative Japan) ͕ఏڙ͢Δ ✤ Ruby on
Rails ΞϓϦέʔγϣϯͷ ✤ ։ൃࢧԉڥͱ࣮ߦڥΛ ✤ ఏڙ͢ΔαʔϏε PaaS (Platform as a Service) !ఏڙ : ࠓͯ͢ແঈ
MOGOK ✤ http://mogok.jp
MOGOK ʢ։ൃࢧԉڥʣ ✤ Web UI ✤ ΞϓϦέʔγϣϯཧ ✤ υΩϡϝϯτɾϑΥʔϥϜ ✤
CLI (gem ͱͯ͠ఏڙ) ✤ Git ϦϙδτϦ (࠷େ 100MB)
MOGOK ʢ࣮ߦڥʣ ✤ Web ✤ 1 process ✤ 400MB memory
✤ 150MB file (w/ gems) ✤ Thin/Ruby 1.9.3/RoR 3.x ✤ *.ruby.iijgio.com ✤ DB ✤ 1 connection ✤ 100MB memory ✤ 100MB data ✤ MySQL 5.5
MOGOK ʢ࣮ߦڥʣ ✤ Web ✤ 1 process ✤ 400MB memory
✤ 150MB file (w/ gems) ✤ Thin/Ruby 1.9.3/RoR 3.x ✤ *.ruby.iijgio.com ✤ DB ✤ 1 connection ✤ 100MB memory ✤ 100MB data ✤ MySQL 5.5 ͍ͣΕ༗ঈϓϥϯ
How to
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
Git ͷಋೖ $ cd <your RoR app dir> $ git
init $ git add . $ git commit -m "first commit"
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
RoRΞϓϦέʔγϣϯͷίϯϑΟάઃఆ ✤ Bundler (Gemfile) ✤ Env (config/environments/production.rb)
Bundler : gem 'mysql2' gem 'therubyracer', :platforms => :ruby $
vim Gemfile ✤ MOGOK ڥͰඞཁͱͳΔ gem Λઃఆ
Env $ vim config/environments/production.rb : config.serve_static_assets = true : ✤
/public/* ͷ static ίϯςϯπΛ༗ޮԽ ✤ (͓ͦΒ͘)͋Β͔͡Ί false ઃఆ͕͋ΔͷͰ true ʹมߋ
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
MOGOK CLI ͷΠϯετʔϧ ✤ gem ϑΝΠϧͷμϯϩʔυ
MOGOK CLI ͷΠϯετʔϧ ✤ gem ϑΝΠϧͷΠϯετʔϧ $ gem install mogok-x.x.x.gem
$ mogok list $ mogok --help ✤ MOGOK ΞΧϯτͷ "ID/Password" ͕ٻΊΒΕΔ ✤ ࠷ॳͷ1ճͷΈ
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
MOGOKͷσϓϩΠ ✤ ΞϓϦέʔγϣϯొ ✤ ࢿࡐͷసૹ ✤ ΞϓϦέʔγϣϯߏங
ΞϓϦέʔγϣϯొ $ mogok create <app name> ✤ RoR app dir
Ͱ࣮ߦ͢Δ͜ͱΛڧ͘ਪ ✤ Git remote ʹ MOGOK ڥ͕ొ͞ΕΔ ※ MOGOK CLI ͜ͷΛࢀর͠ͳ͕Βಈ࡞͢Δ(--app option ͋Δ͕͔ͳΓ໘) ✤ <app name> MOGOKγεςϜશମͰҰҙ ✤ <app name>.ruby.iijgio.com
ࢿࡐͷసૹ $ git push mogok master ✤ MOGOK ΞΧϯτͷ "ID/Password"
͕ٻΊΒΕΔ ✤ ຖճೖྗ͕ඞཁ ✤ "$ git config credential.helper store" ͓ͯ͘͠ͱָ ✤ "~/.git-credentials" ʹอଘ͞ΕΔͷͰѻ͍ʹҙ tips
ΞϓϦέʔγϣϯߏங $ mogok build $ mogok rake db:migrate
Flow ✤ Git ͷಋೖ ✤ RoR ΞϓϦέʔγϣϯͷίϯϑΟάมߋ ✤ MOGOK CLI
ͷΠϯετʔϧ ✤ MOGOK ͷσϓϩΠ ✤ ΞϓϦέʔγϣϯཧ
ΞϓϦέʔγϣϯཧ $ mogok info $ mogok start $ mogok stop
$ mogok restart ✤ MOGOK CLI ͔Βͷૢ࡞
ΞϓϦέʔγϣϯཧ ✤ Web UI ͔Βͷૢ࡞
Conclusion
·ͱΊ ✤ Ruby on Rails ͳ PaaS ✤ !൛͕ͩແྉͰ͔ͳΓͷػೳ͕͑Δ ✤
Git & mogok ίϚϯυͰσϓϩΠ ✤ mogok ίϚϯυ or Web UI Ͱίϯτϩʔϧ
Thank you Tomokazu Kiyohara http://facebook.com/tomokazu.kiyohara http://twitter.com/kiyohara
extra
Bundler tips ✤ ։ൃڥͱMOGOKڥͰґଘ gem Λ͚Δͱศར ✤ ։ൃڥʹ MySQL ͕ೖ͍ͬͯͳ͍ͱ͖ͳͲ
group :mogok do gem 'mysql2' gem 'therubyracer', :platforms => :ruby
end $ vim Gemfile ✤ MOGOK ڥ͚ gem Λ group Խ Bundler tips
: BUNDLE_WITHOUT: mogok $ vim .bundle/config ✤ ։ൃڥͰ bundle command
ͷର֎ʹࢦఆ Bundler tips
✤ config/database.yml ✤ ಛผʹฤू͢Δඞཁͳ͠ ✤ MOGOKڥσϓϩΠ࣌ʹઐ༻ͷͷ͕ར༻͞ΕΔ Env tips
✤ "$mogok build" ͨ͠Β ✤ "$ mogok restart" →× ✤
"$ mogok stop; mogok start" →◦ build & restart tips