LoginSignup
6
6

More than 5 years have passed since last update.

Elastic Beanstalkで動的に生成されるインスタンスをsensuで監視する(其の①)

Posted at

まずは、実験環境を構築する。
ちなみに作業環境はmac(10.9.5)。

今回はAWSドキュメント(※)を参考に、Elastic BeanstalkでSinatraアプリケーション環境を構築してみる。
(※) http://docs.aws.amazon.com/ja_jp/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html

ほぼほぼドキュメント通り。

# mkdir HogeHogeApp
# cd HogeHogeApp/
# git init .
# eb init
# eb start
# git add .
# git commit -m "Initial commit"
# git aws.push
# eb status --verbose

途中、botoがなくて怒られたので以下で対応。

# easy_install boto

ほぼほぼドキュメント通りで環境は作れた。
ここまでは、まずまず順調(´꒳`)
インスタンスも立ち上がった。

立ち上がったインスタンスにssh接続しようとするが繋がらない。
Security Groupを確認したところ、tcp:80しか開いていない。

ここでポイントの豆知識!
Elastic Beanstalkのssh接続は、Elastic Beanstalkの"Config"を変更することで可能になる。
"Instances"の"EC2 key pair:"を設定してやる必要がある。
AlertMailChecker-env_-_Configuration_1.png

設定してやると、Security Groupにtcp:22が開いたインスタンスが起動し直された。
(接続元IPアドレス制限がないのが気になるが。。。)

これで実験環境の準備が整った。
次回はsensuクライアントを設定する。

(おまけの豆知識)
Beanstalkは、Bean-stalk(豆の茎)である。
Beans-talkではない。
mame.png

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6