More Related Content
Similar to GCP vs 他社クラウド (20)
GCP vs 他社クラウド
- 5. 自己紹介
氏名 長谷川祐介
経歴
20代にGMO, Yahoo, SQEXその他中小を転々としながら
2010年にgloops(旧gms)へ
2014年4月1日からZeadleへ
職種
いわゆるインフラエンジニア
CIO
(ちっちゃなインフラおじさん)
GCP歴 約2ヶ月
その他
AWSここ最近半年くらい
AzureもVM側だけど数ヶ月触ってる
- 26. Compute Engine
• 起動がちょっぱや!
• CPUも同等のEC2 Instance Typeと比較すると速い
(よくbuildするので感覚値
• いわゆるregionがない
• USにInstance立てているのになんでか速い
• 通常のInstanceについているDiskも悪くない
(buildしてるとわかる
Google塩入さんの受け売りです・・・
- 27. VMインスタンス
• 起動は本当に速い
だいたい1 2分くらい
• ディスク作成、スナップショット取得
などは体感的にも高速
(10GBのDiskのInstanceで2分程度
• タグはカンマ区切り
• Image管理はsnapshotでやった方が
楽なんじゃないかと感じてます。
どうなんでしょうか?
• 管理上作った日付が欲しい場合もあ
ると思いますが
gcutilであれば
--format=json付きでgetinstance/
listinstancesのcreationTimestamp
で取得できます。
- 37. アカウント
• ぶっちゃけ今回一番驚いたことです!
• Google AppsのアカウントとVM内ユーザーが連携!
• manage_accountsというプロセスが起動しており、
Developers Console上の権限に追加すると
LinuxOSのユーザーが自動で作成されます。
• Developers Console上から権限剥奪すると
ちゃんとLinuxOSにLoginできなくなります。
• Google Cloud Platformと名付けられている理由
が!!!
- 38. 構築上非常に便利な点!
WebのDevelopers Console上で
RESTとコマンドラインが出力される!
gcutil --service_version="v1" --project="xxxxx-xxxxx-xxx" addinstance
"test" --tags="test" --zone="us-central1-b" --machine_type="n1-
standard-1" --network="default" --external_ip_address="ephemeral" --
service_account_scopes="https://www.googleapis.com/auth/
userinfo.email,https://www.googleapis.com/auth/compute,https://
www.googleapis.com/auth/devstorage.full_control" --image="https://
www.googleapis.com/compute/v1/projects/centos-cloud/global/
images/centos-6-v20140318" --persistent_boot_disk="true"
- 39. Cloud Storage
• fluentdからLogを送るのはfluent-plugin-gstoreでできます。
• 静的ファイル配信はFileをUploadし公開flagを立てるだけでできます。
• あと権限周りが非常に面白くて、
GoogleAppsのDomainだけ許可したりできます。
• gsutilでUpload(約100MB)したらすごい遅かった・・・
けど-mオプションつけたら気にならないくらい速い!
約100MBが2分くらいでUpload完了
• これからDeployTool作るんですがcomposeが便利そう
Alternate-Protocolが気になる!
- 40. CloudDNS
• updateを行う
$ gcloud components update dns
$ gcloud dns managed-zone create --dns_name="zeadle.org." --
description="zeadle org zeadleorgzone
• managed-zone create
• 2014-04-15現在はまだDeveloper Consoleは提供されてない
のでCLIでやりました。
- 42. CloudDNS
{
"additions": [
{
"kind": "dns#resourceRecordSet",
"name": "zeadle.org.",
"rrdatas": [
"ns-cloud-b1.googledomains.com. dns-admin.google.com. 2 21600 3600 1209600 300"
],
"ttl": 21600,
"type": "SOA"
},
{ ここに入力 }
],
"deletions": [
{
"kind": "dns#resourceRecordSet",
"name": "zeadle.org.",
"rrdatas": [
"ns-cloud-b1.googledomains.com. dns-admin.google.com. 1 21600 3600 1209600 300"
],
"ttl": 21600,
"type": "SOA"
}
]
}
• viが立ち上がってきて(ちっちゃくてすいません・・・
- 45. CloudDNS
[
{
"kind": "dns#resourceRecordSet",
"name": "zeadle.org.",
"rrdatas": [
"ns-cloud-b1.googledomains.com.",
"ns-cloud-b2.googledomains.com.",
"ns-cloud-b3.googledomains.com.",
"ns-cloud-b4.googledomains.com."
],
"ttl": 21600,
"type": "NS"
},
{
"kind": "dns#resourceRecordSet",
"name": "zeadle.org.",
"rrdatas": [
"ns-cloud-b1.googledomains.com. dns-admin.google.com. 1 21600 3600 1209600 300"
],
"ttl": 21600,
"type": "SOA"
},
{
"kind": "dns#resourceRecordSet",
"name": "www.zeadle.org.",
"rrdatas": [
xxx.xxx.xxx.xxx
],
"ttl": 3600,
"type": "A"
}
]
• 出力(ちっちゃくてすいません・・・
あとはdigとかdrillで
@serverつけてテスト
すれば返ってきます!
- 48. 今後の予定
• DeployTool作る!
• AutoScale作る!
• Configrationをどうするか
meta-serverかzookeeper使ってTemplateEngineと組み合わせ
て作る?
• Orchestrationをどれでやろうかな
Redisのpub/sub, ZooKeeperのwatch, Serf?
手段はたくさんあるので楽しいですね!