Giter Site home page Giter Site logo

alienfast / elastic-beanstalk Goto Github PK

View Code? Open in Web Editor NEW
191.0 191.0 24.0 142 KB

[Need maintainer/owner - see #57] AWS Elastic Beanstalk gem with rake configuration and deployment for rails apps in 60 seconds or less.

License: MIT License

Ruby 100.00%

elastic-beanstalk's People

Contributors

aterreno avatar canatella avatar djsegal avatar jabr avatar nicolai86 avatar onomated avatar rosskevin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elastic-beanstalk's Issues

ebextensions not executing

In my eb.yml I have the following under ebextensions

ebextensions:
  files:
    "/opt/elasticbeanstalk/hooks/appdeploy/pre/001_oracle.sh":
      mode: "000755"
      owner: root
      group: root
      content: |
        #!/usr/bin/env bash
        ...
        ...

When I deploy my application, the script isn't executed and the file /opt/elasticbeanstalk/hooks/appdeploy/pre/001_oracle.sh is not in the directory. Am I doing something wrong?

Config RACK_ENV and/or RAILS_ENV in eb.yml

I'd like to configure RACK_ENV and RAILS_ENV in my config file.
For example, in an EB environment called 'staging' I run my rails app in production mode, not a staging mode.
The current config task explicitly overrides any of these values set as options here

EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RACK_ENV', "#{EbConfig.environment}")
EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RAILS_ENV', "#{EbConfig.environment}")

Is there some way to maintain these environment variables without overriding the eb:config task?
If not, would you be open to a patch to alter those lines to check if those variables are already set?

Solution stack name error

I'm unable to set 64bit Amazon Linux running Ruby 1.9.3 as my solution_stack_name. Error says that there was no solution stack by that name found.

Using Latest Versions of Passenger - how to do?

Right now Beanstalk comes with 4.x version of Passenger as an environment.
There are ton of advanced features with 5.x version of Passenger.
Is there any ways we can use latest version of Passenger with Nginx? Or Enterprise Passenger version??

Problem running "bundle exec rake eb:package eb:deploy"

Linuss-MacBook-Pro:crowding_bank lundevallan$ bundle exec rake eb:package eb:deploy rm -r pkg mkdir -p pkg rake aborted! uninitialized constant Zip::File /Users/lundevallan/.rvm/gems/ruby-1.9.3-p448/gems/elastic-beanstalk-1.0.0/lib/elastic/beanstalk/tasks/eb.rake:209:in block (2 levels) in <top (required)> /Users/lundevallan/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in eval /Users/lundevallan/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in <main> Tasks: TOP => eb:package (See full trace by running task with --trace)

Aws::S3::Errors::AllAccessDisabled: All access to this object has been disabled

i am getting this error :
i have given the correct access keys and my eb_config looks like this

app: acme
region: us-east-1
solution_stack_name: 64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)
strategy: inplace-update 
keep_latest: 10
development:
  options:
    aws:autoscaling:launchconfiguration:
      InstanceType: t1.micro

production:
  strategy: blue-green 
  options:
    aws:autoscaling:launchconfiguration:
      InstanceType: t1.small

but when i am trying to deploy it , i am getting this error :

