Skip to content

Commit

Permalink
CloudFormation template issue with Beanstalk solved
Browse files Browse the repository at this point in the history
  • Loading branch information
jros2300 committed May 20, 2016
1 parent dcfd945 commit 347446f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 0 additions & 4 deletions lib/aws_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ module AwsCommon
METADATA_ENDPOINT = 'http://169.254.169.254/latest/meta-data/'
PLATFORMS = {'RunInstances:000g' => 'SUSE Linux', 'RunInstances:0006' => 'Windows with SQL Server Standard', 'RunInstances:0202' => 'Windows with SQL Server Web', 'RunInstances:0010' => 'Red Hat Enterprise Linux', 'RunInstances:0102' => 'Windows with SQL Server Enterprise'}

def get_regions
return ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2']
end

def get_current_account_id
Rails.cache.fetch("current_account_id", expires_in: 24.hours) do
iam_data = Net::HTTP.get( URI.parse( METADATA_ENDPOINT + 'iam/info' ) )
Expand Down
12 changes: 9 additions & 3 deletions reservedinstances.cform
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
"m4.xlarge"
],
"Description": "Increase the instance type for the worker if you have a big DBR file and you're going to use it."
},
"BeanstalkStackName": {
"Description": "Name of the beankstalk Stack (Ruby 2.2 with Passenger): http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html#concepts.platforms.ruby",
"Type": "String",
"Default": "64bit Amazon Linux 2016.03 v2.1.2 running Ruby 2.2 (Passenger Standalone)"
}
},
"Resources": {
Expand Down Expand Up @@ -183,7 +188,7 @@
"Ref": "RIApplication"
},
"Description": "Reserved Instances Tool Application Web Server",
"SolutionStackName": "64bit Amazon Linux 2015.09 v2.0.4 running Ruby 2.2 (Passenger Standalone)",
"SolutionStackName": { "Ref": "BeanstalkStackName" },
"VersionLabel": {
"Ref": "RIApplicationVersion"
},
Expand Down Expand Up @@ -331,14 +336,14 @@
"Ref": "RIApplication"
},
"Description": "Reserved Instances Tool Worker to apply the recommendations automatically",
"SolutionStackName": "64bit Amazon Linux 2015.09 v2.0.4 running Ruby 2.2 (Passenger Standalone)",
"SolutionStackName": { "Ref": "BeanstalkStackName" },
"VersionLabel": {
"Ref": "RIApplicationVersion"
},
"Tier": {
"Type": "SQS/HTTP",
"Name": "Worker",
"Version": "2.0"
"Version": " "
},
"OptionSettings": [
{
Expand Down Expand Up @@ -492,3 +497,4 @@
}
}
}

0 comments on commit 347446f

Please sign in to comment.