lundi 27 avril 2015

Deploying a Rails / Ember app on AWS Elastic Beanstalk

I am having issues deploying my elastic beanstalk rails 4 + ember cli app. I have a rails application and within the root I have a folder called 'frontend' which contains my ember app generated by ember CLI Rails.

My configuration: 64bit Amazon Linux 2015.03 v1.3.1 running Ruby 2.1 (Puma)

I encounter the following error from my activity log after I run eb deploy:

At cursory, I get this

ERROR: Instance: i-25c139e7 Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: (TRUNCATED)...mber-cli-rails.rb:58:in `compile!'

Looking into /var/log/eb-activity.log

I first get a lot of npm ERR! Error: Attempt to unlock X, which hasn't been locked

followed by npm ERR! System Linux 3.14.35-28.38.amzn1.x86_64 npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /var/app/ondeck/frontend npm ERR! node -v v0.10.35 npm ERR! npm -v 1.4.28 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /var/app/ondeck/frontend/npm-debug.log npm ERR! not ok code 0 rake aborted! EmberCLI Rails requires your Ember app to have an addon.

From within your EmberCLI directory please run:

$ npm install --save-dev ember-cli-rails-addon@0.0.11

in you Ember application root: /var/app/ondeck/frontend

Tasks: TOP => assets:precompile => ember:compile
(See full trace by running task with --trace) (Executor::NonZeroExitStatus)

So I ssh into the directory indicated and run npm install, which also leaves me with a lot of errors regarding authorization. When I run with via sudo, the modules install correctly, but when I redeploy my app, it gives me the exact same error.

I have tried sudo NPM install and chown -R node_modules webapp so that the node_modules folder can be accessed by the webapp group with no success.




Aucun commentaire:

Enregistrer un commentaire