Skip to content

Commit de81a8b

Browse files
committed
CloudFormation update
allow INSTANCE_TYPE to persist across stack updates using previous value.
1 parent af71ea2 commit de81a8b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

lib/cdo/aws/cloud_formation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CloudFormation
3434

3535
SSH_KEY_NAME = 'server_access_key'.freeze
3636
IMAGE_ID = ENV['IMAGE_ID'] || 'ami-c8580bdf' # ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*
37-
INSTANCE_TYPE = ENV['INSTANCE_TYPE'] || 't2.large'
37+
INSTANCE_TYPE = rack_env?(:production) ? 'm4.10xlarge' : 't2.large'
3838
SSH_IP = '0.0.0.0/0'.freeze
3939
S3_BUCKET = 'cdo-dist'.freeze
4040
CHEF_KEY = rack_env?(:adhoc) ? 'adhoc/chef' : 'chef'
@@ -90,7 +90,7 @@ def validate
9090
CDO.log.info template if ENV['VERBOSE']
9191
template_info = string_or_url(template)
9292
CDO.log.info cfn.validate_template(template_info).description
93-
params = parameters(template)
93+
params = parameters(template).reject {|x| x[:parameter_value].nil?}
9494
CDO.log.info "Parameters:\n#{params.map {|p| "#{p[:parameter_key]}: #{p[:parameter_value]}"}.join("\n")}" unless params.empty?
9595

9696
if stack_exists?

lib/rake/stack.rake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ namespace :stack do
22
task :environment do
33
require_relative '../../deployment'
44
CDO.chef_local_mode = rack_env?(:adhoc) ? !ENV['CHEF_SERVER'] : false
5-
ENV['INSTANCE_TYPE'] ||= rack_env?(:production) ? 'm4.10xlarge' : 't2.large'
65
ENV['TEMPLATE'] ||= 'cloud_formation_stack.yml.erb'
76
ENV['CDN_ENABLED'] ||= '1'
87
ENV['DOMAIN'] ||= rack_env?(:adhoc) ? 'cdn-code.org' : 'code.org'

0 commit comments

Comments
 (0)