sacss sp5
DESCRIPTION
TRANSCRIPT
From the DarksideWordPress 運用での自動化とかサーバ側でできる高速化とか
13年12月14日土曜日
OKAMOTOWataru
@wokamoto13年12月14日土曜日
13年12月14日土曜日
13年12月14日土曜日
13年12月14日土曜日
13年12月14日土曜日
Recipe* Tools Chef, Vagrant, WP-CLI* Cloud Design Pattern* More Performance
13年12月14日土曜日
Tools
13年12月14日土曜日
Chef
13年12月14日土曜日
Chef
13年12月14日土曜日
Chef×13年12月14日土曜日
ChefInfrastructure as Code
13年12月14日土曜日
ChefInfrastructure as Code
13年12月14日土曜日
$ curl -L https://www.opscode.com/chef/install.sh | sudo bash
Chef* Chef Solo Install
13年12月14日土曜日
* Recipepackage "nginx" do! action :installend
service "nginx" do! action [ :enable , :start ]end
Chef
13年12月14日土曜日
* 入門 Chef SoloChefhttp://www.amazon.co.jp/dp/B00BSPH158
13年12月14日土曜日
Vagrant
13年12月14日土曜日
Vagrant
13年12月14日土曜日
Vagrant
13年12月14日土曜日
Mac の場合* Xcodeをインストール (必須ではないけど、いれときましょう。)* VirtualBoxをインストール https://www.virtualbox.org/* Vagrantをインストール http://www.vagrantup.com/
* Vagrant InstallVagrant
13年12月14日土曜日
$ vagrant up
$ vagrant halt
$ vagrant reload
$ vagrant provision
$ vagrant destroy
commandVagrant
13年12月14日土曜日
VagrantfileVagrant
13年12月14日土曜日
https://github.com/10up/varying-vagrant-vagrants
Varying Vagrant VagrantsVagrant
13年12月14日土曜日
https://github.com/miya0001/vagrant-chef-centos-wordpress
http://firegoby.jp/archives/5141
Vagrant Chef CentOS WordPressVagrant
13年12月14日土曜日
WP-CLI
13年12月14日土曜日
WP-CLI
13年12月14日土曜日
* WP-CLI InstallWP-CLI
$ curl https://raw.github.com/wp-cli/wp-cli.github.com/master/installer.sh | bash
13年12月14日土曜日
WP-CLI$ cd /path/to/wordpress$ wp core download --locale=ja$ wp core config --dbname=wp \ --dbuser=wp_user --dbpass=password \ --dbhost=localhost --locale=ja$ wp core install --url=http://example.com \ --title=test --admin_name=admin \ [email protected] \ --admin_password=test
* WordPress Install
13年12月14日土曜日
WP-CLI$ cd /path/to/wordpress$ wp plugin install hotfix$ wp plugin activate hotfix$ wp plugin status4 installed plugins: I akismet 2.5.9 I hello 1.6 A hotfix 1.0 A wp-multibyte-patch 1.7 Legend: I = Inactive, A = Active
* WordPress Plugins Install
13年12月14日土曜日
WP-CLI$ cd /path/to/wordpress$ wp core update$ wp core update-db$ wp core version --extraWordPress version: 3.7.1Database revision: 25824TinyMCE version: 3.59 (359-20131026)
* WordPress Core Update
13年12月14日土曜日
WP-CLI
$ cd /path/to/wordpress$ wp plugin install hotfix3 installed plugins: I akismet 2.5.9 UA nginx-champuru 1.6.0 I wp-multibyte-patch 1.7
Legend: A = Active, I = Inactive, U = Update$ wp plugin update nginx-champuru$ wp plugin update-all
* WordPress Plugins Update
13年12月14日土曜日
WP-CLI
$ cd /path/to/wordpress$ wp export$ wp export --post_type=post$ wp export --post_status=publish
$ wp import export.xml$ wp import export.xml --skip=attachment
* WordPress Export & Import
13年12月14日土曜日
WP-CLI
$ cd /path/to/wordpress$ wp nginx flush$ wp nginx listarray(3291) { [0]=> object(stdClass)#126 (3) { ["cache_id"]=> string(1) "0" ["cache_url"]=> :
* Nginx Cache Controlle
13年12月14日土曜日
WordPress Cloud Design Pattern
13年12月14日土曜日
ひとつのインスタンスに Web サーバ、PHP、MySQL を詰め込む
Single Instance
13年12月14日土曜日
Single Instance
13年12月14日土曜日
http://ja.megumi-cloud.com/
Single Instance
13年12月14日土曜日
Web、 DB サーバを分離DB サーバは Amazon RDS
Single Instance + RDS
13年12月14日土曜日
Single Instance + RDS
13年12月14日土曜日
DB サーバを2台構成にして読み書きを分離
DB Replication
13年12月14日土曜日
DB Replication
13年12月14日土曜日
DB Replicationhttp://wordpress.org/plugins/hyperdb/
13年12月14日土曜日
Web サーバも2台構成に
Multi Servers
13年12月14日土曜日
Multi Servers
13年12月14日土曜日
NFS でソースを共有してスケールアウト
NFS Sharing
13年12月14日土曜日
NFS Sharing
13年12月14日土曜日
http://ja.cloudhappy.net/
Cloud Formation
13年12月14日土曜日
More Speed !
13年12月14日土曜日
Speed Speed!* HipHop VM for PHP* mod_pagespeed* SPDY over Nginx
13年12月14日土曜日
HipHop VM for PHPhttps://github.com/facebook/hiphop-php/
13年12月14日土曜日
mod_pagespeedhttps://developers.google.com/speed/pagespeed/
13年12月14日土曜日
ngx_pagespeed
https://github.com/pagespeed/ngx_pagespeed
13年12月14日土曜日
SPDYhttp://www.chromium.org/spdy
13年12月14日土曜日
* Multiplexed streams* Request prioritization* HTTP header compression* Server push. * Server hint.
13年12月14日土曜日
Static Press
13年12月14日土曜日
13年12月14日土曜日
開発の経緯クライアントからの要望* 公開サーバには静的HTMLのみ* 公開前に記事内容を確認したい → 承認フローを通したい
13年12月14日土曜日
開発の経緯
13年12月14日土曜日
開発の経緯
13年12月14日土曜日
Movable Type で良いんじゃ?開発の経緯
13年12月14日土曜日
Really Static開発の経緯
13年12月14日土曜日
開発の経緯
13年12月14日土曜日
開発の経緯
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに!"" index.html# !"" 2013# # !"" 10# # # !"" 13# # # # !"" staticpress# # # # # $"" index.html# # # # $"" index.html# # # $"" index.html# # $"" index.html# !"" author# # $"" admin# # $"" index.html
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに$ wget -S --spider http://staticpress.netHTTP request sent, awaiting response... HTTP/1.1 200 OK Server: AmazonS3 x-amz-id-2: XmJwDae+xKcaS57kcQ4ryhy0xUval68YA/6dqusSWxX9A/AvAqaxBuyr8Gsubz9Z x-amz-request-id: 386EE47166995D35 Date: Sun, 13 Oct 2013 00:59:56 GMT Last-Modified: Fri, 11 Oct 2013 10:39:25 GMT ETag: "47caefa0d1f863e2f3853f0d4f96089a" Content-Type: text/html Content-Length: 7063Length: 7063 (6.9K) [text/html]Remote file exists and could contain further links,but recursion is disabled -- not retrieving.
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* URL の書き換え<link rel="stylesheet" id="wrench-style-css" href="http://localhost/wp-content/themes/wrench/style.min.css?ver=1381485493" type="text/css" media="all">
%<link rel="stylesheet" id="wrench-style-css" href="/wp-content/themes/wrench/style.min.css?ver=1381485493" type="text/css" media="all">
StaticPress 特徴
13年12月14日土曜日
* URL の書き換え<meta property="og:locale" content="ja_JP"><meta property="og:type" content="website"><meta property="og:site_name" content="StaticPress"><meta property="og:url" content="http://ja.staticpress.net/"><meta property="og:title" content="StaticPress"><meta property="og:image" content="http://ja.staticpress.net/wp-content/uploads/2013/06/staticpress_logo-150x150.png">
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* 動的処理不可- コメント欄、pingback、トラックバック設置できない % コメントは Disqus、Facebook コメントなどで
StaticPress 特徴
13年12月14日土曜日
* 動的処理不可- サイト内検索フォーム設置できない % Google カスタム検索エンジンなどで対応
StaticPress 特徴
13年12月14日土曜日
* 動的処理不可- UA 切り替えでテーマを変えるプラグインが使えません % レスポンシブなテーマで対応
×
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* WP → 静的サイトに* URL の書き換え* 動的処理不可* BASIC 認証もOK
StaticPress 特徴
13年12月14日土曜日
* BASIC 認証もOK- 記事投稿用サイトの隠蔽 % WordPress 全体に BASIC 認証かかっていても OK
StaticPress 特徴
13年12月14日土曜日
StaticPress 特徴* BASIC 認証もOK
13年12月14日土曜日