Skip to content

Instantly share code, notes, and snippets.

@appkr
Last active July 7, 2017 08:17
Show Gist options
  • Select an option

  • Save appkr/51c28963508f8d26ba776a229d893824 to your computer and use it in GitHub Desktop.

Select an option

Save appkr/51c28963508f8d26ba776a229d893824 to your computer and use it in GitHub Desktop.
Install PHP Modules on AWS EB PHP7 Base Image
files:
/opt/elasticbeanstalk/hooks/appdeploy/pre/03_install_php_modules.sh:
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
set -xe
if [ -f /root/.not-a-new-instance.txt ]
then
echo "Not a new instance. Skipping installation."
exit 0
else
echo "Installing PHP modules."
yum install -y php70-gmp php70-zip
touch /root/.not-a-new-instance.txt
fi
@appkr
Copy link
Copy Markdown
Author

appkr commented Jul 7, 2017

Case 3: Config Deploy

[2017-07-07T07:53:52.434Z] INFO  [4428]  - [Configuration update 13@4] : Starting activity...
[2017-07-07T07:53:52.434Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore] : Starting activity...
[2017-07-07T07:53:52.434Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore/ConfigCWLAgent] : Starting activity...
[2017-07-07T07:53:52.434Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore/ConfigCWLAgent/10-config.sh] : Starting activity...
[2017-07-07T07:53:52.550Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore/ConfigCWLAgent/10-config.sh] : Completed activity. Result:
  Log streaming option setting is not specified, ignore cloudwatch logs setup.
  
  Disabled log streaming.
[2017-07-07T07:53:52.550Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore/ConfigCWLAgent] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logstreaming/hooks/config.
[2017-07-07T07:53:52.550Z] INFO  [4428]  - [Configuration update 13@4/AddonsBefore] : Completed activity.
[2017-07-07T07:53:52.550Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0] : Starting activity...
[2017-07-07T07:53:52.550Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/InfraWriteConfig] : Starting activity...
[2017-07-07T07:53:52.553Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/InfraWriteConfig] : Completed activity. Result:
  Recreated directory /opt/elasticbeanstalk/deploy/configuration/.
  Generate appsource url file at /opt/elasticbeanstalk/deploy/configuration/appsourceurl.
  Generate container config file at /opt/elasticbeanstalk/deploy/configuration/containerconfiguration.
[2017-07-07T07:53:52.553Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook] : Starting activity...
[2017-07-07T07:53:52.553Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook/10_setup_envvars.sh] : Starting activity...
[2017-07-07T07:53:52.772Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook/10_setup_envvars.sh] : Completed activity.
[2017-07-07T07:53:52.772Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook/20_configure_php.sh] : Starting activity...
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook/20_configure_php.sh] : Completed activity. Result:
  Using configuration value for DocumentRoot: 
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0/ConfigDeployPreHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/pre.
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage0] : Completed activity. Result:
  Configuration update - Command CMD-ConfigDeploy stage 0 completed
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1] : Starting activity...
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployEnactHook] : Starting activity...
[2017-07-07T07:53:53.259Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployEnactHook/99_reload_app_server.sh] : Starting activity...
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployEnactHook/99_reload_app_server.sh] : Completed activity. Result:
  Equivalent Upstart operations: start httpd, stop httpd, restart httpd, status httpd
  Stopping httpd
  httpd stop/waiting
  Starting httpd
  httpd start/running, process 4502
  [OK]
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployEnactHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/enact.
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployPostHook] : Starting activity...
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1/ConfigDeployPostHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/post.
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/ConfigDeployStage1] : Completed activity. Result:
  Application restart - Command CMD-ConfigDeploy stage 1 completed
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter] : Starting activity...
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter/ConfigLogRotation] : Starting activity...
[2017-07-07T07:53:53.352Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2017-07-07T07:53:53.511Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
  Disabled forced hourly log rotation.
[2017-07-07T07:53:53.512Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2017-07-07T07:53:53.512Z] INFO  [4428]  - [Configuration update 13@4/AddonsAfter] : Completed activity.
[2017-07-07T07:53:53.512Z] INFO  [4428]  - [Configuration update 13@4] : Completed activity. Result:
  Configuration update - Command CMD-ConfigDeploy succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment