Contenu connexe Similaire à Plone + AWS at Plone Symposium tokyo 2015 Similaire à Plone + AWS at Plone Symposium tokyo 2015 (20) Plus de Manabu Terada (20) Plone + AWS at Plone Symposium tokyo 20152. @terapyon
Owner of CMS communications Inc.
Chair of PyCon APAC 2013 in Japan
Plone Foundation Ambassador
Member of NVDA Japanese Team
About me
株式会社CMSコミュニケーションズ
Manabu TERADA
We use Plone for building web site
Universities, Public institutions
Engineering company
Supporting education tools
CMScom
2
3. Case Study by us
株式会社CMSコミュニケーションズ
http://www.osaka-u.ac.jp/
http://todai.tv/
http://www.osaka-cu.ac.jp/
http://ocw.kyoto-u.ac.jp/
http://ocw.osaka-u.ac.jp/
https://crdeg2.cf.ocha.ac.jp/ocha/plone
https://my.osaka-u.ac.jp/ (need login)
http://typemoon.com/
3
7. 株式会社CMSコミュニケーションズ
Small system / Large system / System elements
システム構成の例
2
3
1
System structure for Plone
Contents of this session
How to use AWS?
AWSの使いどころなど。
Using Amazon Web Services (AWS)
Motivation
4 Q & A
7
なぜ、何かをしたいのか?
10. System structure (Large system)
株式会社CMSコミュニケーションズ 10
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
11. System structure (Middle size)
株式会社CMSコミュニケーションズ 11
管理者
管理用アクセス
パスワード必要
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
ZODB
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
12. 株式会社CMSコミュニケーションズ 12
海外からもゲストが来ます。
nginx or Apache
フロントエンドでリクエストを受る
バーチャルホストやSSLを担当
構成要素の説明 (structural element)
Webサーバ
HAProxy
セッションを維持した振り分け
ロードバランス
Varnish
HTML / CSS / 画像などをキャッシュ
ロードバランシング機能
キャッシュサーバ
CloudFront や アカマイ
静的なコンテンツを別ネットワークから
CDN
13. System structure (Large system)
株式会社CMSコミュニケーションズ 13
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
14. 株式会社CMSコミュニケーションズ 14
海外からもゲストが来ます。
Zope / Plone サーバ
メモリとCPUを消費
ZEOで複数のアプリケーションサーバ
構成要素の説明 (structural element)
アプリケーションサーバ
memchaced
関数・メソッドをキャッシュ
Zope再起動でキャッシュを消さない
メモリキャッシュ
ZODB
Data.fs と blob
データベース
RelStorage / NEO
MySQL / PostgreSQL
その他のデータベース
15. System structure (Large system)
株式会社CMSコミュニケーションズ 15
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
17. Using Amazon Web Services (AWS)
株式会社CMSコミュニケーションズ 17
EC2
RDS
EBS
CloudFront
ElastiCache
S3
R53
18. System structure (on AWS)
株式会社CMSコミュニケーションズ 18
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
EC2
19. System structure (on AWS)
株式会社CMSコミュニケーションズ 19
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
DB
20. System structure (on AWS)
株式会社CMSコミュニケーションズ 20
管理者
nginx (Webサーバ)
Ploneコアシステム
(アプリケーションサーバ)
MySQL/PostgreSQL
(スレーブ)
(データベースサーバ)
閲覧者
閲覧者
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Apache (Webサーバ)(ログイン用)
Varnish (キャッシュサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Ploneコアシステム
(アプリケーションサーバ)
Varnish (キャッシュサーバ)
HAProxy (ロードバランサ)
MySQL/PostgreSQL
(マスター)
(データベースサーバ)
Memcached
(一時保存ファイル)
LDAP
(ユーザディレクトリ)
外部SSO
認証サーバ
CDN
CDN
21. Using Amazon Web Services (AWS)
株式会社CMSコミュニケーションズ 21
EC2
RDS
EBS
CloudFront
ElastiCache
S3
EFS
R53
22. 株式会社CMSコミュニケーションズ
Small system / Large system / System elements
システム構成の例
2
3
1
System structure for Plone
Summary of this session
How to use AWS?
AWSの使いどころなど。
Using Amazon Web Services (AWS)
Motivation
22
なぜ、何かをしたいのか?
25. Only a few changing on
nginx config
Server Setting
株式会社CMSコミュニケーションズ 25
27. System structure w/ CDN
株式会社CMSコミュニケーションズ 27
nginx Varnish
Plone1
Plone2
Plone3
CDN
CloudFront
28. nginx Config
株式会社CMSコミュニケーションズ 28
location / {
if ($uri * .(jpe?g¦png¦gif¦pdf¦gz¦tgz¦bz2¦tbz¦zip¦tiff¦tif)$) {
set $no_plone A;
}
if ($uri * /(image¦(image_(?:[^/]¦(?!view.*).+)))$) {
set $no_plone A;
}
if ($uri * .(svg¦swf¦ico¦mp3¦mp4¦m4a¦ogg¦mov¦avi¦wmv¦flv)$) {
set $no_plone A;
}
if ($uri * .(css¦js)$) {
set $no_plone A;
}
if ( $http_user_agent != "Amazon CloudFront" ) {
set $no_plone "${no_plone}B";
}
if ($no_plone = AB) {
expires 1h;
rewrite ^ http://YOUR_SUBDOMAIN.cloudfront.net$request_uri? last;
}
proxy_pass http://to_varnish/VirtualHostBase/http/YOUR_DOMAIN:80/Plone/
VirtualHostRoot/;
}
29. Data delivery first time
株式会社CMSコミュニケーションズ 29
nginx Varnish
Plone1
Plone2
Plone3
CDN
CloudFront
1
Redirect
2
3
4
5
6
7
8