Contenu connexe
Similaire à クックパッドのスケーリング
Similaire à クックパッドのスケーリング (20)
クックパッドのスケーリング
- 2. 自己紹介
■ 高田悟史(たかださとし)
■ 787万人を支えるインフラチーム
■ スケール関連を担当中
- 12. クックパッドのサーバー増設の流れ
サーバ管理ツール
Rails
boot用サーバ
(2-1)kickstart.cfgの取得
DHCP
(1)PXE Boot
tftp
New
(3)puppetd Apache
(2-2)パッケージ取得
puppetmasterd
- 16. kickstart.cfgを自動生成
■ http://ブートサーバ/deployment/kickstart
■ ホスト名
network --device eth0 --bootproto dhcp --hostname test1
■ %post に出力される
# eth0
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.0.1
NETMASK=255.255.255.0
EOF
- 17. PXE BootとKickstartとPuppet
サーバ管理ツール
Rails
boot用サーバ
(2-1)kickstart.cfgの取得
DHCP
(1)PXE Boot
tftp
New
(3)puppetd Apache
(2-2)パッケージ取得
puppetmasterd
- 20. Puppetの構成
puppetmasterd
(1)Manifestを取得
puppetd puppetd
(2)Manifestを実行
- 21. パッケージの統一(Passengerの例)
package {
'passenger':
provider => 'gem',
notify => Service['httpd'],
ensure => '2.2.5';
}
- 22. サーバごとに異なる設定(/etc/my.cnfの例)
■ Manifest
$mysql_server_id = $hostname ? {
db1 => 10001,
db2 => 10002,
db3 => 10003,
db4 => 10004,
default => 'error'
}
■ Template
server-id = <%= mysql_server_id %>
- 23. PXE BootとKickstartとPuppet
サーバ管理ツール
Rails
boot用サーバ
(2-1)kickstart.cfgの取得
DHCP
(1)PXE Boot
tftp
New
(3)puppetd Apache
(2-2)パッケージ取得
puppetmasterd
- 26. まとめ
■ サーバ増設のスピードは重要
■ OSのインストールにかかる時間は変わらな
いが、手間がかからなくなった
■ Puppetを導入して、ソフトウェアのインス
トール/設定の手間がほぼ0になった
Notes de l'éditeur
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n
- \n \n