...
AWS Console → Storage → S3 → Buckets → search for app name
Table of Contents
Table of Contents |
---|
...
Logs
click Logs in left side menu
- fetch full logs
- download and unzip
interesting logs
log/eb-commandprocessor.log shows what happened during deploy log/nginx/access.log shows URLs accessed for qa_server app/containerfiles/logs/production.log rails app log
Code Block | ||
---|---|---|
| ||
eb logs # equivalent to tail -100
eb logs -a # download all logs to local directory in rails app .elasticbeanstalk/l |
ssh to AWS
eb init
- eb use _machine_name_
eb ssh
locations of interest
path purpose ex files /var/app/current navigate to app /opt/elasticbeanstalk/hooks/appdeploy/pre scripts to run before deploy starts 10_bundle_install.sh /opt/elasticbeanstalk/hooks/appdeploy/post scripts to run after after deploy starts 01_rails_support.sh
/opt/elasticbeanstalk/support EB_SUPPORT_DIR /opt/elasticbeanstalk/support/scripts EB_SCRIPT_DIR /var/app/ondeck EB_APP_STAGING_DIR webapp EB_APP_USER not a location, but used in 10_bundle_install.sh - connecting to the database
Code Block language none $ sudo mysql -h _DATABASE_HOST_ -u _DATABASE_RAILS_USER_ -p Enter password: _DATABASE_RAILS_USER_PW_
Values for _DATABASE_* are in the AWS config
...
Ref: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html
Cool commands
command | example | comments |
---|---|---|
eb init | eb init |
|
eb list | eb list | shows all servers you can connect to |
eb ssh | eb ssh _MACHINE_NAME_-stg | connect to default or a specific server (see eb list for server names) app at: /var/app/current |
eb printenv | ||
eb setenv _NAME_=_VALUE_ | set environment vars from command line | |
aws logs | ||
awselasticbeanstalk restart-app-server | aws elasticbeanstalk restart-app-server --environment-name my-env |
Updating bundler on AWS
Article: Update Bundler on AWS Elastic Beanstalk
...