[2016-07-01 06:12:55 UTC][package:acme.zip] start uploading to s3 bucket acme.packages...
rake aborted!
Aws::S3::Errors::AllAccessDisabled: All access to this object has been disabled
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/aws-sdk-core/plugins/s3_accelerate.rb:33:in `call'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/seahorse/client/plugins/response_target.rb:21:in `call'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/seahorse/client/request.rb:70:in `send_request'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-core-2.3.18/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-resources-2.3.18/lib/aws-sdk-resources/services/s3/file_uploader.rb:42:in `block in put_object'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-resources-2.3.18/lib/aws-sdk-resources/services/s3/file_uploader.rb:49:in `open_file'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-resources-2.3.18/lib/aws-sdk-resources/services/s3/file_uploader.rb:41:in `put_object'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-resources-2.3.18/lib/aws-sdk-resources/services/s3/file_uploader.rb:34:in `upload'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/aws-sdk-resources-2.3.18/lib/aws-sdk-resources/services/s3/object.rb:251:in `upload_file'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/eb_deployer-0.6.6/lib/eb_deployer/aws_driver/s3_driver.rb:18:in `upload_file'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/eb_deployer-0.6.6/lib/eb_deployer/package.rb:30:in `upload_if_not_exists'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/eb_deployer-0.6.6/lib/eb_deployer/package.rb:10:in `upload'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/eb_deployer-0.6.6/lib/eb_deployer/application.rb:22:in `create_version'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/eb_deployer-0.6.6/lib/eb_deployer.rb:232:in `deploy'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/elastic-beanstalk-1.2.1/lib/elastic/beanstalk/tasks/eb.rake:348:in `block (2 levels) in <top (required)>'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/bitlasoft/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => eb:deploy
(See full trace by running task with --trace)

where have i gone wrong ??

VPC security group "does not exist"

