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
PaaSとGoogleサービスとアルクマで遊ぶ
Search
thinkAmi
February 16, 2013
Programming
0
540
PaaSとGoogleサービスとアルクマで遊ぶ
NSEG #36にて発表したときのスライドです。
thinkAmi
February 16, 2013
Tweet
Share
More Decks by thinkAmi
See All by thinkAmi
知ろう!使おう!HDF5ファイル!/pycon-jp-2019-talk
thinkami
4
10k
Djangoでのメール送信 - 設定からテストまで/djangocongress-jp-2019-talk
thinkami
1
12k
Django・WSGIミドルウェア入門/django-congress-jp-2018-talk
thinkami
4
5.2k
自分のための機械学習をしてみた話
thinkami
0
630
Xamarinで作るAndroid Wearアプリ
thinkami
1
2.7k
FluentMigratorでDBマイグレーション
thinkami
0
2.2k
デプロイボタンを使ってみた
thinkami
0
1k
Vagrant + Berkshelf でお手軽写経環境構築
thinkami
1
1.3k
Twilio入門
thinkami
0
1.6k
Other Decks in Programming
See All in Programming
なぜあなたのオブザーバビリティ導入は頓挫するのか
ryota_hnk
3
500
階層化自動テストで開発に機動力を
ickx
1
430
DMMを支える決済基盤の技術的負債にどう立ち向かうか / Addressing Technical Debt in Payment Infrastructure
yoshiyoshifujii
4
630
新しいモバイルアプリ勉強会(仮)について
uetyo
1
130
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
840
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.4k
PHPカンファレンス関西2025 基調講演
sugimotokei
5
970
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
820
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
240
AIのメモリー
watany
11
1k
CDK引数設計道場100本ノック
badmintoncryer
2
580
iOS開発スターターキットの作り方
akidon0000
0
200
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Balancing Empowerment & Direction
lara
1
500
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Pragmatic Product Professional
lauravandoore
35
6.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Designing for Performance
lara
610
69k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
PaaS と Google サービスと アルクマで遊ぶ NSEG #36 2013.2.16 @thinkAmi
自己紹介 > @thinkAmi > hatena id:thinkAmi > 信州 > C#,
Python, Ruby > 自社インフラ管理 > NSEG, GDG 信州
アルクマ > いいですね!
アルクマのいいところ > スケジュールが公開されている > どこにいるかも公開されている > いろいろと遊べそう
2012 年、年末 > アルクマで、 3 回遊びました > Google サービス縛り >
Advent Calendar in 信州松本(だけじゃなくて もいいよ) http://atnd.org/event/ac2012matsumoto
遊び方 > アルクマのスケジュールをもとに、 位置を Google マップ上にマッピング > アルクマの画像使用ライセンスが 不明なため、シナノゴールド で代替
遊んだ時に使ったもの > Google App Engine (GAE) for Python(webapp2) > Google
Apps Script (GAS) > Google Calendar > Google Cloud SQL > Google Drive > Google Map
構成 - その 1 > GAS の Xml で、スケジュール解析・保存 >
GAE で、 GAS の ContentService と JSONP
結果 - その 1 >
構成 - その 2 > GAE(Python の lxml) で、 スケジュール解析して
CloudSQL へ保存 > GAS で、 CloudSQL よりデータ取り出し > GAS の HTMLService で、表示
結果 - その 2 > 公開停止中! > Google Cloud SQL
の課金が始まる前に、 忘れないように停止させました > すみません ...
構成 - その 3 > GAE で、 Google Calendar よりデータ取得
> GAE で、 Google Drive API を使って、 Google Drive に HTML ファイルを作成 > Google Drive の HTML ファイルを公開
結果 - その 3 > マーカーが ...( 以前はできてたはず ...)
詳しくは > 以下でソースコードを公開しています > https://github.com/thinkAmi/ac2012matsumoto
2013 年 > 他の PaaS > 新しい言語 > で、やってみたい
PaaS で有名なところ > Google App Engine > Heroku > Windows
Azure > Engine Yard > ...
NSEG #21 クラウド
個人でも遊びやすい PaaS > 個人でも使いやすい価格 ( ある程度までは、フリー ) > フリーでも、いわゆる DB
が使える > フリーでも、独自ドメインが使える > 独自ドメインでなくても、 SSL が使える > デプロイが簡単 > いろいろとアドオンあり
取り上げる PaaS > Google App Engine > Heroku > cloudControl
> AppFog
Google App Engine > https://appengine.google.com/ > 言語: Java,Python,Go > フリーの
DB: BigTable > インフラ: Google > 日本語の情報:多い > Google のサービスを利用しやすい
Google App Engine - Dashboard
Google App Engine - デプロイ > ランチャー (GUI) で「 Deploy
」 * コマンドラインからも可能です
Heroku > http://www.heroku.com/ > 言語: Java,Python,Ruby,JRuby,Node,Clojure,Scala > フリーの DB: PostgreSQL
> インフラ: Amazon Web Service (AWS) > アドオン : 外部提供 > 日本語の情報:多い
Heroku - Dashboard
Heroku - デプロイ > Git を使う git push heroku master
cloudControl > https://www.cloudcontrol.com > 言語: Java,Python,Ruby,PHP > フリーの DB: MySQL
> インフラ: AWS > アドオン : 外部提供 > 日本語の情報:少ない (PHP メイン )
cloudControl - Dashboard
cloudControl - デプロイ > まず、 Git リポジトリを作成 > 次に、専用ツールにて cctrlapp
<your app>/<deployment> push cctrlapp <your app>/<deployment> deploy
AppFog > https://www.appfog.com/ > 言語: Java,Python,Ruby,Node,PHP, .NET > フリーの DB:
MySQL,PostgreSQL,MongoDB,RabbitMQ,Redis > インフラ : (Cloud Foundry) AWS,HP OpenStack,WindowsAzure,Rackspace > アドオン : 外部提供 > 日本語の情報:少なめ (PHP メイン )
AppFog - Dashboard
AppFog - デプロイ > 専用ツール af より af push <your
app> > Git なし
今回のデプロイ先 > cloudControl > AppFog
cloudControl と AppFog 共通の言語 > 2012 年でやった、 Python 以外 >
選択肢 Java, Ruby, PHP
今回の言語 > Ruby
はじめる前に ... > 今までは、 GAE や GAS を動かしている Google アカウントで、
Google API を利用 > 何が問題か?
アカウント認証の問題 > Google の API を利用するため、 PaaS に Google アカウント情報を渡す
↓ いろいろと心配 ↓ なにか良い方法はないか ...
どうしたか > API 利用に、 Service account を使う > 参考: すぎゃーんメモ -
Heroku 上から Service Account 認証で Google API にアクセスする http://d.hatena.ne.jp/sugyan/20130112/1357996092
構成 > Ruby + Sinatra > アルクマカレンダーを解析 Nokogiri > Google
カレンダーへの保存・取得 google-api-ruby-client
できたもの - cloudControl 版 > http://arukumapnseg.cloudcontrolled.com/
できたもの - AppFog 版 > http://arukumapnseg.aws.af.cm/
まとめ > PaaS はいろいろある > 個人でもいろいろと遊べる > アルクマ画像の利用 ...