-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yum wkhtmltopdf causes deployment error. #2
Comments
This could fail for any number of reasons. I would investigate by ssh'ing into an instance and running Here's another project's config where they have to drop to commands to install certain yum packages: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/deploying-libcouchbase-with-aws-elasticbeanstalk.html.md#using-ebextensions-commands |
No success with:commands: or:apt: |
will not get the tar file, this will do: wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2 |
I made that change en when the new commit is deployed the following message is shown: [Instance: i-aff555d5 Module: AWSEBAutoScalingGroup ConfigSet: null] Failed on instance with return code: 1 Output: ver msg = "%s\n" % self.format(record) File "/usr/lib64/python2.6/logging/init.py", line 654, in format return fmt.format(record) File "/usr/lib64/python2.6/logging/init.py", line 436, in format record.message = record.getMessage() File "/usr/lib64/python2.6/logging/init.py", line 306, in getMessage msg = msg % self.args UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 366: ordinal not in range(128) Error occurred during build: Command 03-command failed . |
This worked: #install wkhtmltopdf |
@porteaux thank you very much for sharing your solution! It installed everything correctly, but I received "Cannot create a QPixmap when no GUI is being used" error. It seems that version 0.11.0_rc1 requires X to render opacity property. |
For the latest (0.12.3) version I got this working with below code: 03_command: Forgive me not having proper YAML format but I wasn't able to format it. |
first thanks for sharing this useful document to the global comunity. I have already installed git, gnuplot, and gsl packages. this is what my current config.ruby looks like:
These are things that make sense for any Ruby application
Install git in order to be able to bundle gems from git
packages
yum:
git: []
gnuplot: []
gsl: []
wkhtmltopdf: []
commands:
Run rake with bundle exec to be sure you get the right version
add_bundle_exec:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh
Bundle with --deployment as recommended by bundler docs
cf. http://gembundler.com/v1.2/rationale.html under Deploying Your Application
add_deployment_flag:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
Vendor gems to a persistent directory for speedy subsequent bundling
make_vendor_bundle_dir:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
command: mkdir /var/app/support/vendor_bundle
Store the location of vendored gems in a handy env var
set_vendor_bundle_var:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/support
command: sed -i '12iexport EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
The --deployment flag tells bundler to install gems to vendor/bundle/, so
symlink that to the persistent directory
symlink_vendor_bundle:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: sed -i '6iln -s $EB_CONFIG_APP_VENDOR_BUNDLE ./vendor/bundle' 10_bundle_install.sh
Don't run the above commands again on this instance
cf. http://stackoverflow.com/a/16846429/283398
z_write_post_provisioning_complete_file:
cwd: /opt/elasticbeanstalk/support
command: touch .post-provisioning-complete
when I uncomment:
wkhtmltopdf: []
And then deploy the new version to my eb app.
My eb console for the environment shows:
2013-07-18 09:55:36 UTC-0400 ERROR Failed to deploy application.
2013-07-18 09:55:35 UTC-0400 ERROR Responses from [i-59892133] were received, but the commands failed.
2013-07-18 09:55:22 UTC-0400 INFO Deploying new version to instance(s).
The text was updated successfully, but these errors were encountered: