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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tomokazu Kiyohara
February 16, 2013
Technology
170
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
86
Lightning Talk イベント運営を いいがにやりたい
kiyohara
0
120
首負担皆無!ゼログラビティ プログラミングスタイル
kiyohara
0
410
北陸で Ruby なお仕事に携わるための3つの戦略
kiyohara
1
1.7k
Algolia in CAMPFIRE
kiyohara
0
3.9k
地方エンジニアの日常 - 業務からコミュニティ活動まで
kiyohara
0
340
Web to macOS native app
kiyohara
0
440
金沢アプリ開発塾セミナー資料「テストについて」
kiyohara
1
310
Git インフラ選定事例 - 株式会社クルウィットが GitHub を選んだ理由
kiyohara
0
530
Other Decks in Technology
See All in Technology
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
110
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
120
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
220
システムは「動く」だけでは 足りない - 非機能要件・分散システム・トレードオフの基礎
nwiizo
29
9.2k
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
1
220
20260415_生成AIを専属DSに_自動レポート作成_ハンズオン_交通事故データ
doradora09
PRO
0
100
新メンバーのために、シニアエンジニアが環境を作る時代
puku0x
0
1k
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
9
3.1k
Introduction to Bill One Development Engineer
sansan33
PRO
0
410
Do Ruby::Box dream of Modular Monolith?
joker1007
0
250
#jawsugyokohama 100 LT11, "My AWS Journey 2011-2026 - kwntravel"
shinichirokawano
0
300
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Fireside Chat
paigeccino
42
3.9k
Six Lessons from altMBA
skipperchong
29
4.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
260
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
490
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
A Tale of Four Properties
chriscoyier
163
24k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
150
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