Top Banner
Let’s join in OpsWorks world! NE開発本部 NE開発部 NE開発3課 中野 茂生
87

Let's join in OpsWorks world!

Jul 20, 2015

Download

Technology

Shigeo Nakano
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Let's join in OpsWorks world!

Let’s join in OpsWorks world!

NE開発本部 NE開発部 NE開発3課

中野 茂生

Page 2: Let's join in OpsWorks world!

サーバーインフラ構築・運用 サーバー開発ディレクション をやっています

Page 3: Let's join in OpsWorks world!

サーバーインフラ構築・運用を担当

Page 4: Let's join in OpsWorks world!

楽する

Page 5: Let's join in OpsWorks world!

こんな感じで

Page 6: Let's join in OpsWorks world!
Page 7: Let's join in OpsWorks world!
Page 8: Let's join in OpsWorks world!

OpsWorksという道具を使って。

Page 9: Let's join in OpsWorks world!

キーワード

Page 10: Let's join in OpsWorks world!

共通化 構成

Review

Page 11: Let's join in OpsWorks world!

1.共通化

Page 12: Let's join in OpsWorks world!

たくさん あるよ~

Page 13: Let's join in OpsWorks world!

共通化って?

Page 14: Let's join in OpsWorks world!

余分な手間を 減らす

Page 15: Let's join in OpsWorks world!

差を減らす

Page 16: Let's join in OpsWorks world!

共通化によって…

Page 17: Let's join in OpsWorks world!

操作が減る 情報が減る

教える量が減る ドキュメントが減る

Page 18: Let's join in OpsWorks world!

サーバー構築の自動化

機能のデプロイ

サーバー台数の調整

OpsWorks

Page 19: Let's join in OpsWorks world!

サーバー構築の自動化

機能のデプロイ

サーバー台数の調整

OS

開発言語

フレームワーク

コード管理

その他

Page 20: Let's join in OpsWorks world!

サーバー構築の自動化

機能のデプロイ

サーバー台数の調整

OS

開発言語

フレームワーク

コード管理

全て共通化

Page 21: Let's join in OpsWorks world!

サーバー構築の自動化

機能のデプロイ

サーバー台数の調整

OS

開発言語

フレームワーク

コード管理

名前は?

Page 22: Let's join in OpsWorks world!

プロジェクト GAME X

Page 23: Let's join in OpsWorks world!

プロジェクト GAME X

インフラ共通基盤

HOGE S

Page 24: Let's join in OpsWorks world!

プロジェクトが 消えても

存在は消えない

Page 25: Let's join in OpsWorks world!

共通化は 時間が必要

Page 26: Let's join in OpsWorks world!

名付けが 共通化の 第一歩かも

Page 27: Let's join in OpsWorks world!

2.構成

Page 28: Let's join in OpsWorks world!

レシピの構成

Page 29: Let's join in OpsWorks world!

たくさん さばける やつで!

Page 30: Let's join in OpsWorks world!

適切な構成に する必要がある

Page 31: Let's join in OpsWorks world!

なぜ?

Page 32: Let's join in OpsWorks world!

スケールに合わせてサーバー構築が 短時間にできる

Page 33: Let's join in OpsWorks world!

あわてない

Page 34: Let's join in OpsWorks world!

精神的に 楽になる

Page 35: Let's join in OpsWorks world!

OpsWorks ハンズオン!

Page 36: Let's join in OpsWorks world!

WordPress 動きません でしたw

Page 37: Let's join in OpsWorks world!

いろいろできそうだけ

ど…

Page 38: Let's join in OpsWorks world!

よく 分からない

Page 39: Let's join in OpsWorks world!

いまは このように思います

Page 40: Let's join in OpsWorks world!

機能

Page 41: Let's join in OpsWorks world!

機能=Layer

Page 42: Let's join in OpsWorks world!

レシピ

Page 43: Let's join in OpsWorks world!

機能を実現する プログラム群

レシピ

Page 44: Let's join in OpsWorks world!
Page 45: Let's join in OpsWorks world!

グループ

Page 46: Let's join in OpsWorks world!

グループ=Stack

Page 47: Let's join in OpsWorks world!

機能毎にサーバーを立ててもいいし

Page 48: Let's join in OpsWorks world!

1台にしても いい

Page 49: Let's join in OpsWorks world!

「ドリスピ」では

