jus研究会沖縄大会「awsで行うimmutable infrastructure」
DESCRIPTION
オープンソースカンファレンス2014沖縄で話した jus研究会沖縄大会「AWSで行うImmutable Infrastructure」TRANSCRIPT
![Page 1: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/1.jpg)
AWSで行うImmutable
InfrastructureJAWS-UG沖縄 米須
![Page 2: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/2.jpg)
自己紹介• Twitter: @asumaslv
• Facebook: asumaslv
• 熱しやすく冷めやすい飽きっぽい性格
• 好きなAWSサービス CloudFront
• JAWS-UG沖縄 代表
2014-05-24
![Page 3: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/3.jpg)
お願い• ハッシュタグを付けてtweetしてください
• #osc14ok #jawsug
• マサカリ を投げていただけるなら歓迎です
2014-05-24
![Page 4: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/4.jpg)
2014-05-24
![Page 5: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/5.jpg)
最近流行の単語• Vagrant/Docker
• Chef/Puppet
• Serf
• Fluentd/Nokogiri
2014-05-24
![Page 6: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/6.jpg)
今週のJAWS-UGでのTweet
• 今日のイベントで極めて普通なんですけど…といった場合の構成は「R53・CF・ELB・EC2・RDS・ElastiCache・DynamoDB・SQS・(Fluentd・NewRelic・ElasticSearch・kibana)」といった感じ。
2014-05-24
![Page 7: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/7.jpg)
単語の説明(AWS)
• R53(Route53)
• CF(CloudFront)
• ELB(Elastic Load Balancing)
• EC2(Elastic Compute Cloud)
2014-05-24
• RDS(Relational Database Service)
• ElastiCache
• DynamoDB
• SQS(Simple Queue Service)
![Page 8: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/8.jpg)
2014-05-24
時代の流れが速すぎてついていけてない
![Page 9: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/9.jpg)
今日話すこと• 最近話題のDisposable component や
Immutable infrastructureの話をしてみる
• Dockerの話を少しできたらいいなぁ
• Dockerのdemoも行いたい
2014-05-24
![Page 10: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/10.jpg)
Immutable infrastructure とは• 「不変なインフラ」という意味 *weblioより
• 不変なインフラ???意味もわかりにくいし言いにくいし、噛む
• いみゅーたぶる いんふらすとらくちゃー
2014-05-24
![Page 11: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/11.jpg)
disposable component とは• disposable(処分できる,自由になる)
• 使い捨てが可能なサーバ群
• サーバを使い捨てに出来るならメンテ=作り直す
• 本番に手を入れないから適用ミスが少ない(はず)
2014-05-24
![Page 12: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/12.jpg)
Blue Green Deployment• マーチン・ファウラーさんが
2010年3月にポスト
• BlueGreenDeployment
• 本番環境へのデプロイが1番危険
• ダウンタイムは最小にしたい
• 切り戻し手順とかまで当然考慮してやる
2014-05-24
![Page 13: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/13.jpg)
Blue Green Deployment
• 2つの本番系を用意
• Blue(現在稼働)
• Green(新バージョン)
• 本番環境へはロードバランサで切り替える
2014-05-24
![Page 14: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/14.jpg)
AWSでBlueGreenDeployment• ダウンタイムが短い
• 切り戻しが楽
• ディザスタリカバリ(DR)的にも良いかも
• AZ(Available Zone)、Regionを分ける事も可能
2014-05-24
![Page 15: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/15.jpg)
歴史~2014-05-24
自前 iDC
物理 物理サーバ ホスティング
仮想 VMWare/Xen VPS
クラウド Private(OpenStack) Public(AWS,Linode,Digital Ocean)
![Page 16: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/16.jpg)
クラウド脳• 今までの考え方ではなく根本的に考え方を変える
• 落ちないサーバ群ではなく落ちてもサービスを提供するシステム
• StatelessとStatefulに分けて考える
2014-05-24
![Page 17: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/17.jpg)
Statelessサーバ群• 状態を持たないサーバ
• 捨ててもいい/無くなってもいい状態で運用
• WebサーバやApplicationサーバ
• LogはStatelessなサーバに置けない
2014-05-24
![Page 18: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/18.jpg)
Statefulサーバ群• 状態を持つサーバ
• 今までと同じ運用が必要
• DBサーバ、ファイルサーバ等のサーバ
2014-05-24
![Page 19: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/19.jpg)
What's Docker
• Docker は 旧dotCloud がオープンソースで公開している、コンテナ技術による仮想化ソフトウェア。
• RedHat、Google、Amazonがサポート
• 非常に勢いがあり開発速度が超速い
2014-05-24
![Page 20: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/20.jpg)
コンテナ型仮想化基盤?
2014-05-24
![Page 21: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/21.jpg)
ハイパーバイザー型仮想化基盤
2014-05-24
ハードウェア
仮想化ソフト
ゲストOS ゲストOS
Application Application
仮想マシン 仮想マシン
![Page 22: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/22.jpg)
コンテナ型仮想化基盤
2014-05-24
ハードウェア
ホストOS
bin/lib bin/lib
Application Application
![Page 23: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/23.jpg)
Container型のMerit• 起動が速い
• OSの起動ではなくプロセスの起動になる
• 必要サービスだけを動かす(例: HTTP)
• 仮想マシンの上でも動作する
• ポータビリティが高い
2014-05-24
![Page 24: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/24.jpg)
Container型のDemerit• カーネルに関わる操作はできない
• すげーわかりにくい
• Linux上でSolarisとかは無理
2014-05-24
![Page 25: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/25.jpg)
コンテナの考え方
2014-05-24
![Page 26: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/26.jpg)
Demo
2014-05-24
![Page 27: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/27.jpg)
Demoの内容1.Ubuntu上にCentOSのImageで起動
2.viを入れてみる
3.Imageを作成してみる
4.Docker.ioのRepositoryへpush
2014-05-24
![Page 28: jus研究会沖縄大会「AWSで行うImmutable Infrastructure」](https://reader033.vdocuments.pub/reader033/viewer/2022052900/555ee829d8b42a7f6c8b478c/html5/thumbnails/28.jpg)
2014-05-24