Aws::ElasticBeanstalk::Errors::ConfigurationValidationException: Configuration validation exception: Invalid option value: 'sg-xxxxxxxx' (Namespace: 'aws:autoscaling:
launchconfiguration', OptionName: 'SecurityGroups'): The security group 'sg-xxxxxxxx' does not exist
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/seahorse/client/plugins/response_target.rb:21:in `call'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/seahorse/client/request.rb:70:in `send_request'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/aws-sdk-core-2.6.35/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/aws_driver/beanstalk.rb:37:in `update_environment'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/throttling_handling.rb:13:in `block in method_missing'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/utils.rb:13:in `backoff'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/throttling_handling.rb:12:in `method_missing'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/eb_environment.rb:107:in `block in update_eb_env'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/eb_environment.rb:128:in `with_polling_events'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/eb_environment.rb:106:in `update_eb_env'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/eb_environment.rb:26:in `deploy'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/deployment_strategy/inplace_update.rb:12:in `deploy'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/default_component.rb:16:in `deploy'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/environment.rb:32:in `block in deploy'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/environment.rb:31:in `each'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer/environment.rb:31:in `deploy'
/Users/dcrockwell/.rvm/gems/ruby-2.3.3/gems/eb_deployer-0.6.6/lib/eb_deployer.rb:233:in `deploy'
  • This only seems to be an issue when using a security group from a VPC.
  • If I use an SG that is not associated with a VPC it works as expected.
  • The SG definitely exists in the VPC
  • Had to use the sg-xxxxxxxx id instead of the name, as AWS doesn't accept SG names for VPC; only ids.

Include asset manifest in created zip package?

Hi,

I've been loving the gem!

Like most I've done some experimenting with reducing deployment time and overhead on the EB servers. The simplest & most impactful change i've made is performing the asset compilation on my dev or CI server and including the compiled assets in the zip package to get deployed to EB. the unintended benefit beyond reduced deployment time is a large reduction in memory consumption during deployment - by removing the need to compile the assets on the server I can deploy to a t2.micro instance without a problem where as with asset compilation on EB at minimum my app required a t2.medium instance.

I ran in to an issue with this gem when performing that operation - all of the assets pack in nicely but the asset manifest file (/public/assets/.sprockets-manifest-[hash].json is excluded. my current deploy script includes a line to add it to the created zip file between eb package & eb deploy.

A valid workaround is to specify a different filename for the manifest file (which sprockets config supports.) What are your thoughts as to the best method - include the default sprockets manifest file in the package if it exists or should I rename the manifest file?

Thank you,

Inactive settings cool down not being set

When setting

inactive:
    aws:autoscaling:asg:
      MinSize: 0
      Cooldown: 900

It should wait 15 minutes before removing all instances. But its getting removed immediately. When doing show config, it does output the cool down setting, I just don't think it uses it.

Speedier deployments - Approaches | Updates?

Thank you and ThouhgtWorks team for the amazing Blue-Green deployment tool!

Any thoughts on how to do "Speedier deployments" that take care of bundle and Assets? Any ETA on the same?

There is a note in README:
"Speedier deployments - investigate caching of bundle and asset pre-compilation to see if there is a common setting to be found"

What approaches are possible / being evaluated?

Deployment Failed: Unexpected Exception

Hi ,

I am using for .net, and it wont allow me to publish it from .net sdk and toolkit.

2015-04-16 12:15:20 UTC+0530 ERROR Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.
2015-04-16 12:15:20 UTC+0530 INFO New application version was deployed to running EC2 instances.
2015-04-16 12:15:18 UTC+0530 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2015-04-16 12:15:18 UTC+0530 ERROR [Instance: i-baf84247 Module: AWSEBAutoScalingGroup ConfigSet: Infra-WriteRuntimeConfig, Infra-WriteApplication1, Infra-WriteApplication2, Infra-EmbeddedPreBuild, Hook-PreAppDeploy, Hook-EnactAppDeploy, Infra-EmbeddedPostBuild, Hook-PostAppDeploy] Command failed on instance. Return code: 1 Output: null.
2015-04-16 12:15:14 UTC+0530 ERROR Error occurred during build: Command hooks failed
2015-04-16 12:15:13 UTC+0530 ERROR Deployment Failed: Unexpected Exception
2015-04-16 12:15:03 UTC+0530 INFO Started Application Update

Error: Environment must have instance profile associated with it.

output from package/deploy:

[2017-02-14 21:22:31 UTC][package:catalyst.zip] start uploading to s3 bucket catalyst.packages...
[2017-02-14 21:22:31 UTC][package:catalyst.zip] uploading finished
[2017-02-14 21:22:32 UTC][application:catalyst] Create application version with label ac05f6ff1eb624854abef9948a3558cd
[2017-02-14 21:22:32 UTC][environment:development-9b716c9] createEnvironment is starting.
[2017-02-14 21:22:33 UTC][environment:development-9b716c9] Using elasticbeanstalk-us-east-2-123718597469 as Amazon S3 storage bucket for environment data.
[2017-02-14 21:22:35 UTC][environment:development-9b716c9] Environment must have instance profile associated with it.
[2017-02-14 21:22:35 UTC][environment:development-9b716c9] Failed to launch environment.
[2017-02-14 21:22:36 UTC][environment:development-9b716c9] Deleting SNS topic for environment development-9b716c9.

Cannot apply inactive configuration

Tried deploying with the inactive configuration as described but get an error from AWS tools on verification:

[environment:production-a-0000000] 'MyApp-production-inactive.elasticbeanstalk.com' now points to 'awseb-some-elb-id.us-east-1.elb.amazonaws.com'.
[environment:production-a-0000000] Completed swapping CNAMEs for environments 'production-b-1111111' and 'production-a-0000000'.
[environment:production-a-0000000] applying inactive settings...
[environment:production-a-0000000] Environment status: Ready
rake aborted!
Aws::ElasticBeanstalk::Errors::ConfigurationValidationException: Configuration validation exception: Invalid option value: '0' (Namespace: 'aws:autoscaling:updatepolicy:rollingupdate', OptionName: 'MaxBatchSize'): Value is less than minimum allowed value: 1

Used the inactive settings as prescribed in my eb.yml:

inactive:
  aws:autoscaling:asg:
    MinSize: 0
    Cooldown: 900

Is there a configuration missing? Should the inactive block also take a MaxSize setting?

Unable to deploy to the Ruby 2.0 container

Unable to deploy to the new Ruby 2.0 container: 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma)

Looks like the problamatic piece of code can be found here:
https://github.com/alienfast/elastic-beanstalk/blob/master/samples/real-world.yml#L56

rake aborted!
Elasticbeanstalk instance provision failed (maybe a problem with your .ebextension files). The original message: [Instance: i-1d053942 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command make_vendor_bundle_dir failed

[Need maintainer/owner]

We have recently moved on to a different containerized infrastructure using convox and are no longer maintaining this gem. This gem is a simple rake/config wrapper around eb_deployer, so there aren't too many moving parts.

If you are interested in maintaining or taking over this project, please let me know, I'd like to see it continue - this solves some real pain when using EB.

ArgumentError: couldn't find HOME environment -- expanding `~' - for container rake commands

Here is my eb.yml configuration ...

  03-rake.config:
    container_commands:
      01-db-seed:
        command: "rake db:seed --trace"
        leader_only: true
      02-seed-privilges:
        command: "rake seed:privileges --trace"
        leader_only: true

It fails with the followirng error in /var/log/eb-activity.log

 ArgumentError: couldn't find HOME environment -- expanding `~'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/simplecov-0.9.1/lib/simplecov/defaults.rb:87:in `expand_path'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/simplecov-0.9.1/lib/simplecov/defaults.rb:87:in `<top (required)>'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/simplecov-0.9.1/lib/simplecov.rb:140:in `require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/simplecov-0.9.1/lib/simplecov.rb:140:in `<top (required)>'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:76:in `require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:72:in `each'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:72:in `block in require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:61:in `each'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler/runtime.rb:61:in `require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.6/lib/bundler.rb:134:in `require'
  /var/app/ondeck/config/application.rb:13:in `<top (required)>'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  /var/app/ondeck/Rakefile:5:in `<top (required)>'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load_rakefile'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/application.rb:689:in `raw_load_rakefile'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/application.rb:94:in `block in load_rakefile'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /opt/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/rake-11.1.2/lib/rake/application.rb:93:in `load_rakefile'

inactive_settings in eb.yml

in eb_deployer you can do something like:

inactive_settings:
      # reduce instance count to 0 to save cost
      - namespace: aws:autoscaling:asg
        option_name: MinSize
        value: "0"
      # make sure cooldown is big enough to cope with DNS cache
      - namespace: aws:autoscaling:asg
        option_name: Cooldown
        value: "900"

what is the syntax for inactive settings for this gem?

Configuration to create an RDS instance?

I'm haven't been able to figure out what options I need in my config/eb.yml to create an RDS instance. I've tried adding this block to options, but it doesn't seem to be enough:

  aws:rds:dbinstance:
    DBDeletionPolicy: Snapshot
    DBEngine: postgres
    DBInstanceClass: db.t1.micro
    DBUser: ebroot

Any ideas?

Uses AWS V1 and eb_deployer now uses V2

It seems like the gem is trying to use AWS gem v1 (uppercase AWS) while eb_deployer has a dependency over AWS gem v2 (lowercase AWS)

λ ~/code/ master* rake eb:package eb:deploy
rm -r pkg
rake aborted!
NameError: uninitialized constant AWS
/home/toni/.rvm/gems/ruby-2.2.1/gems/elastic-beanstalk-1.1.3/lib/elastic/beanstalk/tasks/eb.rake:184:in block (2 levels) in <top (required)>' -e:1:in

'
Tasks: TOP => eb:package => eb:config
(See full trace by running task with --trace)

Persistent environment variables

As it stands, deploying blows away any existing environment variables and replaces them with whatever's in the configuration.

However, there are some cases for which it would be nice to have persistent environment variables in EB - I'm thinking of things like Rails' SECRET_KEY_BASE which should not be stored in the repo, nor does it really make sense to have them in the local environment (since they are environment-specific).

Is there any way currently to have persistent environment variables in EB, or have others run into this issue?

Override EB Environment Name

By default, it seems that the environment name has a uniq hash appended to it from eb_deployer. Could this be set as an option? In some cases, it would be ideal for the EB ENV name to match the branch name (for example).

Also, not sure what I am doing wrong, but running "eb:package[development]" returns: no matches found: eb:package[development].

custom CNAME? what am I missing?

I have a relatively generic app name... let's say it's called "myapp". So when I try to create a "staging" environment, the deploy tells EB it wants "myapp-staging.elasticbeanstalk.com" which then throws

Aws::ElasticBeanstalk::Errors::InvalidParameterValue: DNS name (myapp-staging.elasticbeanstalk.com) is not available.

and crashes the whole deploy.

I don't want to have to rename my entire app something crazy just because someone else out there has that same subdomain. (I'm going to point my own domain name at it via Route53 anyway)

