본문으로 건너뛰기

Elastic Beanstalk

Elastic Beanstalk를 이용해 배포할 경우 와탭 에이전트를 적용하는 방법입니다.

  1. Linux 설치 환경에 따라 다음의 내용을 Elastic Beanstalk 설치 스크립트에 추가하세요.

    노트

    whatap.server.host와 license 즉 프로젝트 액세스 키는 사용자에 맞게 입력합니다.

wget https://repo.whatap.io/debian/release.gpg -O -|sudo apt-key add -
wget https://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
sudo rpm --import https://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=https://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에 포함해 애플리케이션 배포 시 서버 모니터링 신규 목록이 반복적으로 생성될 수 있습니다.

    와탭 에이전트 내부 아이디가 위의 명령이 실행될 때마다 새로 발급되기 때문입니다. 추후 배포 시 신규 목록이 추가로 발생하지 않도록 다음과 같이 수정하세요.

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