GithubHelp home page GithubHelp logo

tomdale / ember-cli-deploy-elastic-beanstalk Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 20.0 45 KB

An ember-cli-deploy plugin for deploying an Ember app to AWS Elastic Beanstalk running FastBoot.

License: MIT License

JavaScript 94.77% HTML 5.23%

ember-cli-deploy-elastic-beanstalk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ember-cli-deploy-elastic-beanstalk's Issues

ember eb:provision Unable to download from S3 location (301)

I'm getting a 301 in trying to provision.
Error:

Creating Elastic Beanstalk application version
Unable to download from S3 location (Bucket: fastboot-aws  Key: fastboot-aws-latest.zip). Reason: Moved Permanently
InvalidParameterCombination: Unable to download from S3 location (Bucket: fastboot-aws  Key: fastboot-aws-latest.zip). Reason: Moved Permanently
    at Request.extractError (/Users/xn/sites/thing/node_modules/aws-sdk/lib/protocol/query.js:40:29)
    at Request.callListeners (/Users/xn/sites/thing/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/Users/xn/sites/thing/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:615:14)
    at Request.transition (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/xn/sites/thing/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/xn/sites/thing/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:617:12)
    at Request.callListeners (/Users/xn/sites/thing/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at Request.emit (/Users/xn/sites/thing/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:615:14)
    at Request.transition (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/xn/sites/thing/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/xn/sites/thing/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/xn/sites/thing/node_modules/aws-sdk/lib/request.js:38:9)

deploy.js

    ENV['elastic-beanstalk'] = {
      bucket: process.env.STAGING_BUCKET
    }
    ENV.s3 = {
      accessKeyId: process.env.AWS_KEY,
      secretAccessKey: process.env.AWS_SECRET,
      bucket: process.env.STAGING_BUCKET,
      region: process.env.STAGING_REGION
    }

Maybe the s3 url is mangled?

eb:provision command works only for us-east-1 region

The S3 bucket (https://github.com/tomdale/ember-cli-deploy-elastic-beanstalk/blob/master/lib/aws/elastic-beanstalk.js#L64) containing fastboot-aws is in the us-east-1 region. As AWS requires the EB Application to be in the same region as the source bundle, this effectively prevents creating the EB Application in any other region than us-east-1.

Not sure how to fix this. Maybe the user has to deploy fastboot-aws into his own S3 bucket in his region? Would require a configurable bucket name...

Can not upload to bucket in Frankfurt

Hello,

when uploading application to S3 bucket located in Frankfurt I got
Failed InvalidRequest: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256..

According to documentation it is required to use v4 with Frankfurt and some other locations.

I have configuration in config/deploy.js like

...
'elastic-beanstalk': {
      bucket: 'some-fastboot-bucket',
      region: 'eu-central-1',
      key: 'fastboot-deploy-info.json'
},
...

But the region is lost here, so it ends up with AWS.S3 instance configured to

{
  ...
  region: 'us-east-1',
  signatureVersion: 's3'
  ...
}

So, a fix may look like

this.s3 = new S3({ region: options.region });

and PR is coming.

Cannot find module './lib/aws'

I think I've followed all the steps in ember-cli-deploy-s3 and here.
I've successfully provisioned a tier in aws but when it comes to deploy I get this stack trace.

Cannot find module './lib/aws'
Error: Cannot find module './lib/aws'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.<anonymous> (/Users/miguelcamba/code/own/ember-power-select/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/index.js:2:18)
    at Module._compile (module.js:399:26)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.<anonymous> (/Users/miguelcamba/code/own/ember-power-select/node_modules/ember-cli-deploy-elastic-beanstalk/lib/elastic-beanstalk-deploy-plugin.js:8:25)
    at Module._compile (module.js:399:26)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)

In case it makes a difference, the app I'm trying to deploy is actually the dummy app in an addon, so everything is open source in case it helps.

Probably I'm missing something obvious, aws is confusing as hell for me.

MissingRequiredParameter: Missing required key 'Key' in params

Complete stack trace:

+- upload
|  |
|  +- elastic-beanstalk
- uploading tmp/deploy-dist-1d0832b056db7adf518bca06279d56ee.zip to ember-deployment-fastboot-test
|
+- didFail
MissingRequiredParameter: Missing required key 'Key' in params
    at ParamValidator.fail (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/param_validator.js:50:37)
    at ParamValidator.validateStructure (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/param_validator.js:61:14)
    at ParamValidator.validateMember (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/param_validator.js:88:21)
    at ParamValidator.validate (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/param_validator.js:34:10)
    at Request.VALIDATE_PARAMETERS (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/event_listeners.js:109:42)
    at Request.callListeners (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at callNextListener (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
    at /Users/kieranhall/workspace/mindcurv/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/event_listeners.js:75:9
    at finish (/Users/kieranhall/workspace/aws-deployment-test/node_modules/ember-cli-deploy-elastic-beanstalk/node_modules/aws-sdk/lib/config.js:308:7)

Prior to getting this error, my config object looked like:

'elastic-beanstalk': {
  bucket: 'ember-deployment-fastboot-test'
}

After some tinkering and help from Michael Klein, we determined that the config needs to have a key key defining like so:

'elastic-beanstalk': {
  bucket: 'ember-deployment-fastboot-test',
  key: 'fastboot-dist.json' // inline with fastboot-aws server requirements
}

After this change, the deployment works, and I see my dist-***.zip in my bucket, plus the key configuration creates a file by the same name, with the expected mapping to be picked up by EB.

Perhaps the AWS CLI API changed? I am working with this version on my machine.

I'll prepare a PR for the documentation change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.