PHP コードで Elastic Beanstalk アプリケーションのバージョンを取得できるようにしたいと考えています。EB がサーバー構成ファイルでそれを私たちに渡していることはわかりません。これは奇妙だと思います。どうすればこれを入手できるか、他の誰かが知っていますか?
6268 次
7 に答える
4
私は自分で解決策を探していました。
今のところ、少なくとも次のように動作します。
unzip -z "${EB_CONFIG_SOURCE_BUNDLE}" | tail -n1
詳しく説明する$EB_CONFIG_SOURCE_BUNDLE
と、アプリケーションの zip アーカイブへのパス (つまり/opt/elasticbeanstalk/deploy/appsource/source_bundle
) が含まれます。このファイルには、バージョン タグがコメントとして埋め込まれています。
于 2014-01-16T16:01:49.847 に答える
2
AWS Elastic Beanstalk APIを使用して、アプリケーションのバージョン情報を取得できます。
Describe Application Versionsは、既存のアプリケーション バージョンの説明を返します。
サンプル請求
https://elasticbeanstalk.us-east-1.amazon.com/?ApplicationName=SampleApp
&Operation=DescribeApplicationVersions
&AuthParams
サンプル応答
<DescribeApplicationVersionsResponse xmlns="https://elasticbeanstalk.amazonaws.com/docs/2010-12-01/">
<DescribeApplicationVersionsResult>
<ApplicationVersions>
<member>
<SourceBundle>
<S3Bucket>amazonaws.com</S3Bucket>
<S3Key>sample.war</S3Key>
</SourceBundle>
<VersionLabel>Version1</VersionLabel>
<Description>description</Description>
<ApplicationName>SampleApp</ApplicationName>
<DateCreated>2010-11-17T03:21:59.161Z</DateCreated>
<DateUpdated>2010-11-17T03:21:59.161Z</DateUpdated>
</member>
</ApplicationVersions>
</DescribeApplicationVersionsResult>
<ResponseMetadata>
<RequestId>773cd80a-f26c-11df-8a78-9f77047e0d0c</RequestId>
</ResponseMetadata>
</DescribeApplicationVersionsResponse>
于 2013-12-26T06:28:52.277 に答える