Page 50: Let's join in OpsWorks world!

Stack: Staging

Layer: Application 開発 環境

ゲーム管理

タスク キューイング

ゲームAPI

キャッシュ DB

MasterData

DB UserData

非同期処理

Page 51: Let's join in OpsWorks world!

Stack: Production

Layer: ゲーム管理

Layer: タスクキューイング

Layer: 非同期処理

Layer: ゲームAPI

Layer: 監視 本番 環境

ゲーム管理

タスク キューイング

ゲームAPI

キャッシュ

DB MasterData

DB UserData

非同期処理

監視

Page 52: Let's join in OpsWorks world!

Stack: Production

Layer: ゲーム管理

Layer: タスクキューイング

Layer: 非同期処理

Layer: ゲームAPI

Layer: 監視 本番 環境

ゲーム管理

タスク キューイング

ゲームAPI

キャッシュ

DB MasterData

DB UserData

非同期処理

監視

Page 53: Let's join in OpsWorks world!

規模に依存しない

Page 54: Let's join in OpsWorks world!

レシピは 1つの機能の中で

更に分ける

Page 55: Let's join in OpsWorks world!

実行タイミング毎に

Page 56: Let's join in OpsWorks world!

実行タイミング毎に ↑

ライフサイクル イベント

Page 57: Let's join in OpsWorks world!

Layer 監視する側

Setup

Configure

Deploy

監視機能の導入

監視機能の設定

Page 58: Let's join in OpsWorks world!

Layer 監視される側

Setup

Configure

Deploy

リソース報告機能の導入

Page 59: Let's join in OpsWorks world!

機能単位 且つ

ライフサイクルイベント単位

Page 60: Let's join in OpsWorks world!

3.Review

Page 61: Let's join in OpsWorks world!

おかねは もう不要 だよね?

Page 62: Let's join in OpsWorks world!

OpsWorksのキモ

Page 63: Let's join in OpsWorks world!

レシピ

Page 64: Let's join in OpsWorks world!

必ず他の人が コードを 確認する

=(CodeReview)

Page 65: Let's join in OpsWorks world!

大きくズレない

Page 66: Let's join in OpsWorks world!

方針、方向性 が

合ってくる

Page 67: Let's join in OpsWorks world!

みんなが 協力して

楽にしてくれる

Page 68: Let's join in OpsWorks world!

もう一つ重要な点

Page 69: Let's join in OpsWorks world!

AMIは、全く同じもの=動くのは当然

Page 70: Let's join in OpsWorks world!

OpsWorksは毎回構築 (※AMIのみの起動は除く)

Page 71: Let's join in OpsWorks world!

毎回同じ結果に しないと いけない

Page 72: Let's join in OpsWorks world!

冪等性(べきとうせい)

何度でも同じ結果が得られること

Page 73: Let's join in OpsWorks world!

エラーがなくとも 冪等性がない

Page 74: Let's join in OpsWorks world!

レシピ開発フロー

レシピのコード

ダウンロード

作成・変更・削除

動作テスト

コードレビュー

Page 75: Let's join in OpsWorks world!

レシピ開発フロー: GitHub

master branch

fork master

commit

push master

pull request

clone master

code review

checkout

test

merge

■最終版 ■テスト用 ■開発用

Page 76: Let's join in OpsWorks world!

レシピ開発フロー: GitHub

master branch

fork master

commit

push master

pull request

clone master

code review

checkout

test

merge

■最終版 ■テスト用 ■開発用

Page 77: Let's join in OpsWorks world!

レビューしない

Page 78: Let's join in OpsWorks world!

レビューした

Page 79: Let's join in OpsWorks world!

1.共通化 2.構成 3.Review

Page 80: Let's join in OpsWorks world!

「楽する」 が

Page 81: Let's join in OpsWorks world!
Page 82: Let's join in OpsWorks world!

「楽する」 ができる!

Page 83: Let's join in OpsWorks world!

TIPS

インスタンスが起動できないことを知る手段は

画面だけ

Page 84: Let's join in OpsWorks world!

TIPS

運用開始前に 全削除

Page 85: Let's join in OpsWorks world!

達成感!

Page 86: Let's join in OpsWorks world!

TIPS

レシピの開発修正作業は開発時間の負担よりも心理的なプレッシャーが大きい

Page 87: Let's join in OpsWorks world!

ご清聴ありがとうございました~