猫でもできるRailsデプロイ

Preview:

DESCRIPTION

Deploying Ruby on Rails with Arduino. 名古屋Ruby会議02でのLT

Citation preview

猫でもできるRailsデプロイRails deploying that can be done by cat

おまえは誰だ

懇親会⽤のATNDのページを消した⼈。

本題

Railsのデプロイって⾯倒ですよね4〜5年前

⽝が全然になつかない、10匹とか⾯倒みれない3年前〜

Passenger2年前〜

Heroku神登場

Deploying Rails is troublesome.

まだ楽ではない特にWindowsでやってるひとなんらかの形でUnix環境が必要3ヶ⽉たつと忘れるエンジニアでないとできない

ちょっと⽂章を変えたいだけなのに・・・

Especially, it is troublesome for the windows user and non-engineer.

じゃあ簡単にしようというのが今回のLT

So, Let's make it easy

Capistranoを使う

winマシン+Capistranoappサーバ

$rake deployでコマンド⼀発!

use capistrano

でも、Unix環境にログインするのが⾯倒

But, it is necessary to use UNIX.

フックを使う

winマシンでコミットappサーバ

デプロイを意識しなくていい!hook

To use github with hookscript is good way.

バージョン管理システム

でも、⾮エンジニアにマージとか難しい

But, it is defficult for non-engineer

CIツールを使う

winマシンappサーバ

WebのUIからデプロイができるhookとかrpmとか

CIツール(Jenkins)

To use Continuous Integration Tool is good way.

すごく簡単になった!

Very easy!

でも、やっぱり猫には無理だしWebにアクセスことすら⾯倒になってきた

But, its setup is troublesome

そこで

So

ぼくのかんがえた最強のデプロイ⽅法とうじょう

物理スイッチを使う

デプロイボタン

Arduino

winマシン(Rubyによるシリアル通信+Capistrano)

appサーバ

指先ひとつでデプロイLet's deploy with a physical button.

多分世界⼀簡単

easiest way in the world

しかしこれでも猫には無理じゃない?

However, it is impossible for cat.

ならば

If it is so

センサーを使う

デプロイセンサー

Arduino(Rubyによるシリアル通信)

winマシン(Rubyによるシリアル通信+Capistrano)

appサーバ

Then, let's use the distance sensor.

つまり

It is in a word.

⼿をかざすだけIt is possible to do only by holding up the hand.

操作写真 = マニュアルThis is a complete manual.

(1/1ページ)

本物のプログラマはArduinoを使う

(ハッカーの楽しみより引用 してません)

A genuine programmer uses Arduino.

デモ実際に⼿かざしだけでWebサイトを更新する

Demo

PCは実は不要

appサーバ

Arduino + イーサネットシールド

リクエストの直接送信も簡単If extend board is used, the HTTP request can be transmitted directly.

まとめ本当に猫でもできるデプロイシステムを構築した

ArduinoのコードはアセンブラがわからなくてもRubyで書けるのでおすすめ

Arduino is easy. Make your gadget by yourself!

Recommended