AWS CodeDeploy AppSpec: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * AWS CodeDeploy Concepts") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://docs.aws.amazon.com/codedeploy/latest/userguide/application-specification-files.html | |||
* https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html | |||
=Internal= | =Internal= | ||
* [[AWS_CodeDeploy_Concepts#AppSpec|AWS CodeDeploy Concepts]] | * [[AWS_CodeDeploy_Concepts#AppSpec|AWS CodeDeploy Concepts]] | ||
=Overview= | |||
=AppSpec Files and ECS= | |||
{{External|[https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs AppSpec 'hooks' Section for an Amazon ECS Deployment]}} | |||
{{External|[https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure.html#ecs-appspec-structure AppSpec File Structure for Amazon ECS Deployments]}} | |||
{{External|[https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-example.html#appspec-file-example-ecs AppSpec File Example for an Amazon ECS Deployment]}} | |||
For ECS, the appspec file is used to specify: | |||
* the name of the Amazon ECS service and the container name and the port used to direct traffic to the new task set. | |||
* The functions to be used as validation tests. Validation Lambda functions can be used after deployment lifecycle events. | |||
=Example= | |||
<syntaxhighlight lang='yaml'> | |||
version: 0.0 | |||
os: linux | |||
files: | |||
- source: / | |||
destination: /var/www/html/WordPress | |||
hooks: | |||
BeforeInstall: | |||
- location: scripts/install_dependencies.sh | |||
timeout: 300 | |||
runas: root | |||
AfterInstall: | |||
- location: scripts/change_permissions.sh | |||
timeout: 300 | |||
runas: root | |||
ApplicationStart: | |||
- location: scripts/start_server.sh | |||
- location: scripts/create_test_db.sh | |||
timeout: 300 | |||
runas: root | |||
ApplicationStop: | |||
- location: scripts/stop_server.sh | |||
timeout: 300 | |||
runas: root | |||
</syntaxhighlight> |
Latest revision as of 20:04, 28 February 2019
External
- https://docs.aws.amazon.com/codedeploy/latest/userguide/application-specification-files.html
- https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html
Internal
Overview
AppSpec Files and ECS
For ECS, the appspec file is used to specify:
- the name of the Amazon ECS service and the container name and the port used to direct traffic to the new task set.
- The functions to be used as validation tests. Validation Lambda functions can be used after deployment lifecycle events.
Example
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html/WordPress
hooks:
BeforeInstall:
- location: scripts/install_dependencies.sh
timeout: 300
runas: root
AfterInstall:
- location: scripts/change_permissions.sh
timeout: 300
runas: root
ApplicationStart:
- location: scripts/start_server.sh
- location: scripts/create_test_db.sh
timeout: 300
runas: root
ApplicationStop:
- location: scripts/stop_server.sh
timeout: 300
runas: root