Skip to content

Commit

Permalink
Initial support for Aurora PostgreSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
jfuechsl committed Mar 5, 2020
1 parent 05c621d commit 36f5862
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cookbooks/app/recipes/prep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
is_solo = ['solo'].include?(node['dna']['instance_role'])
unless is_solo # for solo leave the db stuff to the db cookbook
case node.engineyard.environment['db_stack_name']
when /postgres/
when /^postgres\d+/, /^aurora-postgresql\d+/
include_recipe "postgresql::default"
when /mysql/, /aurora/, /mariadb/
when /^mysql\d+/, /^aurora\d+/, /^mariadb\d+/
include_recipe "mysql::client"
include_recipe "mysql::user_my.cnf"
when "no_db"
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/ey-lib/libraries/ey-environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ def db_adapter(app_type)
stack_name = @hash['db_stack_name'].gsub /[^a-z]+/, ''
# see https://tickets.engineyard.com/issue/DATA-66 to understand this
case stack_name
when 'aurora', 'mariadb'
when 'aurora', 'mariadb', 'mysql'
'mysql'
when 'postgres'
when 'postgres', 'aurorapostgresql'
'postgresql'
else
stack_name
Expand Down
8 changes: 4 additions & 4 deletions cookbooks/postgresql/attributes/version.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
case attribute['dna']['engineyard']['environment']['db_stack_name']
when "postgres9_5"
when "postgres9_5", "aurora-postgresql9_5"
default['postgresql']['latest_version'] = '9.5.18'
default['postgresql']['short_version'] = '9.5'
when "postgres9_6"
when "postgres9_6", "aurora-postgresql9_6"
default['postgresql']['latest_version'] = '9.6.14'
default['postgresql']['short_version'] = '9.6'
when "postgres10"
when "postgres10", "aurora-postgresql10"
default['postgresql']['latest_version'] = '10.9'
default['postgresql']['short_version'] = '10'
when "postgres11"
when "postgres11", "aurora-postgresql11"
default['postgresql']['latest_version'] = '11.4'
default['postgresql']['short_version'] = '11'
end
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/util/recipes/prep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
include_recipe "ey-cron"

case node.engineyard.environment['db_stack_name']
when /postgres/
when /^postgres\d+/, /^aurora-postgresql\d+/
include_recipe "postgresql::default"
when /mysql/, /aurora/, /mariadb/
when /^mysql\d+/, /^aurora\d+/, /^mariadb\d+/
include_recipe "mysql::client"
include_recipe "mysql::user_my.cnf"
when "no_db"
Expand Down

0 comments on commit 36f5862

Please sign in to comment.