menu

Working with AWS OpsWorks

Go to Lab

2577 리뷰

Reprovision fails

Charles M. · 1일전에 리뷰됨

進介 小. · 6일전에 리뷰됨

Fantastic stuff

Kapil G. · 7일전에 리뷰됨

Ankit H. · 7일전에 리뷰됨

very useful, would like if you have separate labs for chef and puppet as well

Krishnakumar S. · 8일전에 리뷰됨

Reid G. · 9일전에 리뷰됨

Talal A. · 9일전에 리뷰됨

Deployment of the second version was failed. Here is the part of log [2019-08-14T07:06:08+00:00] INFO: No database adapter specified for photo_app, guessing [2019-08-14T07:06:08+00:00] INFO: Gem mysql2 not found in the Gemfile of photo_app, defaulting to mysql [2019-08-14T07:06:08+00:00] INFO: Processing template[/srv/www/photo_app/shared/config/database.yml] action create (/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb line 115) [2019-08-14T07:06:08+00:00] INFO: deploy[/srv/www/photo_app] queueing checkdeploy hook /srv/www/photo_app/releases/20190814070602/deploy/before_migrate.rb [2019-08-14T07:06:08+00:00] INFO: Processing template[/srv/www/photo_app/shared/config/database.yml] action create (/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb line 115) [2019-08-14T07:06:08+00:00] INFO: deploy[/srv/www/photo_app] made pre-migration symlinks [2019-08-14T07:06:08+00:00] INFO: deploy[/srv/www/photo_app] set user to deploy [2019-08-14T07:06:08+00:00] INFO: deploy[/srv/www/photo_app] set group to apache [2019-08-14T07:06:08+00:00] INFO: deploy[/srv/www/photo_app] migrating deploy ================================================================================ Error executing action `deploy` on resource 'deploy[/srv/www/photo_app]' ================================================================================ Chef::Exceptions::Exec ---------------------- if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi returned 1, expected 0 Cookbook Trace: --------------- /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/monkey_patch_deploy_provider.rb:45:in `block in migrate' /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/monkey_patch_deploy_provider.rb:39:in `migrate' Resource Declaration: --------------------- # In /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb 65: deploy deploy[:deploy_to] do 66: provider Chef::Provider::Deploy.const_get(deploy[:chef_provider]) 67: keep_releases deploy[:keep_releases] 68: repository deploy[:scm][:repository] 69: user deploy[:user] 70: group deploy[:group] 71: revision deploy[:scm][:revision] 72: migrate deploy[:migrate] 73: migration_command deploy[:migrate_command] 74: environment deploy[:environment].to_hash 75: purge_before_symlink(deploy[:purge_before_symlink]) unless deploy[:purge_before_symlink].nil? 76: create_dirs_before_symlink(deploy[:create_dirs_before_symlink]) 77: symlink_before_migrate(deploy[:symlink_before_migrate]) 78: symlinks(deploy[:symlinks]) unless deploy[:symlinks].nil? 79: action deploy[:action] 80: 81: if deploy[:application_type] == 'rails' && node[:opsworks][:instance][:layers].include?('rails-app') 82: restart_command "sleep #{deploy[:sleep_before_restart]} && #{node[:opsworks][:rails_stack][:restart_command]}" 83: end 84: Compiled Resource: ------------------ # Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:65:in `block in from_file' deploy("/srv/www/photo_app") do params {:deploy_data=>{"deploy_to"=>"/srv/www/photo_app", "chef_provider"=>"Timestamped", "keep_releases"=>5, "current_path"=>"/srv/www/photo_app/current", "document_root"=>"public", "ignore_bundler_groups"=>["test", "development"], "absolute_document_root"=>"/srv/www/photo_app/current/public/", "rake"=>"/usr/local/bin/rake", "migrate"=>true, "migrate_command"=>"if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi", "rails_env"=>"production", "action"=>"deploy", "user"=>"deploy", "group"=>"apache", "shell"=>"/bin/bash", "home"=>"/home/deploy", "sleep_before_restart"=>0, "stack"=>{"needs_reload"=>true}, "enable_submodules"=>true, "shallow_clone"=>false, "delete_cached_copy"=>true, "purge_before_symlink"=>["log", "tmp/pids", "public/system"], "create_dirs_before_symlink"=>["tmp", "public", "config"], "symlink_before_migrate"=>{"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"}, "symlinks"=>{"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"}, "environment"=>{"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy"}, "environment_variables"=>{}, "ssl_support"=>false, "auto_npm_install_on_deploy"=>true, "nodejs"=>{"restart_command"=>"monit restart node_web_app_photo_app", "stop_command"=>"monit stop node_web_app_photo_app", "port"=>80}, "application"=>"photo_app", "application_type"=>"rails", "auto_bundle_on_deploy"=>true, "deploying_user"=>"arn:aws:sts::941726655375:federated-user/netleon", "domains"=>["photo_app"], "mounted_at"=>nil, "restart_command"=>nil, "ssl_certificate"=>nil, "ssl_certificate_key"=>nil, "ssl_certificate_ca"=>nil, "scm"=>{"scm_type"=>"git", "repository"=>"https://github.com/awslabs/opsworks-demo-rails-photo-share-app.git", "revision"=>"version2", "ssh_key"=>nil, "user"=>nil, "password"=>nil}, "database"=>{}, "memcached"=>{"host"=>nil, "port"=>11211}}, :app=>"photo_app", :name=>nil} provider Chef::Provider::Deploy::Timestamped action [:deploy] updated true updated_by_last_action true retries 0 retry_delay 2 deploy_to "/srv/www/photo_app" environment {"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy", "LC_ALL"=>"C"} repository_cache "cached-copy" purge_before_symlink ["log", "tmp/pids", "public/system"] create_dirs_before_symlink ["tmp", "public", "config"] symlink_before_migrate {"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"} symlinks {"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"} revision "version2" migrate true remote "origin" enable_submodules true scm_provider Chef::Provider::Git keep_releases 5 enable_checkout true checkout_branch "deploy" cookbook_name "deploy" recipe_name "rails" repo "https://github.com/awslabs/opsworks-demo-rails-photo-share-app.git" user "deploy" group "apache" migration_command "if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi" restart_command "sleep 0 && touch tmp/restart.txt" before_migrate #<Proc:0x00006a84d1fd50@/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:100> shared_path "/srv/www/photo_app/shared" destination "/srv/www/photo_app/shared/cached-copy" current_path "/srv/www/photo_app/current" end [2019-08-14T07:06:09+00:00] INFO: Running queued delayed notifications before re-raising exception [2019-08-14T07:06:09+00:00] INFO: bash[logdir_existence_and_restart_apache2] sending restart action to service[apache2] (delayed) [2019-08-14T07:06:09+00:00] INFO: Processing service[apache2] action restart (apache2::default line 29) [2019-08-14T07:06:12+00:00] INFO: service[apache2] restarted [2019-08-14T07:06:12+00:00] ERROR: Running exception handlers [2019-08-14T07:06:12+00:00] ERROR: Exception handlers complete [2019-08-14T07:06:12+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out [2019-08-14T07:06:12+00:00] ERROR: deploy[/srv/www/photo_app] (deploy::rails line 65) had an error: Chef::Exceptions::Exec: if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi returned 1, expected 0 [2019-08-14T07:06:12+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Леонид Н. · 9일전에 리뷰됨

Fady I. · 12일전에 리뷰됨

Jayesh S. · 13일전에 리뷰됨

Urmila K. · 13일전에 리뷰됨

slow

jeffery b. · 14일전에 리뷰됨

Andriy p. · 14일전에 리뷰됨

David H. · 16일전에 리뷰됨

Jason H. · 16일전에 리뷰됨

Fei C. · 16일전에 리뷰됨

Version 2 didn't deploy

Aaron T. · 16일전에 리뷰됨

Geoffrey K. · 17일전에 리뷰됨

Alberto A. · 17일전에 리뷰됨

Load balancer setup twice, no Show seen. However, really nicely done

Stanislav K. · 17일전에 리뷰됨

Great lab experience with lots of details.

Sunil J. · 18일전에 리뷰됨

Enam K. · 18일전에 리뷰됨

Saqib R. · 19일전에 리뷰됨

Aditya K. · 20일전에 리뷰됨

Good

AWS_CSA13 A. · 20일전에 리뷰됨