What am I missing here? I can't find any examples between this project and eb_deployer showing how to ensure I get an available DNS name. I tried using cname_prefix to prefix the DNS name with something that will probably be unique, but the deploy seemed to ignore that and gave me the same error as above. Is there some setting I need to set to achieve this?

inplace deployment failed but reports success because smoke test succeeds

Key error that needs to be caught:

[2014-01-27 17:26:59 UTC][environment:test-757ch20] [Instance: i-1d06773d Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed
.
[2014-01-27 17:26:59 UTC][environment:test-757ch20] Command execution completed. Summary: [Successful: 0, Failed: 1].
----------------------------------------------------------------------------------
[2014-01-27 17:25:49 UTC][package:acme.zip] start uploading to s3 bucket acme.packages...
[2014-01-27 17:25:55 UTC][package:acme.zip] uploading finished
[2014-01-27 17:25:56 UTC][application:acme] Create application version with label kr_734
[2014-01-27 17:25:58 UTC][environment:test-757ch20] Environment update is starting.
[2014-01-27 17:26:07 UTC][environment:test-757ch20] Updating environment test-757ch20's configuration settings.
[2014-01-27 17:26:51 UTC][environment:test-757ch20] Deploying new version to instance(s).
[2014-01-27 17:26:59 UTC][environment:test-757ch20] [Instance: i-1d06773d Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed
.
[2014-01-27 17:26:59 UTC][environment:test-757ch20] Command execution completed. Summary: [Successful: 0, Failed: 1].
[2014-01-27 17:27:06 UTC][environment:test-757ch20] Command execution completed successfully.
[2014-01-27 17:27:08 UTC][environment:test-757ch20] New application version was deployed to running EC2 instances.
[2014-01-27 17:27:08 UTC][environment:test-757ch20] Successfully deployed new configuration to environment.
[2014-01-27 17:27:08 UTC][environment:test-757ch20] Environment update completed successfully.
[2014-01-27 17:27:22 UTC][environment:test-757ch20] running smoke test for acme-test.elasticbeanstalk.com...
-------------------------------------------------------------------------------
Smoke Test: 
    url: http://acme-test.elasticbeanstalk.com/ping
    timeout: 600
    expected_text: You came to this page by mistake, go back where you came from

Running...|     [200]


Final response code: [200] expectation met: true
-------------------------------------------------------------------------------
[2014-01-27 17:27:36 UTC][environment:test-757ch20] smoke test succeeded.
[2014-01-27 17:27:37 UTC][environment:test-757ch20] health status: Green

How to specify/create a worker environment

I'd like to create a work environment. i can do this in the AWS console, but how do I specify that the environment is a worker environment in the eb.yml ?

develop-worker:
  options:
    aws:autoscaling:launchconfiguration:
      InstanceType: t2.small
  # what options specify worker?

Issue with Beanstalk Deployment

Hi,

We are using the Elastic BeanStalk for the Production Servers Deployment.For the package we are using .zip extension.

When we are deploying with eb:deploy we are getting following error.

[2017-10-11 17:48:56 UTC][environment:ts-r5in-app4-b-0bb7ba5] Unable to unzip application source bundlerake aborted!
Elasticbeanstalk instance provision failed (maybe a problem with your .ebextension files). The original message: [Instance: i-01a2c28c949ad0645] Command failed on instance. Return code: 1 Output: (TRUNCATED)...eck that you have transferred or created the zipfile in the appropriate BINARY mode and that you have compiled UnZip properly)
/opt/elasticbeanstalk/hooks/appdeploy/pre/01_unzip.rb:30:in `': Unable to unzip application source bundle (RuntimeError).
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/01_unzip.rb failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

When we dig in to the error we found that .zip extension will support for 65535 files and we have crossed more than that.

What will be the best possible way to deploy and do u support any other compressions such as .tar or .tar.gz etc.

Thanks
Puneeth

eb.config - allow load/merge of external ebextensions? Maintain known good extensions here?

We are getting closer to a staging deployment with a product and I'm starting to revisit some of the various deployment intricacies. One such item is sidekiq, and I've seen several purported working versions of the ebextension files.

ebextensions are a pain to work with, and part of the reason I created this gem was to make it dead simple.

With that in mind, and the assumption that many people will use many different extensions in different load orders, what are the thoughts about maintaining a set of known good configurations ebextensions in yml form for use in eb.yml e.g. sidekiq?

What about allowing the possibility to load/merge one such as gkop's? This would be bundler/gemfile type of idea, mixed with what we have.

Thoughts? Good/bad? Syntax? Workflow (i.e. explicit pull/merge or auto every time)?

I'm thinking the sample config could be DRYer such as:

#--
ebextensions:
  01settings.config:
    # Run rake tasks before an application deployment
    container_commands:
      01seed:
        command: rake db:seed
        leader_only: true
  # run any necessary commands
  02commands.config:
    container_commands:
      01timezone:
        command: "ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime"

  # These are things that make sense for any Ruby application see:
  #     https://github.com/gkop/elastic-beanstalk-ruby/blob/master/.ebextensions/ruby.config
  03-ruby.config:
    load: "https://raw.githubusercontent.com/gkop/elastic-beanstalk-ruby/master/.ebextensions/ruby.config"

Something else comparable that we can mimic? I'm open to all suggestions.

Error when switching RAILS_ENV to production.

I've been deploying to AWS Elastic Beanstalk with this gem when RAILS_ENV is set to development, but recently I needed to deploy to production and I'm receiving the following error:

$ RAILS_ENV=production rake eb:package eb:deploy
rake aborted!
Don't know how to build task 'eb:package'
/Users/Mike/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
/Users/Mike/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

My config/eb.yml file looks like this:

app: acme
region: us-east-1
solution_stack_name: 64bit Amazon Linux 2013.09 running Ruby 1.9.3

development:
  strategy: inplace_update
  options:
    aws:autoscaling:launchconfiguration:
      InstanceType: t1.micro
    aws:elasticbeanstalk:environment:
      EnvironmentType: SingleInstance

production:
  options:
    aws:autoscaling:launchconfiguration:
      InstanceType: t1.small

secrets_dir: config/aws

Any help would be appreciated. Thanks!

Running Background Jobs - Worker Tier & SQS or Sidekiq/Suckerpunch/Reque/DelayedJob?

Whats the best way to run the Background Jobs?
Should we go for
Worker Tier & SQS or
Sidekiq/Suckerpunch/Reque/DelayedJob?

Also, when we deploy using eb:deploy, we need to set tier to WorkerTier and deploy is it? OR can the eb deploy for both Web & Worker tiers are the same time, if so any such example configuration?

What settings are there for configuring worker tier?
Thank you much in advance.

Solution Stack name changed

Upon running rake eb:package eb:deploy you'll get 64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)' is not a valid solution stack name, followed by a long list of valid stacks. Choose one of those!

Override the config location

We're looking to combine a standard eb.yml file with an application specific config but there's no way to do so in the current code.

Would you be open to changing the config task to look at an ENV variable for the path to the config?

We're thinking about something like this:

    config_file = ENV['EB_CONFIG'] || 'eb.yml'

    # load the configuration from same dir (for standalone CI purposes) or from the rails config dir if within the rails project
    filename = EbConfig.resolve_path(config_file)
    unless File.exists? filename
      filename = EbConfig.resolve_path('config/' + config_file)
    end
    EbConfig.load!(environment, filename)

Using Tags to identify all the resources

When I did the deployment into production environment, the EC2 instances created with production-a-xdfdsfdfs names and so are the other AWS resources with the similar names.

Is there a way to pass tags attributes to the EB deployment environment??

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.