私はPHPを実行する弾力のあるbeanstalk環境を持っています。私のプロジェクトでは、私は.ebextensionsフォルダと'15 -memorymonitor.config 'という名前のファイルを持っています。Elastic Beanstalk環境では、.ebextensionsフォルダ内でコマンドを実行しません。
container_commands:
00download:
command: "wget http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip"
ignoreErrors: true
01extract:
ignoreErrors: true
02rmzip:
command: "rm CloudWatchMonitoringScripts-v1.1.0.zip"
ignoreErrors: true
03cdinto:
command: "mv aws-scripts-mon/ /home/ec2-user"
ignoreErrors: true
04cron:
command: "crontab -l | { cat; echo '* * * * * /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail'; } | crontab -"
ignoreErrors: false
問題は、アプリケーションのデプロイ時にこれらのコマンドが実行されていないように見えることです。 cfn.initファイルをチェックして、設定ファイル内のコマンドへの参照を確認しましたが、何もありません。
ここにcfn.initファイルの内容を示します。
2017-01-03 15:02:21,666 [INFO] -----------------------Starting build-----------------------
2017-01-03 15:02:21,689 [INFO] Running configSets: _OnInstanceBoot
2017-01-03 15:02:21,690 [INFO] Running configSet _OnInstanceBoot
2017-01-03 15:02:21,692 [INFO] Running config AWSEBBaseConfig
2017-01-03 15:02:21,697 [INFO] Command clearbackupfiles succeeded
2017-01-03 15:02:21,744 [INFO] Running config AWSEBMessageOfTheDay
2017-01-03 15:02:21,749 [INFO] Command 01clearoriginal succeeded
2017-01-03 15:02:21,753 [INFO] Command 02createbanner succeeded
2017-01-03 15:02:21,809 [INFO] Command 03updatebanner succeeded
2017-01-03 15:02:21,815 [INFO] Running config AWSEBULimitConfig
2017-01-03 15:02:21,818 [INFO] Command 00removebackup succeeded
2017-01-03 15:02:21,823 [INFO] Running config Infra-InstallContainerHooksPkg
2017-01-03 15:02:21,827 [INFO] Command 00mkdir succeeded
2017-01-03 15:02:21,939 [INFO] Command 01download_container_hooks succeeded
2017-01-03 15:02:21,976 [INFO] Command 02install_container_hooks succeeded
2017-01-03 15:02:21,980 [INFO] Command 03cleanup succeeded
2017-01-03 15:02:21,986 [INFO] Running config Infra-WriteLeaderTestScript
2017-01-03 15:02:21,991 [INFO] Running config Infra-WriteTailLogsConf
2017-01-03 15:02:21,996 [INFO] Running config Infra-WriteSystemTailLogsConf
2017-01-03 15:02:22,002 [INFO] Running config Infra-WriteBundleLogsConf
2017-01-03 15:02:22,006 [INFO] Running config Infra-WritePublishLogsConf
2017-01-03 15:02:22,009 [INFO] Running config Infra-WritePublishLogsCron
2017-01-03 15:02:22,011 [INFO] ConfigSets completed
2017-01-03 15:02:22,099 [INFO] -----------------------Build complete-----------------------
2017-01-03 15:02:50,301 [INFO] -----------------------Starting build-----------------------
2017-01-03 15:02:50,397 [INFO] Running configSets: Infra-EmbeddedPreBuild
2017-01-03 15:02:50,398 [INFO] Running configSet Infra-EmbeddedPreBuild
2017-01-03 15:02:50,398 [INFO] ConfigSets completed
2017-01-03 15:02:50,401 [INFO] -----------------------Build complete-----------------------
2017-01-03 15:02:52,690 [INFO] -----------------------Starting build-----------------------
2017-01-03 15:02:53,496 [INFO] Running configSets: Infra-EmbeddedPostBuild
2017-01-03 15:02:53,497 [INFO] Running configSet Infra-EmbeddedPostBuild
2017-01-03 15:02:53,497 [INFO] ConfigSets completed
2017-01-03 15:02:53,500 [INFO] -----------------------Build complete-----------------------
2017-01-03 15:09:21,577 [INFO] -----------------------Starting build-----------------------
2017-01-03 15:09:21,599 [INFO] Running configSets: Infra-EmbeddedPreBuild
2017-01-03 15:09:21,600 [INFO] Running configSet Infra-EmbeddedPreBuild
2017-01-03 15:09:21,600 [INFO] ConfigSets completed
2017-01-03 15:09:21,603 [INFO] -----------------------Build complete-----------------------
2017-01-03 15:09:24,358 [INFO] -----------------------Starting build-----------------------
2017-01-03 15:09:24,472 [INFO] Running configSets: Infra-EmbeddedPostBuild
2017-01-03 15:09:24,473 [INFO] Running configSet Infra-EmbeddedPostBuild
2017-01-03 15:09:24,473 [INFO] ConfigSets completed
2017-01-03 15:09:24,475 [INFO] -----------------------Build complete-----------------------
なぜこれらのコマンドが実行されないのでしょうか?
AWS Webコンソール(zipファイル)を使用してアプリケーションをデプロイします。
現時点で同じ問題が発生しています。私はすべてのログをチェックし、環境を再構築し、糸くずチェッカーでファイルを渡したが、まだ実行されていないようだ。 – AkkarinZA