本文へスキップ

Elastic Beanstalk

Elastic Beanstalkを使用してデプロイする場合、WhaTapエージェントを適用します。

  1. Linuxのインストール環境に合わせ、以下をElastic Beanstalkの インストールスクリプトに追加します。

    ノート

    whatap.server.hostlicenseプロジェクトアクセスキーをユーザーに合わせて入力します。

```bash
wget http://repo.whatap.io/debian/release.gpg -O -|sudo apt-key add -
wget http://repo.whatap.io/debian/whatap-repo_1.0_all.deb
sudo dpkg -i whatap-repo_1.0_all.deb
sudo apt-get update
sudo apt-get install whatap-infra
echo "license={LICENSE_INFO}" |sudo tee /usr/whatap/infra/conf/whatap.conf
echo "whatap.server.host={HOST_IP}" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
echo "createdtime=`date +%s%N`" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
sudo service whatap-infra restart
```
```bash 
sudo rpm --import http://repo.whatap.io/suse/release.gpg
echo "[whatap]" | sudo tee /etc/zypp/repos.d/whatap.repo > /dev/null
echo "name=whatap packages for enterprise linux" | sudo tee -a /etc/zypp/repos.d/whatap.repo > /dev/null
echo "baseurl=http://repo.whatap.io/suse/12/x86_64" | sudo tee -a /etc/zypp/repos.d/whatap.repo > /dev/null
echo "enabled=1" | sudo tee -a /etc/zypp/repos.d/whatap.repo > /dev/null
echo "gpgcheck=1" | sudo tee -a /etc/zypp/repos.d/whatap.repo > /dev/null
sudo zypper refresh
sudo zypper install whatap-infra
echo "license={LICENSE_INFO}" |sudo tee /usr/whatap/infra/conf/whatap.conf
echo "whatap.server.host={HOST_IP}" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
echo "createdtime=`date +%s%N`" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
sudo /etc/init.d/whatap-infra restart
```
  1. 次のコマンドを変更します。

    echo "createdtime=date +%s%N" |sudo tee -a /usr/whatap/infra/conf/whatap.conf

    インストール後、サーバーモニタリングをBeanstalkに含めて、アプリケーションをデプロイすると、サーバーモニタリングが繰り返される可能性があります。

    WhaTapエージェントの内部IDが、上記のコマンドが実行されるたびに新しく発行されるためです。 今後のデプロイ時に新しいリストが追加されないように、次のように変更します。

    echo "createdtime=12345678" |sudo tee -a /usr/whatap/infra/conf/whatap.conf