Rubber - SecurityGroupLimitExceeded exceeded the number of VPC

I used railscasts to use rubber to deploy my rails application for ec2. I had the following problem:

$ cap rubber: create_staging

..... (skip the successful part)

/Users/brian/.rvm/gems/ruby-1.9.3-p327/gems/excon-0.25.3/lib/excon/middlewares/expects.rb:10:in `response_call ': SecurityGroupLimitExceeded => You have exceeded the number of groups VPC security allowed for each instance. (Fog :: Compute :: AWS :: Error)

How can I avoid this problem?

+6
source share
2 answers

The problem is that, by default, Rubber creates different security groups for each role. You will notice that console printing contains numerous lines of "Creating Security Groups # {x}". The maximum authorization without applying is 5 ( http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html ) without applying.

First rubber cap: destroy_all.

To force Rubber to use only one security group, go to rubber.yml and set ... auto_security_groups: false isolate_security_groups: false

After that, it can work, or you can get a message that there are security groups ... Go here to read how to access security groups. Once in the panel, delete all security groups, but "by default". http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html#DeleteSecurityGroup

If you get errors in the rules, select the default user group in the AWS panel. This will trigger the rules. Remove all custom TCP rules. After that, everything should work. You may need to redo the deletion of groups and rules since Rubber seems to be doing a terrible job of managing this.

+9
source

You can request VPC limits for your account, which will be raised through this form .

+1
source

Source: https://habr.com/ru/post/951295/


All Articles